Skip to content

SRILSHUKLA/DEEP_DEFEND

Repository files navigation

DeepDefend - Advanced Deepfake Detection Platform

DeepDefend Logo

DeepDefend is a cutting-edge web application designed to detect and report deepfake content using advanced AI technology. The platform provides real-time analysis of images and videos, helping users identify manipulated media with high accuracy.

Features

  • 🔍 Advanced Deepfake Detection

    • Real-time analysis of images and videos
    • High-accuracy detection using state-of-the-art AI algorithms
    • Support for multiple media formats (PNG, JPG, MP4)
  • 🎯 Comprehensive Search

    • Search for similar deepfake content across the internet
    • URL-based search functionality
    • Advanced filtering and sorting options
  • 📊 Detailed Analysis

    • Confidence scores for detected manipulations
    • Frame-by-frame analysis for videos
    • Facial landmark detection
    • Voice pattern analysis
  • 🚨 Reporting System

    • Direct reporting to relevant authorities
    • Batch reporting capabilities
    • Detailed evidence compilation
    • Support for multiple reporting channels
  • 🎨 Modern UI/UX

    • Responsive design
    • Real-time loading animations
    • Interactive visualizations
    • Dark mode interface

Tech Stack

  • Frontend

    • React.js
    • TypeScript
    • Tailwind CSS
    • Framer Motion
    • Lucide Icons
  • Backend

    • Python
    • Flask
    • PyTorch
    • OpenCV
    • Gunicorn

Getting Started

Prerequisites

  • Python 3.10+
  • pip

Installation

  1. Clone the repository:

    git clone https://github.com/SRILSHUKLA/DEEP_DEFEND.git
    cd DEEP_DEFEND
  2. Create and activate virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up environment variables:

    Create a .env file in the root directory with the following variables:

    cp .env.example .env
    # Edit .env with your configuration

    See the Environment Variables section below for details.

Running the Application

  1. Start the server:

    python app.py
  2. Open your browser and navigate to http://localhost:5002

Environment Variables

The following environment variables need to be configured in your .env file:

Required Variables

Variable Description How to Obtain
GOOGLE_API_KEY Google Cloud API key for Custom Search and YouTube Data APIs 1. Go to Google Cloud Console
2. Create a new project or select existing one
3. Enable "Custom Search API" and "YouTube Data API v3"
4. Go to "Credentials" and create an API key
GOOGLE_CSE_ID Google Custom Search Engine ID 1. Go to Programmable Search Engine
2. Create a new search engine
3. Copy the Search Engine ID
VIMEO_TOKEN Vimeo API access token 1. Go to Vimeo Developer
2. Create a new app
3. Generate an access token with "Public" scope
FLASK_SECRET_KEY Secret key for Flask session encryption Generate a secure random string:
python -c 'import secrets; print(secrets.token_hex(32))'
DEFAULT_CREDENTIALS_PATH Path to Google Cloud Vision API credentials JSON file 1. In Google Cloud Console, go to "IAM & Admin" > "Service Accounts"
2. Create a service account
3. Enable "Cloud Vision API"
4. Create and download JSON key
5. Save as new_credentials.json in project root

Optional Variables

Variable Description Default Value
MAX_CONTENT_LENGTH Maximum file upload size in bytes 16777216 (16MB)
PORT Server port number 10000
GOOGLE_CSE_ID Google Custom Search Engine ID 8526bb01ab72c4115

Example Configuration

# Required API Keys
GOOGLE_API_KEY=AIzaSyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GOOGLE_CSE_ID=8526bb01ab72c4115
VIMEO_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Flask Configuration
FLASK_SECRET_KEY=your_secure_random_secret_key_here

# File Upload Configuration
MAX_CONTENT_LENGTH=16777216

# Google Cloud Vision Credentials
DEFAULT_CREDENTIALS_PATH=new_credentials.json

# Server Configuration
PORT=10000

Important Notes

  • Never commit your .env file or credentials JSON file to version control
  • Keep your API keys and tokens secure
  • Regenerate keys immediately if they are exposed
  • For production deployment, set these as environment variables in your hosting platform

API Documentation

The API is available at http://localhost:5002 with the following endpoints:

  • POST /api/search - Search for deepfake content
  • POST /api/analyze - Analyze uploaded media

Deployment

The application can be deployed on Render:

  1. Fork this repository
  2. Create a new Web Service on Render
  3. Connect your repository
  4. Set environment variables
  5. Deploy!

Contributing

We welcome contributions! Please read our Contributing Guidelines for details on how to submit pull requests, report issues, and contribute to the project.

License

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

Contact

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors