Inspiration

Face-swapped and AI-generated media is now easy to make and hard to judge by eye. Most detection tools return a bare "real" or "fake" with no sense of how sure they are and no explanation. We wanted a screening tool that is honest about uncertainty and shows what it based its answer on, for problem FT-02 (Deepfake & Synthetic Media Detection).

What it does

DeepShield AI checks video, images and voice recordings for signs of AI generation or manipulation, and can also check whether news outlets are reporting a claim.

  • Verdict with honesty built in: an animated gauge shows the synthetic score, the model's decision threshold and an amber Inconclusive band. Scores close to the threshold are not forced into real or fake.
  • Frame-by-frame chart: shows whether a few suspicious frames or the whole clip drove the result.
  • Evidence: the analyzed frame, plus Grad-CAM and the facial regions the model focused on when the EfficientNet checkpoints are present.
  • Downloadable report: JSON with the verdict, scores, thresholds, per-frame scores and the file's SHA-256 fingerprint.
  • Live status: the interface shows whether the server and each model are ready.

It is a screening aid, not proof, and the app and README say so.

How we built it

  • Frontend: React, Vite and Tailwind, redesigned during the hackathon with animated gauge, scanner effects, drag-and-drop upload, real upload progress and cancel.
  • Backend: FastAPI with PyTorch and Hugging Face Transformers.
  • Video pipeline: OpenCV samples frames (at most 48), dlib finds the face and its 68 landmarks, each face is cropped to 224 × 224 and scored, and the scores are averaged into one video score.
  • Models: a pretrained ViT classifier (prithivMLmods/Deep-Fake-Detector-v2-Model) for video and image, and a pretrained wav2vec2 classifier (MelodyMachine/Deepfake-audio-detection-V2) for voice. A previously trained EfficientNet-B4 + B5 ensemble is used automatically if its checkpoints are present.
  • Claim check: Google News RSS headlines compared with the claim using MiniLM sentence embeddings.

The decision rule is simple. With mean fake probability $p$ and threshold $t$, we report Inconclusive when $|p - t| < 0.10$.

Challenges we ran into

  • Missing model weights: our trained checkpoints were not available, so we built a fallback onto pretrained Hugging Face detectors, and made the app detect which models are loaded.
  • Misleading results: early image results labelled almost everything as fake. Cropping the face first, correcting phone-photo rotation and avoiding re-compression helped, and we added the Inconclusive band rather than hiding the uncertainty.
  • A frozen server: analysis blocked the whole backend, so the page showed "offline" mid-analysis. We made the endpoint non-blocking and the status check tolerant of slow replies.
  • Frames without faces: these were being scored as whole scenes, which skewed results. They are now skipped.
  • Speed on CPU: we cap frames per video so analysis stays quick on a laptop.

What we learned

  • A detector's accuracy on its training data says little about real-world files, so showing uncertainty matters as much as the score itself.
  • Explainability and honest wording make a result usable, not just a number.
  • Small details such as face cropping, image orientation and compression change detector output a lot.

Honest notes

  • The video, image and voice detectors in the demo are third-party pretrained models, not trained by us. Their published metrics are theirs, and the accuracy and F1 figures in our README apply only to our own EfficientNet ensemble.
  • The project began before the hackathon. During Neural Storm we rebuilt the frontend, extended the backend, added the fallback models, voice and claim checks, documentation and diagrams.
  • Screenshots 02–05 in the repository are UI previews with sample data.

What's next

  • Train and evaluate on our own labelled data and publish per-dataset results.
  • Score multiple faces per frame instead of the first one found.
  • Add a hosted demo and temporal-consistency checks across frames.

Built With

  • axios
  • dlib
  • efficientnet
  • fastapi
  • google-news-rss
  • grad-cam
  • hugging-face
  • javascript
  • librosa
  • lucide
  • opencv
  • python
  • pytorch
  • react
  • sentence-transformers
  • tailwindcss
  • transformers
  • uvicorn
  • vision-transformer
  • vite
  • wav2vec2
Share this project:

Updates

Submission history