A small backend route for a strict liveness signal.
The demo backend is intentionally plain: upload a face image, get a live probability, spoof probability, decision, thresholds, and timing metadata.
Example response
Applications should use `decision` and keep the score for logs/debugging.
{
"live_probability": 0.126435,
"spoof_probability": 0.873565,
"decision": "spoof",
"is_live": false,
"is_spoof": true,
"needs_manual_review": false,
"reject_threshold": 0.99,
"accept_threshold": 0.99,
"threshold_policy": "main_apcer1_threshold",
"model_variant": "apcer1",
"processing_ms": 12.46
}
Short sequence support
For a small burst of webcam frames, send repeated `frames` fields and set `aggregation` to `mean`, `median`, `min`, or `p10`. Stricter aggregations like `min` and `p10` make one suspicious frame lower the final score.
curl -X POST http://127.0.0.1:8000/api/liveness/predict/ \
-F frames=@frame1.jpg \
-F frames=@frame2.jpg \
-F aggregation=p10