Deepfake Detection
Sensity API integration for liveness verification and face manipulation detection
Overview
SecureGate integrates with the Sensity API for deepfake and face manipulation detection. This provides an additional layer of identity assurance beyond standard face recognition — verifying that a presented face is a real, unmanipulated capture rather than a synthetic or tampered image.
How It Works
When deepfake detection is enabled for an event or tenant, uploaded face images are analyzed by the Sensity API before the face is registered or matched.
Face Image Upload
|
v
Ingest Service (face detection + quality filter)
|
v
Sensity API (deepfake analysis)
|
+-- Is this a real face? (liveness)
+-- Has this been manipulated? (GAN detection, face swap)
+-- Explanation data (which regions triggered)
|
v
Decision: accept / reject / flag for reviewSensity API Integration
The integration sends detected face crops to the Sensity API for analysis:
curl -X POST https://api.sensity.ai/v1/analyze \
-H "Authorization: Bearer $SENSITY_API_KEY" \
-F "image=@face_crop.jpg" \
-F "checks=deepfake,liveness"Response:
{
"is_real": true,
"deepfake_score": 0.03,
"liveness_score": 0.97,
"manipulations_detected": [],
"explanation": {
"regions": [],
"confidence": 0.97
}
}Analysis Types
| Check | Description |
|---|---|
| Liveness | Determines if the image is a live capture vs. a photo of a photo, screen replay, or mask |
| Deepfake | Detects GAN-generated faces (StyleGAN, etc.) and face-swap manipulations |
| Face swap | Identifies if a face has been digitally swapped onto another body |
| Explanation | Provides spatial heatmaps showing which image regions triggered detection |
Configuration
Deepfake detection is optional and configured per-tenant or per-event:
| Variable | Default | Description |
|---|---|---|
SENSITY_API_KEY | (required) | Sensity API key (stored in KMS, never in env files) |
SENSITY_ENABLED | false | Enable deepfake analysis globally |
DEEPFAKE_THRESHOLD | 0.5 | Score above which an image is flagged as manipulated |
DEEPFAKE_ACTION | flag | Action on detection: reject (block registration), flag (allow but alert) |
Use Cases
| Scenario | Deepfake Detection Role |
|---|---|
| Attendee registration | Verify submitted photo is a real face, not AI-generated |
| Live camera stream | Detect presentation attacks (someone holding a phone with a photo) |
| VIP verification | High-security events require liveness + deepfake clear |
| Audit trail | All analysis results stored with the face record for compliance |