Skip to content

Repository files navigation

๐Ÿ›ก๏ธ SPATIO-TEMPORAL DEEP LEARNING APPROACH FOR DEEPFAKE DETECTION

Python TensorFlow Flask OpenCV License

An AI-powered DeepFake Detection system capable of detecting manipulated images and videos using Deep Learning techniques. This project performs comparative analysis of multiple CNN-based architectures and implements a Flask web application for real-time prediction.


๐Ÿ“Œ Project Overview

Deepfake technology uses Artificial Intelligence and Deep Learning to generate highly realistic manipulated images and videos, making it increasingly difficult to distinguish fake content from authentic media.

This project proposes a Spatio-Temporal Deep Learning Framework that combines image-based and video-based deepfake detection using:

  • CNN
  • MobileNetV2
  • Xception
  • VGG16
  • CNN-LSTM Hybrid Model

The project evaluates model performance on HiDF and FaceForensics++ benchmark datasets and deploys the best-performing model through a Flask web application.


๐Ÿš€ Features

  • DeepFake Image Detection
  • DeepFake Video Detection
  • CNN-based Spatial Feature Extraction
  • CNN-LSTM based Spatio-Temporal Learning
  • Comparative Performance Analysis
  • Flask Web Application
  • Confusion Matrix
  • ROC Curve
  • Classification Report
  • Accuracy, Precision, Recall & F1 Score Evaluation

๐Ÿ–ฅ๏ธ Application Preview

image

๐Ÿ–ผ๏ธ Image Prediction

image image

๐ŸŽฅ Video Prediction

image image


๐Ÿ— Project Architecture

image

๐Ÿง  Deep Learning Models

  • CNN
  • MobileNetV2
  • Xception
  • VGG16
  • CNN + LSTM Hybrid

๐Ÿ“‚ Dataset

Due to GitHub's file size limitations, the datasets are not included in this repository.

You can download them from the following sources:

HiDF Dataset

๐Ÿ”— https://zenodo.org/records/16140829

FaceForensics++ Dataset

๐Ÿ”— https://www.kaggle.com/datasets/xdxd003/ff-c23

After downloading, place the datasets in the appropriate project directories before training.


๐Ÿ“Š Evaluation Metrics

The following metrics were used to evaluate model performance:

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

๐Ÿ’ป Technologies Used

Programming Language

  • Python

Deep Learning

  • TensorFlow
  • Keras

Computer Vision

  • OpenCV

Web Framework

  • Flask

Development Tools

  • Jupyter Notebook
  • Visual Studio Code

Version Control

  • Git
  • GitHub

๐Ÿ“ Project Structure

DeepFake_Detection_DeepLearning/
โ”‚
โ”œโ”€โ”€ static/
โ”œโ”€โ”€ templates/
โ”œโ”€โ”€ datasets/
โ”œโ”€โ”€ App.py
โ”œโ”€โ”€ extract_frames.py
โ”œโ”€โ”€ video_processing.py
โ”œโ”€โ”€ CNN_Training_HiDF_Dataset.ipynb
โ”œโ”€โ”€ DeepLearning_Model_HiDF_Dataset.ipynb
โ”œโ”€โ”€ DeepFakeModel_FaceForensics++_Dataset.ipynb
โ”œโ”€โ”€ EDA.ipynb
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ README.md

โš™๏ธ Installation

Clone the repository

git clone https://github.com/IAmBiswabhusan/DeepFake_Detection_DeepLearning.git

Move into the project

cd DeepFake_Detection_DeepLearning

Install dependencies

pip install -r requirements.txt

Run the Flask application

python App.py

Open your browser

http://127.0.0.1:5000/

๐Ÿ“ˆ Results

FaceForensics++

  • MobileNetV2 achieved the best overall performance for image detection.
  • CNN also demonstrated competitive accuracy.
  • Xception effectively detected subtle manipulation artifacts.
  • VGG16 showed comparatively lower performance.

HiDF

  • CNN achieved the highest accuracy among all evaluated models.
  • MobileNetV2 and Xception showed good generalization capability.

Video Detection

  • CNN-LSTM successfully combined spatial and temporal feature learning for deepfake video detection.

๐ŸŒ Flask Application

The web application allows users to:

  • Upload Images
  • Upload Videos
  • Detect whether the uploaded media is Real or Fake
  • Display prediction confidence

๐Ÿ”ฎ Future Improvements

  • Real-time DeepFake Detection
  • Explainable AI (Grad-CAM)
  • Transformer-based architectures
  • Audio DeepFake Detection
  • Multimodal DeepFake Detection
  • Cloud Deployment
  • GPU Optimization

๐Ÿ‘จโ€๐Ÿ’ป Author

Biswabhusan Mohapatra

MCA
School of Computer Science
Odisha University of Technology and Research (OUTR)

GitHub: https://github.com/IAmBiswabhusan


๐Ÿ“œ License

Copyright (c) 2026 Biswabhusan Mohapatra This project is intended for academic and research purposes.