全部產品
Search
文件中心

Alibaba Cloud Model Studio:EMO映像檢測API參考

更新時間:Dec 17, 2025

EMO-detect模型,用於確認輸入的人物肖像圖片是否符合EMO視頻產生模型的輸入規範。本文檔介紹了該模型提供的映像檢測能力的API調用方法。

重要

本文檔僅適用於“中國大陸(北京)”地區。如需使用模型,需使用“中國大陸(北京)”地區的API Key

模型概覽

模型名

模型簡介

emo-detect-v1

emo-detect-v1是一個特定的映像檢測模型,用於檢測輸入的圖片是否滿足emo模型所需的人物肖像圖片規範。

HTTP調用介面

功能描述

該模型用於檢測輸入的圖片是否滿足“EMO 視頻產生”所需的人物肖像圖片規範。

前提條件

輸入限制

  • 映像格式:格式為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

  • 需要檢測的映像URL。

  • 映像最小邊長≥400像素,最大邊長≤7000像素。

  • 格式支援:jpg、jpeg、png、bmp、webp。

說明

上傳檔案僅支援HTTP連結方式,不支援本地連結方式。

http://a/a.jpg

parameters.ratio

String

Body

希望檢測確認的畫幅,可選 "1:1"或"3:4"。預設值為"1:1"。

  • 1:1適用於頭像圖片。

  • 3:4適用於半身像圖片。

"ratio": "1:1"

出參描述

欄位

類型

描述

樣本值

output.check_pass

Bool

客戶提交的映像列表對應的檢查結果

"check_pass":true/false

output.face_bbox

Array

  • 演算法檢測到的人臉地區bbox,可將該值作為EMO視頻產生API的入參。

  • 人臉地區座標(x1,y1,x2,y2),對應左上和右下兩個點的座標。

[10,20,30,40]

output.ext_bbox

Array

  • 演算法預測的動態地區bbox,可將該值作為EMO視頻產生API的入參。該地區的寬高比與入參畫幅一致。

  • 動態地區座標(x1,y1,x2,y2),對應左上和右下兩個點的座標。

[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。

上傳圖片中人物姿態不符合要求(頭像照要求頭部完整可見,半身照要求髖部以上完整可見)。