Skip to content

ol1g3/distributed-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepFake Detection Project

Overview

A deep learning model for detecting deepfake images using MobileNetV1 architecture. This project aims to combat the growing threat of AI-generated fake media by providing a reliable detection system.

Why It's Important

Deepfakes pose significant challenges to digital trust and information authenticity. As AI technology advances, the ability to create convincing fake images and videos becomes more accessible, potentially leading to:

  • Misinformation campaigns
  • Identity theft
  • Reputational damage
  • Financial fraud

This project contributes to developing countermeasures against such threats.

Project Structure

├── data/
│   ├── train/            # Training images
│   ├── train_label.csv   # Training labels
│   ├── val/              # Validation images
│   └── val_label.csv     # Validation labels
├── model/
│   ├── dataset.py        # Dataset class implementation
│   ├── model.py          # Model architecture definition
│   └── train.py          # Training script
├── README.md      
├── Dockerfile
├── config.yaml
├── requirements.txt
└── submission.ipynb      # Original notebook

Dataset

This project is based on a Kaggle competition dataset. Due to the large size of the original dataset (25+ GB), I created a scaled-down version for development and testing purposes:

  • 1,000 training images
  • 1,000 validation images

This subset maintains the same structure and characteristics as the original dataset while being more manageable for development and experimentation.

Quick Start

  1. Install dependencies:
pip install -r requirements.txt
  1. Run training:
python model/train.py
  1. Using Docker:
docker build -t deepfake-detection .

# adjust the memory given to Docker
docker run --shm-size=2g deepfake-detection 

Kubernetes Configuration

The project includes Kubernetes deployment configuration in config.yaml with the following components:

Storage

  • PersistentVolume: 30Gi storage capacity with ReadOnlyMany access
  • PersistentVolumeClaim: Matching 30Gi claim for data storage

Deployment

  • Replicas: 4 distributed pods
  • Resources per pod:
    • GPU: 1 NVIDIA GPU
    • Memory: 4Gi
    • CPU: 2 cores
  • Data: Mounted from PVC at /app/data (read-only)

Usage

# Apply the configuration
kubectl apply -f config.yaml

# Check deployment status
kubectl get deployments deepfake-detection

Results

The model achieved the public accuracy score of 94.56%.

View the complete model implementation and results on Kaggle: Kaggle Submission

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published