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.
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).
Deepfake Detection System
Problem: Deepfake accessibility creates real risks—misinformation, identity fraud, digital trust erosion. I built a production-grad...