Method detectFaces: find faces in a base64 image and return their boxes and landmarks.
POST/?method=detectFaces
- Takes: Image
- Passive: the target is not contacted
Send method detectFaces. The returned image identifier and one face object are passed to searchFace.
Request body (JSON) · 2ShowHide
method
detectFaces
image
Base64-encoded JPEG or PNG
Response fields · 6ShowHide
image
Identifier to pass to searchFace
x
Bounding box left
y
Bounding box top
width
Bounding box width
height
Bounding box height
lm1_x
Left eye x (lm1_y is y; lm2 right eye, lm3 nose, lm4 left mouth corner, lm5 right mouth corner)
curl -X POST 'https://search4faces.com/api/json-rpc/v1/?method=detectFaces' \
-H 'x-authorization-token: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","method":"detectFaces","params":{"image":"BASE64_JPEG_OR_PNG"},"id":"1"}'{
"image": "5eb16c3421dd32.08349177.jpg",
"faces": [
{
"x": 25,
"y": 37,
"width": 55,
"height": 67,
"lm1_x": 40,
"lm1_y": 55
}
]
}