Skip to content

This repository offers tools for detecting DeepFakes using a hybrid CNN–LSTM model. Explore the code to train and evaluate on popular datasets like DFDC and AvLips. 🐙✨

Notifications You must be signed in to change notification settings

hypga/deepfake_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

DeepFake Detection Pipeline

DeepFake Detection Python License

Overview

Welcome to the DeepFake Detection repository! This project provides a robust pipeline for detecting deepfake videos using advanced machine learning techniques. Built with PyTorch, our model combines the powerful ResNeXt-50 CNN backbone with an LSTM-based temporal encoder to achieve state-of-the-art performance.

Key Features

  • High Accuracy: Achieved 96.35% accuracy on the DFDC dataset and 99.67% on the AvLips dataset.
  • Modular Design: Easily extendable architecture for various deepfake detection tasks.
  • Real-time Processing: Efficient model architecture allows for real-time video analysis.
  • Comprehensive Evaluation: Rigorous testing ensures reliability and robustness.

Table of Contents

  1. Getting Started
  2. Installation
  3. Usage
  4. Datasets
  5. Model Architecture
  6. Results
  7. Contributing
  8. License
  9. Contact

Getting Started

To get started with the DeepFake Detection pipeline, you can download the latest release from our Releases page. Follow the installation instructions below to set up the environment and run the model.

Installation

Prerequisites

Make sure you have the following installed:

  • Python 3.8 or higher
  • PyTorch (version compatible with your system)
  • torchvision
  • Additional libraries as specified in the requirements.txt

Clone the Repository

Open your terminal and run the following command:

git clone https://github.com/hypga/deepfake_detection.git
cd deepfake_detection

Install Dependencies

Install the required Python packages:

pip install -r requirements.txt

Usage

To use the DeepFake Detection model, you can follow these steps:

  1. Prepare your video files for analysis.
  2. Run the detection script with the video path as an argument.

Example command:

python detect.py --video_path path/to/your/video.mp4

You can find additional options and configurations in the detect.py script.

Datasets

The model has been evaluated on the following datasets:

  • DFDC (DeepFake Detection Challenge): A large dataset with diverse deepfake videos.
  • AvLips: A dataset focused on lip-sync deepfake detection.

Both datasets provide a comprehensive benchmark for assessing model performance.

Model Architecture

The architecture combines two powerful components:

  1. ResNeXt-50 CNN Backbone: This convolutional neural network extracts spatial features from frames of the video.
  2. LSTM-based Temporal Encoder: This recurrent neural network processes the sequence of features over time, capturing temporal dependencies.

This fusion of CNN and LSTM allows the model to understand both the spatial and temporal aspects of deepfake videos, leading to higher accuracy.

Results

The model's performance is evaluated on the DFDC and AvLips datasets, yielding impressive results:

  • DFDC: 96.35% test accuracy
  • AvLips: 99.67% test accuracy

These results highlight the effectiveness of our approach in detecting deepfake content.

Contributing

We welcome contributions from the community. If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them.
  4. Push to your branch and submit a pull request.

Please ensure your code adheres to the existing style and includes appropriate tests.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or feedback, feel free to reach out:

Thank you for your interest in the DeepFake Detection pipeline! For the latest updates and releases, visit our Releases page.

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •