臉部角度功能簡介

臉部角度服務可透過API [“head_pose_estimation”] 得知影像中人臉的角度。

傳送影像至臉部角度辨識服務

透過 [“head_pose_estimation“] 將人臉影像匯入,該辨識服務將回傳影像中人臉角度及座標。

HTTP方法與請求網址:

POST https://saas.intemotech.com/saasapi/detect

Content-type

application/form-data

請求from-data正文:

KEYVALUE
file匯入照片檔案 (image)
api_name[“head_pose_estimation”] (string)

cURL:

curl --location --request POST 'https://saas.intemotech.com/saasapi/detect' \
--header 'Authorization: Bearer <TOKEN>' \
--form 'api_name="[\"head_pose_estimation\"]"' \
--form 'file=@"/xxxx.png"'

辨識結果文本:

{
    "data": [
        {
            "head_pose_estimation": [
                {
                    "facebox": [
                        145,
                        71,
                        229,
                        155
                    ],
                    "pitch": -0.27650350390877426,
                    "roll": -3.0966831288542274,
                    "yaw": 0.14040711054919564
                },
                {
                    "facebox": [
                        293,
                        18,
                        367,
                        92
                    ],
                    "pitch": -0.42886965838744784,
                    "roll": -3.0558272707582783,
                    "yaw": -0.3558488671849557
                }
            ]
        }
    ],
    "states": "Sucessfully"
}

回傳欄位說明

欄位名稱欄位說明
head_pose_estimation臉部角度辨識
facebox人臉座標位置
pitch人臉繞y軸旋轉角度
yaw人臉繞z軸旋轉角度
top人臉yz平面上旋轉的角度
statesAPI呼叫成功、失敗
返回頂端