AnimateAnyone 图像检测API参考

更新时间:
复制为 MD 格式

AnimateAnyone图像检测模型,用于确认输入的人物图像是否符合AnimateAnyone视频生成模型的要求。本文档介绍了该模型提供的图像检测能力的API调用方法。

重要

本文档仅适用于“中国大陆(北京)”地域,且必须使用该地域的API Key

模型概览

模型名

模型简介

animate-anyone-detect-gen2

animate-anyone-detect-gen2是一个图像检测模型,专门用于检测输入的图片是否满足animate-anyone-gen2模型所需的人物图像规范。

效果示例

人物图像检测通过示例

人物全身照

人物半身照

  • 单人从头到脚完整露出、身体无遮挡

  • 面朝镜头,无大角度侧身或镜头俯仰

AA_正面建议_全身@4x

  • 单人腰部以上完整露出、身体无遮挡

  • 面朝镜头,无大角度侧身或镜头俯仰

AA_正面建议_半身@4x

人物图像检测不通过示例

非正面照

(侧身侧脸)

光线暗淡

(人物不清晰)

人物遮挡

(服饰遮手、手持物品等)

复杂背景

多人照片

AA_错误_侧身侧脸@4x

AA_错误_光线暗淡@4x

AA_错误_手拿物品@4x

AA_错误_复杂背景@4x

image

HTTP调用接口

功能描述

该模型用于检测输入的图片是否满足“AnimateAnyone 视频生成API”所需的人物图片规范。

前提条件

请求接口

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/aa-detect

入参描述

字段

类型

传参方式

必选

描述

示例值

Content-Type

String

Header

请求类型:application/json

application/json

Authorization

String

Header

API-Key,例如:Bearer d1**2a

Bearer d1**2a

model

String

Body

指明需要调用的模型

animate-anyone-detect-gen2

input.image_url

String

Body

需要检查的图像 URL

URL 需为公网可访问的地址,并支持 HTTP 或 HTTPS 协议。您也可在此获取临时公网URL

"image_url": "http://a/a.jpg"

出参描述

字段

类型

描述

示例值

output.check_pass

Bool

提交的图像列表对应的检查结果

true

output.bodystyle

String

半身或全身:half 表示半身图,full 代表全身图

half

output.reason

String

提交的图像列表对应的检查结果原因,仅当"check_pass": false返回此参数

The input image has no human body...

usage.image_count

Integer

检测的图片数量

1

request_id

String

本次请求的系统唯一码

7574ee8f-38a3-4b1e-9280-11c33ab46e51

请求示例

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":"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251224/pkswoc/p883941.png"
  }
}'

响应示例(请求成功)

图像检测通过

{
    "output": {
        "bodystyle": "full",
        "check_pass": true
    },
    "usage": {
        "image_count": 1
    },
    "request_id": "76df937d-6eb6-40aa-9ccf-xxxxxx"
}

图像检测不通过

{
    "output":{
        "check_pass": false,
        "reason": "The input image has no human body. Please upload other image with single person.",
        "bodystyle": ""
    },
    "usage":{
        "image_count": 1
    },
    "request_id": "c56f62df-724e-9c19-96bd-xxxxxx"
}

响应示例(请求失败)

{
    "code":"InvalidApiKey",
    "message":"Invalid API-key provided.",
    "request_id":"fb53c4ec-1c12-4fc4-a580-xxxxxx"
}

状态码说明

大模型服务平台通用状态码请查阅:错误信息