Face Detection
POST
/api/v1/face-detectionRequest
Body Params application/json
image_url
string
required
The face image url(heic、jpeg、jpg、png、webp) you want to detected.
Example
{
"image_url": "https://1250948203.rsc.cdn77.org/images/4435c59e-7fae-4a7c-acc2-9fbf56878acb.jpg"
}
Request samples
Responses
成功(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
faces
array [object {1}]
required
The detected face information array. The length of the array represents the number of detected faces, when no face is detected, faces is an empty array.
position
array [object {2}]
required
The coordinate information of the face. It includes 4 coordinate objects, each of which includes x and y coordinates, and the origin of the coordinates is in the upper left corner of the image. The 4 coordinate objects correspond to top-left, top-right, bottom-right, and bottom-left from top to bottom.
Example
{
"faces": [
{
"position": [
{
"x": 258,
"y": 70
},
{
"x": 566,
"y": 70
},
{
"x": 566,
"y": 428
},
{
"x": 258,
"y": 428
}
]
},
{
"position": [
{
"x": 139,
"y": 373
},
{
"x": 354,
"y": 373
},
{
"x": 354,
"y": 623
},
{
"x": 139,
"y": 623
}
]
}
]
}
Last modified: 5 个月前