SecureGate Docs

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 review

Sensity 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

CheckDescription
LivenessDetermines if the image is a live capture vs. a photo of a photo, screen replay, or mask
DeepfakeDetects GAN-generated faces (StyleGAN, etc.) and face-swap manipulations
Face swapIdentifies if a face has been digitally swapped onto another body
ExplanationProvides spatial heatmaps showing which image regions triggered detection

Configuration

Deepfake detection is optional and configured per-tenant or per-event:

VariableDefaultDescription
SENSITY_API_KEY(required)Sensity API key (stored in KMS, never in env files)
SENSITY_ENABLEDfalseEnable deepfake analysis globally
DEEPFAKE_THRESHOLD0.5Score above which an image is flagged as manipulated
DEEPFAKE_ACTIONflagAction on detection: reject (block registration), flag (allow but alert)

Use Cases

ScenarioDeepfake Detection Role
Attendee registrationVerify submitted photo is a real face, not AI-generated
Live camera streamDetect presentation attacks (someone holding a phone with a photo)
VIP verificationHigh-security events require liveness + deepfake clear
Audit trailAll analysis results stored with the face record for compliance

On this page