Deepfake Detection System Problem: Deepfake accessibility creates real risks—misinformation, iden...Deepfake Detection System Problem: Deepfake accessibility creates real risks—misinformation, iden...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Deepfake Detection System
Problem: Deepfake accessibility creates real risks—misinformation, identity fraud, digital trust erosion. I built a production-grade detector: fast, accurate, explainable, CPU-deployable.
Approach: Transfer learning with ResNet-50 (25.5M params, pre-trained ImageNet-1K V2). Rather than training from scratch on limited data, I leveraged rich hierarchical features that transfer exceptionally well to detecting artifact patterns (blending boundaries, color mismatches, compression artifacts).
Key Decisions:
Face-Centric Preprocessing: OpenCV DNN crops faces to 224×224, concentrating attention on artifact-rich regions (eyes, mouth, jawlines).
Custom Classification Head: Bottleneck design (2048→512→1) with Focal Loss, label smoothing, progressive unfreezing—prevents overfitting on ~4,000 Ciplab images.
Explainable AI: Custom Grad-CAM generates attention heatmaps showing exactly where the model detected artifacts.
Real-World Robustness: Trained on JPEG compression, Gaussian noise, blur augmentations to handle compressed video feeds.
Results:
AUC-ROC: 0.9424 | Accuracy: 87.25% | Precision/Recall: 87.27%/84.81%
Inference: <100ms per face on CPU
Live on Hugging Face Spaces (no GPU)
Tech: PyTorch, OpenCV, Albumentations, Gradio. Images, videos, live webcam—one codebase.
Demonstrates: End-to-end AI engineering with deliberate trade-offs (efficiency over raw accuracy), training discipline (Focal Loss, Cosine Annealing), and production-first thinking (CPU compatibility, interpretability, real-world robustness).
Post image
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started