Frame Capture Guidelines¶
Best practices for capturing video frames to maximize liveness detection accuracy.
In plain terms
Capture frames from the camera; the count depends on your model (e.g. 10 for mixed-10-v2, 30 for mixed-30-v2). Use PNG format for best quality. Ensure good lighting, face centered, and head-and-shoulders framing. The better the capture conditions, the more accurate the result.
Recommendations¶
1. Frame count meets model minimum¶
The API requires at least the number of frames required by your model: 10 for mixed-10-v2, 30 for mixed-30-v2, 60 for mixed-60-v2, and so on. For predictable latency, send exactly that many. Capture at ~10 FPS. For mixed-10-v2, that's about 1 second of video.
2. Use PNG encoding¶
PNG is lossless and provides better accuracy than JPEG. The payload size is slightly larger but worth the trade-off.
3. Good lighting¶
Ensure the face is well-lit with even lighting. Avoid harsh shadows or backlighting.
Capture Timing¶
UI Feedback
Provide clear UI feedback during capture but keep it low friction. A subtle progress indicator works better than intrusive overlays.
Camera Positioning Checklist¶
Frontal face position (not angled)
Good, even lighting
Head and shoulders framing
Natural distance from camera
Relatively still during capture