cURL
请先获取 API Key 并配置为环境变量。
检测图像是否符合 EMO 视频生成模型的人物肖像图片规范
curl 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "emo-detect-v1",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251225/onmomb/emo.png"
},
"parameters": {
"ratio": "1:1"
}
}'{
"output": {
"check_pass": true,
"face_bbox": [
302,
286,
610,
593
],
"ext_bbox": [
71,
9,
840,
778
],
"humanoid": true
},
"usage": {
"image_count": 1
},
"request_id": "c56f62df-724e-9c19-96bd-xxxxxx"
}千问云 API Key。详见获取 API Key。
模型名称,固定为 emo-detect-v1。
输入图像参数。
显示子属性
待检测图像的公网可访问 URL。
图像要求:
<Tip>如需将本地图像上传获取临时 URL,请参考上传文件获取临时URL。</Tip>
请求唯一标识符,用于链路追踪和问题排查。
检测结果。
显示子属性
图像是否通过检测。true 表示图像符合 EMO 视频生成模型的人物肖像图片规范,false 表示不符合。
算法检测到的人脸区域坐标 [x1, y1, x2, y2],对应左上和右下两个点的坐标。可将该值作为 EMO 视频生成 API 的入参。检测通过时返回。
[
302,
286,
610,
593
]算法预测的动态区域坐标 [x1, y1, x2, y2],对应左上和右下两个点的坐标。该区域的宽高比与入参画幅一致。可将该值作为 EMO 视频生成 API 的入参。检测通过时返回。
[
71,
9,
840,
778
]检测到的对象是否为人像。true 表示检测到人像,false 表示未检测到人像。
检测未通过或请求失败时的错误码。检测通过时不返回此字段。
检测未通过或请求失败时的错误描述。检测通过时不返回此字段。
curl 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/face-detect' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "emo-detect-v1",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251225/onmomb/emo.png"
},
"parameters": {
"ratio": "1:1"
}
}'{
"output": {
"check_pass": true,
"face_bbox": [
302,
286,
610,
593
],
"ext_bbox": [
71,
9,
840,
778
],
"humanoid": true
},
"usage": {
"image_count": 1
},
"request_id": "c56f62df-724e-9c19-96bd-xxxxxx"
}