spoofsense-triton endpoints are optimised for speed and performance.
Walk through
Authentication
You will require x-api-key in order to use the API.
Contact kartikeya@spoofsense.com in case you do not already have it.
1. POST /antispoofing
Performs a Passive Liveness Check.
Detects all types of PAD attacks under ISO 30107 Level-2
2. POST /robust
Features a robust model trained to work under harsh environments - where the captured images might be of low quality. (tuned to work great on Digital Photo Replays, Printed Faces, etc.)
Request body
Response
Understanding the Response
Following table shows the API responses and behaviours in different cases
HTTP Code
Type of Image
Raw Output
200
Live Face
200
Spoof Face
200
No Face
200
Bad Input
413
Image Size > 10MB
model_output
model_output contains everything needed to check for facial liveness
"pred_idx" refers to the predicted class of the face and has two possible values:
"real": A Live Face
"spoof": A Spoof Face / Presentation Attack
"prob_real" refers to the probability of the face being "real" (live). A score above THRESHOLD means the face is "real". A score less than THRESHOLDmeans the face is "spoof". "prob_real" metric should be used for writing the liveness check logic in your app.
Default Thresholds
for /antispoofing: Default THRESHOLD is 0.55
for /robust: Default THRESHOLD is 0.50
Perform Liveness Check
THRESHOLD can be changed based on your requirements. A very high THRESHOLD is more strict, can cause more False Negatives (Real faces getting incorrectly classified as Spoofs). You can start with recommended default thresholds for both /antispoofing and /robust.