文档

EMO图像检测API详情

更新时间:
一键部署

EMO-detect模型,用于确认输入的人物肖像图片是否符合EMO模型的规范。本文档介绍了该模型提供的图像检测能力的API调用方法。

模型概览

模型名

模型简介

emo-detect

emo-detect是一个特定的图像检测模型,用于检测输入的图片是否满足emo模型所需的人物肖像图片规范。

HTTP调用接口

功能描述

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

前提条件

作业提交接口调用

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-xxx

input.image_url

String

Body

需要检测的图像 URL

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

出参描述

字段

类型

描述

示例值

output.bbox_face

Array

算法检测到的人脸 bbox。

人脸检测框位置坐标(x1,y1,x2,y2),对应左上和右下两个点的坐标。

[10,20,30,40]

output.ext_bbox_face

Array

算法预测的人脸活动区域 bbox,推荐按此范围裁剪图像,作为EMO视频生成API的输入物。

人脸crop区域坐标(x1,y1,x2,y2),对应左上和右下两个点的坐标。

[10,20,30,40]

request_id

String

本次请求的系统唯一码

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

检查不通过原因

output.reason

原因说明

建议用户侧提示

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 6000, and the smallest length of image is larger than 224.

上传图片大小不符合要求

分辨率不得低于224*224

分辨率不得高于6000*6000

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 value of the image is invalid, please upload other clearer image.

图片过暗不符合要求

请确保图片中人脸清晰

请求示例

curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "<YOUR_MODEL>",
  "input": {
      "image_url":"http://xxx/1.jpg"
  },
  "parameters": {
  }
}'

响应示例(通过

{
    "output":{
        "bbox_face":[10,20,30,40], #人脸bbox
        "ext_bbox_face": [40,60,80,90], #人脸活动区域bbox,
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}

响应示例(不通过)

{
    "output":{
      "code": "",
      "message": "",
    },
    "usage":{
        "image_count":1
    },
    "request_id":"c56f62df-724e-9c19-96bd-308627cf5262"
}

状态码说明

大模型服务平台通用状态码请查阅:状态码说明

同时本模型还有如下特定错误码:

http 返回码*

错误码(code)

错误信息(message)

含义说明

400

InvalidParameter

The request is missing required parameters or in a wrong format, please check the parameters that you send.

入参格式不对

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.Content

The input image has no human body. Please upload other image with single person.

输入图片中没有人

400

InvalidFile.Content

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 6000, and the smallest length of image is larger than 224.

上传图片大小不符合要求

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.Value

The value of the image is invalid, please upload other clearer image.

图片过暗不符合要求

  • 本页导读 (1)