Face-swap detection
Spots identity transplants from FaceSwap-family models — even when blending boundaries are smoothed.
FaceSwap test clip · 97 % p(fake)
Veridex extracts faces, runs them through a fine-tuned hybrid CNN-LSTM, and returns a calibrated REAL / FAKE verdict for any short clip — entirely on your machine, no upload to third parties.
No file is sent to a third-party server. Inference runs locally against the Flask backend on your machine.
Sample upload
clip_001.mp4 · 6.3 MB
32 frames · 30 fps · 224×224 face crops
Result
99.27 % probability fake · threshold 0.575
Confidence 99.27 %
0.0 %
Test accuracy
0.000
ROC-AUC
0
Videos in study set
0
Face frames per video
The model was trained against deepfakes, face-swaps, reenactments, and neural-texture synthesis — and calibrated so the real class isn't drowned out by the 4-to-1 fake skew in the dataset.
Spots identity transplants from FaceSwap-family models — even when blending boundaries are smoothed.
FaceSwap test clip · 97 % p(fake)
Catches Face2Face-style mouth-and-pose puppeteering by exploiting temporal artefacts across frames.
Face2Face test clip · 99 % p(fake)
Detects neural-rendered textures even when single-frame artefacts are imperceptible to the human eye.
NeuralTextures test clip · 95 % p(fake)
Calibrated threshold prevents over-flagging — real videos get a confident REAL label without retraining.
Untouched test clip · 0.4 % p(fake)
The whole pipeline lives on your machine — feature extraction, face detection, model inference. No third-party API, no upload anywhere.
Drag a short video into the detector, or click to pick. mp4, mov, mkv, webm and avi up to 50 MB.
32 evenly-spaced frames are pulled from the video and passed through MTCNN to locate and crop a single face per frame.
The fine-tuned ResNet-50 backbone produces a 2 048-d feature per face; a BiLSTM aggregates the temporal sequence into one logit.
The logit is compared to the val-tuned threshold (0.575). You get a label, confidence, frame counts, and timing — all in JSON.
Most deepfake demos either hide behind an opaque API or quote accuracy figures without context. Veridex is built the other way: metrics are surfaced, threshold choices are explained, and you can retrain the whole thing on a laptop.
Decision threshold tuned on validation for macro-F1 — not a stock 0.5 — so the imbalanced class doesn't dominate.
Real-class recall is 73 % at the deployed threshold — we report it, alongside the rest, on the About page.
Uploads stay on your machine. The Flask backend runs the model on CPU and deletes the file after each prediction.
Three scripts to retrain end-to-end on the same hardware: extract → train head → evaluate. Documented step-by-step.
Bad uploads — wrong type, no faces, too short — return JSON error codes the UI renders inline. No mystery crashes.
Every line of model, training, and frontend code is in the repo under MIT. Nothing is hidden behind an SDK.
If something is missing here, the README and the engineering docs in the repo have a deeper trace of the design decisions.
A 1 000-video subset of FaceForensics++, split 700 / 150 / 150 across train, val, and test. The fake class spans deepfakes, face2face, faceswap, and neuraltextures manipulations. Real videos come from the FaceForensics++ originals split.
Generalisation to unseen manipulations is a known weakness of any model trained on a single forgery family. Veridex was trained on four — if a new manipulation shares low-level statistics with one of them, the model often catches it. If it's a fundamentally different generation pipeline, expect lower confidence and higher error rates.
The dataset is 4 : 1 fake : real, with only 140 unique real training videos. WeightedRandomSampler and threshold calibration close most of the gap (real-recall is 73 % at the deployed threshold, up from 5.5 % at the default 0.5), but more real data is the only durable fix.
They stay on your machine. The Flask backend writes the file to a temp directory under app/static/uploads/, runs the model, and deletes the file on the way out. Nothing is sent to a third-party API.
About 15 seconds end-to-end on a 2-core 7th-gen i5 CPU — dominated by ResNet-50 forward over 32 face crops. On a GPU it would be sub-second; the model is loaded once at server startup, so there is no per-request load cost.
Yes. The repo's TRAINING_GUIDE walks through both the CPU path (cache features once, train just the head) and the GPU path (full end-to-end fine-tune on Colab) with exact commands.
No — and we say so on the About page. Veridex is a research demo. Predictions are probabilistic, real-recall is not 100 %, and the model has only been evaluated on FaceForensics++.