安全帽辨識功能簡介

安全帽辨識服務,可透過 API ["helm_detection"] 辨識畫面中的人員是否配戴安全帽,並於 name 欄位回傳不同結果的字串,方便開發者介接更多應用。

  • 若有配戴安全帽,則會於 name 欄位回傳值為 helmet 的標籤。
  • 若沒配戴安全帽,則會於 name 欄位回傳值為 head 的標籤。

開始使用安全帽辨識

透過安全帽辨識 API 上傳相關影像,並用 ["helm_detection"] 請求辨識畫面中的安全帽物件,該 API 將回覆頭部(head)或安全帽(helmet)在畫面中的位置。

HTTP 方法與請求網址:

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

Content-type

application/form-data

請求 form-data 正文:

KEYVALUE
file匯入照片檔案 (image)
api_name["helm_detection"] (string)

cURL:

curl --location 'https://saasv2.intemotech.com/saasapi/detect' \
--header 'Authorization: Bearer <TOKEN>' \
--form 'file=@"/xxxx.jpg"' \
--form 'api_name="[\"helm_detection\"]"'

辨識結果文本:

{
    "data": [
        {
            "helm_detection": [
                {
                    "conf": 0.91455078125,
                    "name": "helmet",
                    "xywh": [
                        0.4266054928302765,
                        0.2561728358268738,
                        0.22018349170684814,
                        0.395061731338501
                    ]
                },
                {
                    "conf": 0.86083984375,
                    "name": "head",
                    "xywh": [
                        0.7626146674156189,
                        0.13117283582687378,
                        0.18577980995178223,
                        0.26234567165374756
                    ]
                }
            ]
        }
    ],
    "states": "Sucessfully"
}

回傳欄位說明

欄位名稱欄位說明
helm_detection安全帽辨識
conf信心值:0~1分(信心值越高代表越準確)
namehelmet=安全帽
head=頭部(表示沒戴安全帽)
xywh辨識到的物件座標
statesAPI 呼叫是否成功
返回頂端