A Deepfake Video Analyzer
Detecting deepfake-based cyber threats using deep learning and web deployment
Face Sure is a deepfake detection system designed to identify manipulated videos that pose cyber-security threats such as identity impersonation, misinformation, and social engineering attacks.
The project focuses on video-level deepfake detection, combining:
- A deep learning model trained on the FaceForensics++ dataset
- A real-time, web-based interface for video analysis
- A deployment-ready pipeline suitable for practical cyber-defense use cases
- Detect deepfake videos instead of isolated images
- Use a modern, efficient deep learning model
- Provide a user-friendly web interface for real-time analysis
- Bridge the gap between academic research and real-world deployment
- Dataset: FaceForensics++ (FF++) - C23 compression
- Content:
- Real videos
- Manipulated videos:
- DeepFakes
- Face2Face
- FaceSwap
- FaceShifter
- NeuralTextures
- Industry-standard benchmark for deepfake research
- Realistic compression similar to social media platforms
- Widely used in foundational deepfake detection papers
⚠️ Note:
Instead of extracting and cropping faces manually, this project uses an already face-cropped version of the FaceForensics++ Dataset, significantly reducing preprocessing complexity while maintaining dataset integrity.
- EfficientNet-B0
- High accuracy with low computational cost
- More efficient than older architectures (e.g., XceptionNet)
- Suitable for real-time inference and web deployment
- Proven performance in recent deepfake detection research
The model is trained as a 6-class classifier:
- Deepfakes
- Face2Face
- FaceShifter
- FaceSwap
- NeuralTextures
- Original
A final binary decision (Real vs Fake) is derived at video level using probability aggregation.
⚠️ Note: The training notebook is structured to support multiple architectures, but only EfficientNet-B0 was fully trained, evaluated, and deployed in this implementation.
- Accuracy
- Precision
- Recall
- Confusion Matrix
Since real-world attacks occur via videos, the system performs:
- Frame sampling from uploaded video
- Frame-wise model prediction
- Probability aggregation across frames
- Final decision using:
The Face Sure web application is deployed online and can be accessed directly without any local setup.
Visit the live application using the link above.
You will see:
- Face Sure branding
- Detection controls (sliders)
- Video upload section
No login or installation is required.
- Upload up to 5 videos at a time
- Supported formats:
- MP4
- AVI
- MOV
- MKV
You can upload:
- Your own custom videos
- Sample videos from this repo
- Videos from the FaceForensics++ 23 Dataset
Each uploaded video will be displayed on the left side of the interface.
Before analysis, you can adjust the detection parameters:
-
Segment Duration (seconds)
Controls how long each video segment is analyzed. -
Frames Per Second (FPS)
Controls how many frames are sampled per second. -
Fake Confidence Threshold
Determines the sensitivity of fake vs real classification.
These settings allow users to balance speed and accuracy.
Once a video is uploaded, the system automatically:
- Samples frames from the video
- Detects faces using MTCNN
- Runs EfficientNet-B0 inference on each face
- Aggregates predictions across frames
- Produces a video-level decision
No manual action is required after upload.
For each uploaded video, the results are shown on the right side:
- Video Title (e.g., Video 1: example.mp4)
- Final Decision
- REAL ✅
- FAKE 🚨
- Fake Score
- Runtime
- Class-wise confidence visualization
The Fake Score is calculated as:
Fake Score = 1 − P(Original)
A higher fake score indicates a higher likelihood of manipulation.
-
REAL
The video is likely authentic. -
FAKE
The video shows signs of deepfake manipulation.
The per-class confidence bars provide insight into which manipulation type the model finds most likely.
Face Sure is designed for:
- Cyber-security awareness
- Deepfake threat analysis
- Educational and research demonstrations
- Practical deployment scenarios
It emphasizes video-level detection, which better reflects real-world cyber threats compared to frame-only approaches.
- Performance depends on video quality and face visibility
- Heavily occluded or low-resolution faces may reduce accuracy
- The current deployment uses EfficientNet-B0 only
- Explainability (Grad-CAM) is planned but not yet integrated
🚦 N.B: The trained model, notebooks, and supplementary documents are not included in this repository. If you want the files, contact me anytime.
Using Face Sure is simple:
- Open the live website
- Upload videos
- Adjust settings (optional)
- View real-time deepfake detection results
The system runs fully online and requires no local configuration.
