Skip to content

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Video Forgery Detection with CNN-based Models

This repository demonstrates a research prototype for detecting AI-generated forgeries in videos and images.
The project is built entirely with public datasets and open-source tools, and is designed for educational and research purposes.
It does not contain any proprietary code, data, or deployment logic from any employer.


Background

The rise of AI-generated deepfakes poses new challenges for media authenticity.
This project explores a computer vision pipeline for detecting visual forgeries, focusing on image-based detection from video content.


Highlights

  • Model: CNN-based backbone (ResNet50 variant) fine-tuned on public datasets
  • Performance: Achieved ~90–95% F1-score on a benchmark dataset
  • Techniques:
    • t-SNE embedding visualization for feature analysis
    • Threshold tuning based on score distributions
    • ROC / PR curve evaluation
  • Tools: PyTorch, HuggingFace, OpenCV, Weights & Biases (for experiment tracking)
  • Application Scope: Research and academic exploration of video forgery detection

Pipeline Overview

  1. Data Preprocessing

    • Extract frames from .mp4 videos using parallelized frame extraction scripts
    • Detect and crop faces using open-source face detection models (e.g., MTCNN, MediaPipe)
  2. Model Training

    • Fine-tune a CNN-based backbone using HuggingFace Trainer API
    • Use W&B to log metrics, compare experiments, and tune hyperparameters
  3. Evaluation

    • Visualize learned embeddings with t-SNE (based on public/synthetic data) to identify clustering patterns
    • Adjust classification thresholds based on ROC and PR curve analysis

Repository Structure

File / Folder Description(Only put model training sample script)
model_training.ipynb CNN fine-tuning with HuggingFace Trainer API
requirements.txt Required Python packages

Disclaimer

This repository is an independent reimplementation for research demonstration.
All data is public or synthetic.
It does not include proprietary datasets, deployment scripts, or configurations from any employer.
Any similarity to real-world systems is coincidental.


Future Work

  • Evaluate on multiple public deepfake datasets (FaceForensics++, Celeb-DF, DFDC)
  • Explore ensemble architectures for improved robustness
  • Investigate temporal features for frame-sequence-based detection

About

CNN-based video forgery (deepfake) detection on public data, with embedding analysis and threshold tuning from ROC/PR curves.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages