Skip to content

Face Detection

Detect all faces in an image. Returns bounding boxes, landmarks, quality scores, demographics, and liveness for each face.

POST /api/v1/detect
ParameterTypeRequiredDescription
imagefileYesImage file (JPEG, PNG)
Terminal window
curl -X POST http://localhost:8000/api/v1/detect \
-F "image=@photo.jpg"
{
"faces": [
{
"detection": {
"bbox": [120.5, 80.3, 280.7, 310.1],
"confidence": 0.997,
"face_size": 85.2,
"landmarks": [[145.2, 150.3], [220.1, 148.7], [185.5, 195.2], [152.3, 240.1], [215.8, 238.5]]
},
"quality": {
"overall_score": 82.5,
"face_size_px": 85.2,
"sharpness": 156.3,
"brightness": 132.0,
"contrast": 45.2,
"head_pose_ok": true,
"is_acceptable": true,
"reasons": []
},
"demographics": {
"age": 28,
"gender": "F"
},
"liveness": {
"is_live": true,
"score": 0.94
},
"has_embedding": true
}
],
"count": 1
}
FieldTypeDescription
detection.bbox[x1,y1,x2,y2]Bounding box coordinates
detection.confidencefloatDetection confidence 0-1
detection.face_sizefloatFace size in pixels
detection.landmarks[[x,y],...]5-point facial landmarks
quality.overall_scorefloatQuality score 0-100
quality.is_acceptableboolMeets minimum quality threshold
demographics.ageintEstimated age
demographics.gender"M"|"F"Estimated gender
liveness.is_liveboolReal face vs presentation attack
liveness.scorefloatLiveness confidence 0-1