EMO-detect模型,用于确认输入的人物肖像图片是否符合EMO视频生成模型的输入规范。本文档介绍了该模型提供的图像检测能力的API调用方法。
本文档仅适用于“中国大陆(北京)”地域,需使用“中国大陆(北京)”地域的API Key。
模型概览
| 模型名 | 模型简介 | 
| emo-detect-v1 | emo-detect-v1是一个特定的图像检测模型,用于检测输入的图片是否满足emo模型所需的人物肖像图片规范。 | 
HTTP调用接口
功能描述
该模型用于检测输入的图片是否满足“EMO 视频生成”所需的人物肖像图片规范。
前提条件
- 已开通服务并获得API-KEY:获取API Key。 
输入限制
- 图像格式:格式为jpg,jpeg,png,bmp,webp。 
- 图像分辨率:图像最小边长≥400像素,最大边长≤7000像素。 
- 上传图片仅支持HTTP链接方式,不支持本地链接方式。 
作业提交接口调用
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect入参描述
| 字段 | 类型 | 传参方式 | 必选 | 描述 | 示例值 | 
| Content-Type | String | Header | 是 | 请求类型:application/json。 | application/json | 
| Authorization | String | Header | 是 | API-Key,例如:Bearer d1**2a。 | Bearer d1**2a | 
| model | String | Body | 是 | 指明需要调用的模型,此处用emo-detect-v1。 说明  若调用独立部署模型,则改为填入部署成功的模型名称 | emo-detect-v1 | 
| input.image_url | String | Body | 是 | 
 说明  上传文件仅支持HTTP链接方式,不支持本地链接方式。您也可在此获取临时公网URL。 | http://a/a.jpg | 
| parameters.ratio | String | Body | 是 | 希望检测确认的画幅,可选 "1:1"或"3:4"。默认值为"1:1"。 
 | "ratio": "1:1" | 
出参描述
| 字段 | 类型 | 描述 | 示例值 | 
| output.check_pass | Bool | 客户提交的图像列表对应的检查结果 | "check_pass":true/false | 
| output.face_bbox | Array | 
 | [10,20,30,40] | 
| output.ext_bbox | Array | 
 | [10,20,30,40] | 
| request_id | String | 本次请求的系统唯一码。 | 7574ee8f-38a3-4b1e-9280-11c33ab46e51 | 
请求示例
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "emo-detect-v1",
  "input": {
      "image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250911/yhdvfg/emo-%E5%9B%BE%E7%89%87.png"
  },
  "parameters": {
      "ratio": "1:1"
  }
}'响应示例(通过)
{
    "output":{
        "check_pass": true,
        "face_bbox":[302,286,610,593], #人脸bbox
        "ext_bbox":[71,9,840,778], #动态区域bbox
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}响应示例(不通过)
{
    "output":{
      "check_pass": false, 
      "code": "",
      "message": "",
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}检查不通过原因
| output.message | 原因说明 | 建议用户侧提示 | 
| The input image has no human body. Please upload other image with single person. | 输入图片中没有人。 | 未检测到人脸。 | 
| The input image has multi human bodies. Please upload other image with single person. | 输入图片中有多人。 | 请上传单人照。 | 
| The proportion of the detected person in the picture is too large or too small, please upload other image. | 上传图片中人物占比不符合要求。 | 上传图片中人脸占比过大/过小。 | 
| The image resolution is invalid, please make sure that the largest length of image is smaller than 7000, and the smallest length of image is larger than 400. | 上传图片大小不符合要求。 | 分辨率不得低于400*400。 分辨率不得高于7000*7000。 | 
| The value of the image is invalid, please upload other clearer image. | 上传图片过暗不符合要求。 | 请确保图片中人脸清晰。 | 
| The pose of the detected person is invalid, please upload other image with the front view. | 上传图片中人物背身不符合要求。 | 请确保图片中人物正面朝向镜头。 | 
| The pose of the detected face is invalid, please upload other image with whole face. | 上传图片中人物面部姿态不符合要求(要求面部可见)。 | 请确保图片中人脸完整无遮挡。 | 
| The pose of the detected face is invalid, please upload other image with the expected oriention. | 上传图片中人物面部姿态不符合要求(要求面部朝向无严重偏移)。 | 请确保图片中人脸朝向无偏斜。 | 
| The pose of the detected person is invalid, please upload other image with whole body, or change the ratio parameter to 1:1。 | 上传图片中人物姿态不符合要求(头像照要求头部完整可见,半身照要求髋部以上完整可见)。 | 请确保图片中人脸完整可见(针对1:1画幅) 请确保图片中人物上半身完整可见(针对3:4画幅)。 | 
状态码说明
大模型服务平台通用状态码请查阅:错误信息。
同时本模型还有如下特定错误码:
| HTTP返回码 | 错误码(code) | 错误信息(message) | 含义说明 | 
| 400 | InvalidParameter | The request is missing required parameters or in a wrong format, please check the parameters that you send. | 入参格式不对。 | 
| 400 | InvalidParameter.Ratio | The request parameter is invalid, please check the request parameter. | 画幅入参不合规,可选"1:1"或"3:4"。 | 
| 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. | 输入图片下载失败,请检查网络或者输入格式。 | 
| 400 | InvalidFile.NoHuman | The input image has no human body. Please upload other image with single person. | 输入图片中没有人。 | 
| 400 | InvalidFile.MultiHuman | The input image has multi human bodies. Please upload other image with single person. | 输入图片中有多人。 | 
| 400 | InvalidFile.BodyProportion | The proportion of the detected person in the picture is too large or too small, please upload other image. | 上传图片中人物占比不符合要求。 | 
| 400 | InvalidFile.Resolution | The image resolution is invalid, please make sure that the largest length of image is smaller than 7000, and the smallest length of image is larger than 400. | 上传图片大小不符合要求。 | 
| 400 | InvalidFile.Value | The value of the image is invalid, please upload other clearer image. | 上传图片过暗不符合要求。 | 
| 400 | InvalidFile.FrontBody | The pose of the detected person is invalid, please upload other image with the front view. | 上传图片中人物背身不符合要求。 | 
| 400 | InvalidFile.FullFace | The pose of the detected face is invalid, please upload other image with whole face. | 上传图片中人物面部姿态不符合要求(要求面部可见)。 | 
| 400 | InvalidFile.FacePose | The pose of the detected face is invalid, please upload other image with the expected oriention. | 上传图片中人物面部姿态不符合要求(要求面部朝向无严重偏移)。 | 
| 400 | InvalidFile.FullBody | The pose of the detected person is invalid, please upload other image with whole body, or change the ratio parameter to 1:1。 | 上传图片中人物姿态不符合要求(头像照要求头部完整可见,半身照要求髋部以上完整可见)。 |