The AnimateAnyone image detection model verifies that an input character image meets the requirements for AnimateAnyone video generation. This document describes how to call the API to use the image detection feature provided by this model.
This document applies only to the China (Beijing) region. To use the model, you must use an API key for the China (Beijing) region.
Model overview
Model | Description |
animate-anyone-detect-gen2 | animate-anyone-detect-gen2 is an image detection model that is used to detect whether an input image meets the character image specifications required by animate-anyone-gen2. |
Examples
Examples of correct character image
Full-body shot | Half-length shot |
|
|
Examples of failed character image]
Non-frontal shot (Side view of the body and face) | Dim light (The person is not clear) | Person occlusion (Hands are covered by clothing, or the person is holding an object) | Complex background | Photo with multiple people |
|
|
|
|
|
Use HTTP
Feature description
This model is used to determine whether an input image meets the character image specifications for the AnimateAnyone video generation API.
Prerequisites
You have activated Alibaba Cloud Model Studio and obtained an API key. For more information, see Get an API key.
Task submission
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/aa-detectRequest parameters
Parameter | Type | Method | Required | Description | Example |
Content-Type | String | Header | Yes | The request type. Set the value to application/json. | application/json |
Authorization | String | Header | Yes | The API key. Example: Bearer d1**2a. | Bearer d1**2a |
model | String | Body | Yes | The model to be invoked. | animate-anyone-detect-gen2 |
input.image_url | String | Body | Yes | The URL of the image to be checked. The URL must be a publicly accessible address and support the HTTP or HTTPS protocol. | "image_url": "http://a/a.jpg" |
Response parameters
Parameter | Type | Description | Example |
output.check_pass | Bool | The check result that corresponds to the image list submitted by the customer. | "check_pass":true/false |
output.bodystyle | String | The body style. `half` indicates a half-length shot, and `full` indicates a full-body shot. | "bodystyle": half/full |
output.reason | String | The reason for the check result that corresponds to the image list submitted by the customer. | |
request_id | String | The request ID. | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 |
Reasons for a failed detection
output.reason | Description |
The input image contains no person or multiple people. Please upload an image that contains a single person. | The input image contains no person or multiple people. |
The image resolution is invalid. The longest side of the image must be less than 4096 pixels, and the shortest side must be greater than 224 pixels. | The size of the uploaded image does not meet the requirements. |
The pose of the detected person is invalid. Please upload another image that shows the full body and the expected orientation. | The pose of the person does not meet the requirements. (The shoulders and ankles must be visible. The person cannot be facing away from the camera or sitting. The orientation of the person cannot have a severe deviation.) |
The pose of the detected face is invalid. Please upload another image that shows the full face and the expected orientation. | The face of the person does not meet the requirements. (The face must be visible. The orientation of the head cannot have a severe deviation.) |
Sample request
curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/aa-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "animate-anyone-detect-gen2",
"input": {
"image_url":"http://xxx/1.jpg"
},
"parameters": {
}
}'Sample response (passed)
{
"output":{
"check_pass": true,
"reason": 'success'
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}Sample response (failed)
{
"output":{
"check_pass": false,
"reason": "no human detect"
},
"usage":{
"image_count":1
},
"request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}Status codes
For information about the common status codes, see Error messages.
This model also has the following specific error codes:
HTTP status code* | code | message | Description |
400 | InvalidParameter | Parameter required: xxx | A request parameter is missing or the format is incorrect. |
400 | InvalidURL | The request URL is invalid, please check the request URL is available and the request image format is one of the following types: JPEG, JPG, PNG, BMP, and WEBP. | Failed to download the input image. Check the network connection or the input format. |
400 | InvalidFile.Content | The input image has no human body or multi human bodies. Please upload other image with single person. | The input image contains no person or multiple people. |
400 | InvalidFile.Resolution | The image resolution is invalid, please make sure that the largest length of image is smaller than 4096, and the smallest length of image is larger than 224. | The size of the uploaded image does not meet the requirements. |
400 | InvalidFile.BodyPose | The pose of the detected person is invalid, please upload other image with whole body and expected orientation. | The pose of the person does not meet the requirements. (The shoulders and ankles must be visible. The person cannot be facing away from the camera or sitting. The orientation of the person cannot have a severe deviation.) |
400 | InvalidFile.FacePose | The pose of the detected face is invalid, please upload other image with whole face and expected orientation. | The face of the person does not meet the requirements. (The face must be visible. The orientation of the head cannot have a severe deviation.) |






