The problem
AI-generated face forgeries — deepfakes — now circulate in social feeds, messaging apps and even video calls, and the human eye is a poor detector of them. This is an academic study in media forensics: a convolutional neural network learns the subtle synthesis traces that manipulation methods leave behind — blending seams at the face boundary, inconsistent eye-region textures, and compression fingerprints. Students often stop at tutorials that classify MNIST digits; this project tackles a genuinely current problem on a real research dataset. The model is trained on FaceForensics++, the benchmark dataset from Rössler et al. (ICCV 2019) with 1,000 original videos manipulated by four methods, and evaluated with proper train/validation/test discipline. A forensic analyzer web demo makes the trained model tangible: feed it a face image and it reports a verdict with per-method probabilities and a heatmap of the regions the CNN weighed most.
An uploaded face photo or a synthetic sample from the demo gallery.
Follow the working sequence
How it works
- FaceForensics++ videos are downloaded (after signing the dataset's terms of use); every 4th frame is sampled from the 720 training, 140 validation and 140 test videos.
- A face detector extracts face boxes from each frame; each face is aligned by landmarks, cropped and resized to 299×299 — exactly the input the classifier expects.
- XceptionNet is initialized with ImageNet pre-trained weights, its head replaced with a 5-way softmax (authentic + 4 manipulation methods), and fine-tuned with categorical cross-entropy.
- Augmentation mirrors real conditions: random H.264 re-compression (c23/c40 levels), flips and small crops, so the model tolerates social-media-grade images.
- Training is monitored on the validation split with early stopping; the best checkpoint is kept for evaluation.
- The held-out test split is evaluated once: accuracy, per-class precision/recall/F1, ROC-AUC and a confusion matrix are generated for the report.
- In the forensic demo, an uploaded face goes through detection → alignment → the saved model → verdict, with class probabilities and a Grad-CAM heatmap rendered alongside.
Tech stack:
- Python 3, TensorFlow/Keras
- XceptionNet (ImageNet-pretrained, fine-tuned)
- OpenCV (frame extraction, preprocessing)
- MTCNN-style face detection
- Jupyter Notebook (training & evaluation)
- Grad-CAM (explanation visuals)
- HTML · CSS · JavaScript (forensic demo)
- FaceForensics++ dataset
Dataset & model details
- Dataset: FaceForensics++ (Rössler et al., ICCV 2019, TUM/CISPA; source https://github.com/ondyari/FaceForensics — access requires signing the dataset's terms of use). 1,000 original video sequences from 977 YouTube videos with trackable, mostly frontal faces; 4,000 manipulated videos — 1,000 each from DeepFakes, Face2Face, FaceSwap and NeuralTextures. Three compression levels: raw (c0), high quality (c23), low quality (c40). The paper's automated benchmark contains approximately 1.8 million manipulated images. Official split used: 720 train / 140 validation / 140 test videos.
- Task: 5-class frame classification; input = 299×299×3 aligned face crop, output = probability distribution over {Authentic, DeepFakes, Face2Face, FaceSwap, NeuralTextures}. Video-level score is the mean of its frame scores.
- Model: XceptionNet (depthwise-separable convolution architecture, approximately 22.9 million parameters) with ImageNet pre-trained weights, fine-tuned on face crops; global average pooling → dense layer → 5-way softmax. Grad-CAM applied to the last convolutional block for explanation visuals.
- Metrics: Frame-level and video-level accuracy, per-class precision/recall/F1, ROC-AUC, confusion matrix. All numbers are measured on the held-out test split during the training run and documented in the report; none are claimed in advance. Design target: approximately 90%+ video-level accuracy on the c23 split.
| Parameter | Value |
|---|---|
| Input | 299 × 299 aligned face crop (RGB, normalized) |
| Classes | 5 (authentic + 4 manipulation methods) |
| Model parameters | Approximately 22.9 million (XceptionNet, published architecture spec) |
| Training time | Approximately 2–4 hours on a single student-grade GPU (expected) |
| Inference | Approximately 30–60 ms per frame on GPU (expected) |
| Dataset access | Via FaceForensics terms-of-use form (approval by dataset organizers) |
| Demo | Single-file web app, runs offline after download |
Project features
- [XceptionNet frame classifier] A fine-tuned XceptionNet CNN takes a 299×299 face crop and outputs a 5-way decision — authentic, or one of the four FaceForensics++ manipulation methods — with per-class probabilities.
- [Face detection and alignment] An MTCNN-style face detector locates the face box and landmarks, crops and aligns the face so the classifier always sees the same normalized input it was trained on.
- [Grad-CAM explanation visuals] Activation heatmaps overlay the regions that drove the verdict (typically eyes, nose and blending boundary), giving the student a concrete explainability story for the viva.
- [Method attribution] Beyond real-vs-fake, the classifier distinguishes DeepFakes, Face2Face, FaceSwap and NeuralTextures — a harder task that demonstrates real depth.
- [Interactive forensic analyzer] A single-file web demo with upload support and synthetic sample faces, a four-stage pipeline walkthrough, verdict card, artifact checklist and heatmap view.
- [Full training notebook] Dataset download and frame extraction, preprocessing, ImageNet-pretrained fine-tuning, training loop, and evaluation — reproducible in one Jupyter notebook.
- [Honest evaluation report] Accuracy, per-class precision/recall/F1 and ROC-AUC measured on the official held-out test split; the report documents the achieved numbers, never pre-claimed ones.
- Optional customization: live-webcam detection mode and new-class fine-tuning can be developed on request — these are not in the base build.
What is included
- Complete training & evaluation Jupyter notebook (data loading to metrics)
- Trained XceptionNet classifier weights with preprocessing code
- Interactive forensic analyzer web demo (upload + synthetic samples)
- Grad-CAM explanation visuals and evaluation plots
- Project report PDF (background, dataset, architecture rationale, methodology, results)
- PPT presentation for final review
- Viva Q&A preparation document (CNNs, Xception, FaceForensics++, evaluation metrics)
Limitations & prerequisites
- FaceForensics++ is a research dataset of known manipulation methods — new or unknown generators (in-the-wild deepfakes) generalize poorly, a known limitation documented in the literature.
- Heavy compression (c40 level, common on messaging apps) measurably degrades detection; this is reported, not hidden.
- The face must be visible and roughly frontal — occluded faces, profiles and very small faces are out of scope.
- The model is an academic prototype, not a certified forensic tool: its verdicts must not be presented as legal evidence.
- Dataset access requires signing the FaceForensics terms of use; approval timing is outside the project's control.
- The browser demo illustrates the pipeline with simulated inference; real training happens in the notebook with a GPU.
- This is a dual-use technology — the project is for studying media forensics, not for building convincing forgeries.
Frequently Asked Questions
Which dataset is used and why?
FaceForensics++ — 1,000 original videos manipulated by four methods (DeepFakes, Face2Face, FaceSwap, NeuralTextures), with three compression levels. It is the standard academic benchmark for this task, so results are comparable against published literature, and its terms of use permit academic projects.
Which model is used and how is it trained?
XceptionNet, initialized with ImageNet pre-trained weights and fine-tuned on 299×299 face crops — the same detector family the FaceForensics++ authors used as their automated baseline. Training, validation and testing follow the official 720/140/140 video split.
Is the accuracy guaranteed?
No number is pre-claimed. The report documents the accuracy, per-class precision/recall/F1 and ROC-AUC measured on the held-out test split after training. The design target is approximately 90%+ video-level accuracy on the c23 split, stated as a target, not a promise.
Can it detect deepfakes from a live webcam?
Not in the base build — it classifies uploaded images. A live-camera mode can be developed as a customization, using the same model on sampled frames.
Can it detect new deepfake methods it wasn't trained on?
Only to a limited extent — detectors generalize poorly to unseen generators, a well-documented limitation of the field. The report discusses this honestly and lists cross-dataset evaluation as future scope.
Is this project suitable for a final-year project?
Yes — for Computer Science, IT and AI/ML programs. It demonstrates CNN architecture selection, transfer learning, dataset discipline, evaluation metrics and model explainability, all defensible in a viva.
Components & software requirements
- Python 3, TensorFlow/Keras
- XceptionNet (ImageNet-pretrained, fine-tuned)
- OpenCV (frame extraction, preprocessing)
- MTCNN-style face detection
- Jupyter Notebook (training & evaluation)
- Grad-CAM (explanation visuals)
- HTML · CSS · JavaScript (forensic demo)
- FaceForensics++ dataset
Dataset & model details
- Dataset: FaceForensics++ (Rössler et al., ICCV 2019, TUM/CISPA; source https://github.com/ondyari/FaceForensics — access requires signing the dataset's terms of use). 1,000 original video sequences from 977 YouTube videos with trackable, mostly frontal faces; 4,000 manipulated videos — 1,000 each from DeepFakes, Face2Face, FaceSwap and NeuralTextures. Three compression levels: raw (c0), high quality (c23), low quality (c40). The paper's automated benchmark contains approximately 1.8 million manipulated images. Official split used: 720 train / 140 validation / 140 test videos.
- Task: 5-class frame classification; input = 299×299×3 aligned face crop, output = probability distribution over {Authentic, DeepFakes, Face2Face, FaceSwap, NeuralTextures}. Video-level score is the mean of its frame scores.
- Model: XceptionNet (depthwise-separable convolution architecture, approximately 22.9 million parameters) with ImageNet pre-trained weights, fine-tuned on face crops; global average pooling → dense layer → 5-way softmax. Grad-CAM applied to the last convolutional block for explanation visuals.
- Metrics: Frame-level and video-level accuracy, per-class precision/recall/F1, ROC-AUC, confusion matrix. All numbers are measured on the held-out test split during the training run and documented in the report; none are claimed in advance. Design target: approximately 90%+ video-level accuracy on the c23 split.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and email — the synopsis PDF downloads immediately. We may send occasional project updates; no spam, unsubscribe anytime.