Image Deepfake Detection
Detect AI-generated and manipulated images including fake IDs, photoshopped documents, and synthetic profile pictures.
Image Deepfake Detection
Detect AI-generated images, photoshopped documents, and manipulated photos to prevent identity fraud and document forgery.
Common Attack Vectors
Fake ID Documents
Face Swap:
- Real ID document with different person's face pasted on
- Most common fraud type in identity verification
- Can be very convincing if done well
Template Forgery:
- Completely fabricated ID using templates
- AI-generated document with synthetic data
- May include AI-generated face photo
Photo Substitution:
- Original document with photo replaced
- Physical photo swap scanned
- Digital manipulation of photo area
AI-Generated Selfies
Synthetic Faces:
- Completely AI-generated person (doesn't exist)
- Generated by GANs (Generative Adversarial Networks)
- Often used to bypass face match checks
Face Swaps:
- Real person's face replaced with target's face
- Used to impersonate document holder
- Can fool basic face matching
Manipulated Documents
Data Changes:
- Altered dates of birth
- Changed names
- Modified addresses
- Fake document numbers
Photoshop Manipulation:
- Clone stamp to duplicate elements
- Content-aware fill to remove details
- Layer-based editing
2 Credits Per image analysis
Detection Capabilities
1. GAN Fingerprinting
Detect AI-generated images by identifying model-specific patterns.
How It Works:
- Different AI models (StyleGAN, ProGAN, DALL-E) leave unique "fingerprints"
- Analyze frequency domain for generation artifacts
- Detect unnatural color distributions
- Identify spectral patterns inconsistent with cameras
Accuracy: 96% for known GAN models
Detection Example:
{
"isDeepfake": true,
"manipulationType": "gan_generated",
"model": "StyleGAN2",
"confidence": 94,
"artifacts": [
"Spectral anomaly in high-frequency domain",
"Unnatural color distribution",
"Grid pattern artifacts (common in GANs)"
]
}2. Photoshop Detection
Identify images edited with photo manipulation software.
Detection Methods:
- Metadata Analysis: EXIF data inconsistencies
- Compression Artifacts: Double JPEG compression
- Clone Detection: Duplicated image regions
- Noise Inconsistency: Different noise patterns in regions
- Lighting Analysis: Inconsistent light sources
Example:
{
"isDeepfake": true,
"manipulationType": "photoshop_edit",
"confidence": 91,
"artifacts": [
"Clone stamp detected in photo area",
"Double JPEG compression around face",
"Inconsistent noise patterns",
"Lighting mismatch between face and background"
],
"editedRegions": [
{
"area": "photo_section",
"bbox": { "x": 120, "y": 80, "width": 180, "height": 220 },
"manipulation": "photo_replacement"
}
]
}3. Face Swap Detection
Detect when a face has been digitally replaced.
Detection Techniques:
- Blending Artifacts: Unnatural edges around face
- Lighting Inconsistency: Face lit differently than rest of image
- Resolution Mismatch: Face different resolution than background
- Skin Texture: Unnatural or inconsistent skin texture
- Face Landmarks: Distorted facial geometry
Common in:
- Fake ID documents
- Profile picture fraud
- Video call impersonation attempts
4. Screen Capture Detection
Detect when image is screenshot of another screen (not original photo).
Detection Signals:
- Moiré patterns (interference patterns from screen pixels)
- Screen bezels or UI elements visible
- Pixel grid patterns
- Lower resolution than expected
- Compression artifacts from screen capture
Why This Matters:
- Indicates user photographed another screen instead of real document
- Often means they don't possess physical document
- Common fraud technique
Image Quality Assessment
Before deepfake analysis, check image quality:
{
"quality": {
"resolution": { "width": 1920, "height": 1080, "score": 95 },
"sharpness": 88, // Blur detection
"lighting": 82, // Even lighting
"contrast": 90,
"colorBalance": 85,
"overallScore": 86
},
"issues": [
"Slight motion blur detected",
"Uneven lighting (shadow on left side)"
]
}Reject if:
- Resolution < 640x480
- Sharpness < 50 (too blurry)
- Overexposed (brightness > 240)
- Underexposed (brightness < 15)
Analysis Process
Step 1: Upload Image
const formData = new FormData();
formData.append('image', imageFile);
formData.append('analysisType', 'document'); // or 'selfie', 'generic'
const job = await fetch('/api/v4/deepfake/analyse', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`
},
body: formData
});
// Returns job ID
{
"jobId": "job_abc123",
"status": "processing"
}Step 2: Processing
Analysis Pipeline (2-5 seconds):
- Image preprocessing (resize, normalise)
- Quality assessment
- GAN fingerprint analysis
- Photoshop manipulation detection
- Face detection and analysis (if applicable)
- Metadata extraction and validation
- Final risk scoring
Step 3: Receive Results
GET /api/v4/deepfake/jobs/:jobId
{
"jobId": "job_abc123",
"status": "completed",
"image": {
"type": "document",
"filename": "id_card.jpg",
"size": "2.3 MB",
"resolution": "1920x1080"
},
"result": {
"isDeepfake": true,
"confidence": 94,
"manipulationType": "face_swap",
"riskScore": 88,
"recommendation": "reject"
},
"analysis": {
"ganFingerprint": {
"detected": false,
"confidence": 12
},
"photoshopEdit": {
"detected": true,
"confidence": 92,
"method": "face_replacement"
},
"faceSwap": {
"detected": true,
"confidence": 94,
"artifacts": [
"Blending artifacts around face boundary",
"Lighting inconsistency",
"Resolution mismatch"
]
},
"screenCapture": {
"detected": false
}
},
"metadata": {
"camera": "Unknown (stripped)",
"dateTime": "2024:01:10 14:32:10",
"software": "Adobe Photoshop 2023",
"gps": null
}
}Confidence Scores
| Score | Assessment | Recommendation |
|---|---|---|
| 90-100% | Highly likely deepfake | Reject immediately |
| 70-89% | Likely deepfake | Manual review |
| 40-69% | Uncertain | Enhanced checks |
| 0-39% | Likely authentic | Accept |
Common Deepfake Indicators
For ID Documents
- Clone stamp patterns: Duplicated texture in background
- Mismatched lighting: Face lit differently than document
- Inconsistent security features: Holograms that don't match template
- Font irregularities: Wrong font or size for document type
- Alignment issues: Photo not properly aligned in frame
- Edge artifacts: Unnatural edges around replaced photo
For Selfies
- Synthetic skin texture: Too smooth or artificially detailed
- Unnatural eyes: Asymmetric pupils, odd reflections
- Inconsistent hair: Hair blends unnaturally with background
- Facial distortions: Slight warping near face edges
- Background anomalies: Blurred or synthetic-looking background
- Color banding: Unnatural color gradients
Integration with Identity Verification
Automatic Deepfake Scanning
// Enable automatic deepfake check in verification workflow
{
"workflowType": "enhanced",
"enableDeepfakeCheck": true, // Adds deepfake scan
"deepfakeThreshold": 70 // Reject if confidence >= 70
}Workflow:
- User uploads ID document
- Document verified for authenticity
- Deepfake scan performed ← Automatic
- If deepfake detected → Reject or manual review
- If clean → Continue with face match
Manual Deepfake Scan
Trigger deepfake scan on existing images:
POST /api/v4/deepfake/scan-verification
{
"verificationId": "ver_xyz789",
"scanDocument": true,
"scanSelfie": true
}Limitations
Detection Accuracy
Current Performance:
- Known GAN models: 96%
- Photoshop edits: 93%
- Face swaps: 92%
- Overall: 94%
Challenges:
- Very high-quality deepfakes (professional editing)
- New/unknown AI models
- Subtle manipulations (small data changes)
- Low-resolution images (harder to detect artifacts)
False Positives
Common Causes:
- Heavy makeup or filters (Instagram/Snapchat)
- Professional photo retouching (legitimate)
- Lens distortion (wide-angle cameras)
- JPEG compression artifacts
Mitigation:
- Use confidence threshold (70%+)
- Manual review for 70-89% range
- Request new photo if uncertain
Best Practices
- Scan all documents - Even from trusted sources
- Set 70%+ threshold - Balance false positives vs. fraud
- Manual review uncertain cases - 70-89% confidence
- Request new photo if flagged - Legitimate users can easily retake
- Combine with liveness - Selfie + liveness prevents video replay
- Monitor false positive rate - Adjust threshold if too many legitimate rejections
- Keep models updated - New deepfake techniques emerge constantly
API Reference
Analyze Image
POST /api/v4/deepfake/analyse
// multipart/form-data
{
"image": File,
"analysisType": "document" | "selfie" | "generic",
"returnDetails": boolean // Include full analysis details
}
// Returns
{
"jobId": "job_abc123",
"status": "processing" | "completed" | "failed"
}Get Results
GET /api/v4/deepfake/jobs/:jobId
// Returns full analysis resultBatch Analysis
POST /api/v4/deepfake/batch
{
"images": [
{ "url": "https://...", "type": "document" },
{ "url": "https://...", "type": "selfie" }
]
}
// Returns array of job IDsPricing
| Image Type | Processing Time | Cost |
|---|---|---|
| Single image | 2-5 seconds | 2 Credits |
| Batch (10 images) | 10-20 seconds | Contact us |
| Batch (100 images) | 2-3 minutes | Contact us |
Next Steps
Ready to get started?
Start with our free plan. No credit card required.