Skip to content

Repository files navigation

🎭 DeepVision AI

AI-Powered Deepfake Detection using Vision Transformers and Temporal Learning

Detecting AI-generated manipulated videos using Vision Transformers, Temporal Pooling, and Deep Learning.

Python PyTorch Torchvision CUDA License Status Research

πŸš€ Overview

DeepVision AI is an advanced deepfake detection framework that leverages Vision Transformers (ViT) and Temporal Feature Pooling to distinguish authentic videos from AI-generated manipulations.

Unlike conventional CNN-based detectors that analyze individual frames independently, DeepVision AI learns both spatial and temporal inconsistencies across video sequences, making it more robust against modern deepfake generation techniques.

The project is designed for:

  • πŸŽ“ Academic Research
  • πŸ“„ IEEE Publications
  • πŸ’Ό AI/ML Portfolio
  • 🧠 Computer Vision Research
  • πŸ”’ Media Authenticity Verification

✨ Features

  • βœ… Vision Transformer (ViT-B/16)
  • βœ… Temporal Feature Pooling
  • βœ… Video Sequence Learning
  • βœ… End-to-End Training Pipeline
  • βœ… Automatic Checkpoint Saving
  • βœ… CUDA GPU Support
  • βœ… Mixed Dataset Training
  • βœ… Evaluation Metrics
  • βœ… Confusion Matrix
  • βœ… ROC-AUC Analysis
  • βœ… Modular Architecture
  • βœ… Production Ready Codebase

🧠 Architecture

               Video Input
                     β”‚
                     β–Ό
          Frame Extraction
                     β”‚
                     β–Ό
            Face Detection
                     β”‚
                     β–Ό
          Face Alignment
                     β”‚
                     β–Ό
         Frame Sequence Builder
                     β”‚
                     β–Ό
          Vision Transformer
              (ViT-B/16)
                     β”‚
                     β–Ό
         Temporal Mean Pooling
                     β”‚
                     β–Ό
        Fully Connected Layers
                     β”‚
                     β–Ό
        Real  ←────────→  Fake

πŸ“‚ Project Structure

DeepVision-AI/
β”‚
β”œβ”€β”€ configs/
β”‚
β”œβ”€β”€ data/
β”‚
β”œβ”€β”€ outputs/
β”‚
β”œβ”€β”€ scripts/
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ training/
β”‚   β”œβ”€β”€ preprocessing/
β”‚   └── utils/
β”‚
β”œβ”€β”€ tests/
β”‚
β”œβ”€β”€ train.py
β”œβ”€β”€ evaluate.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ environment.yml
└── README.md

πŸ“Š Dataset

The model is trained on multiple publicly available deepfake datasets.

Dataset Purpose
FaceForensics++ Training
Celeb-DF v2 Training & Testing
DFDC Future Evaluation

The datasets contain:

  • Original Videos
  • DeepFake Videos
  • FaceSwap
  • Neural Manipulations

βš™οΈ Tech Stack

Programming

  • Python

Deep Learning

  • PyTorch
  • Torchvision

Computer Vision

  • OpenCV
  • facenet-pytorch

Model

  • Vision Transformer (ViT)

GPU

  • NVIDIA CUDA

Utilities

  • NumPy
  • Pandas
  • tqdm
  • YAML

πŸš€ Installation

Clone the repository

git clone https://github.com/Arvindhbabu/DeepVision-AI.git

cd DeepVision-AI

Create environment

conda env create -f environment.yml

conda activate deepvision-ai

Install dependencies

pip install -r requirements.txt

πŸ‹οΈ Training

python train.py --config configs/default.yaml

πŸ“ˆ Evaluation

python evaluate.py \
--config configs/default.yaml \
--checkpoint outputs/runs/<run>/best_model.pth

πŸ“Š Metrics

The framework evaluates using:

  • Accuracy
  • Precision
  • Recall
  • F1 Score
  • ROC-AUC
  • Confusion Matrix

🧩 Workflow

Raw Videos
      β”‚
      β–Ό
Frame Extraction
      β”‚
      β–Ό
Face Detection
      β”‚
      β–Ό
Sequence Generation
      β”‚
      β–Ό
Vision Transformer
      β”‚
      β–Ό
Temporal Pooling
      β”‚
      β–Ό
Classification
      β”‚
      β–Ό
Prediction

🎯 Applications

  • Fake News Detection
  • Digital Forensics
  • Social Media Verification
  • Cybersecurity
  • Law Enforcement
  • Election Integrity
  • Identity Protection
  • Journalism

πŸ“Œ Current Progress

  • βœ… Data Pipeline
  • βœ… Dataset Builder
  • βœ… Sequence Loader
  • βœ… Vision Transformer
  • βœ… Temporal Pooling
  • βœ… GPU Training
  • βœ… Evaluation Pipeline
  • 🚧 Performance Optimization
  • 🚧 IEEE Publication

πŸ“š Future Improvements

  • Spatial Attention
  • Temporal Attention
  • XAI Explainability
  • Grad-CAM Visualization
  • Multi-Dataset Benchmarking
  • Model Quantization
  • Real-Time Webcam Detection
  • REST API Deployment
  • Mobile Inference
  • ONNX Export

πŸ“„ Research Contributions

This project explores:

  • Vision Transformers for Deepfake Detection
  • Temporal Feature Aggregation
  • Video Sequence Representation Learning
  • Robust Binary Classification
  • Transfer Learning on Large Vision Models

🀝 Contributing

Contributions are welcome!

Feel free to:

  • Fork the repository
  • Create feature branches
  • Submit Pull Requests
  • Report Issues

πŸ“œ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Arvindh Babu V

Final Year B.Tech Artificial Intelligence & Data Science

Passionate about

  • Artificial Intelligence
  • Computer Vision
  • Deep Learning
  • Generative AI
  • MLOps

⭐ If you found this project useful, consider giving it a Star!

Made with ❀️ using Python, PyTorch and Vision Transformers

About

An explainable deepfake detection framework leveraging Vision Transformers (ViT), temporal pooling, and Grad-CAM for interpretable image and video forgery detection across benchmark datasets.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages