Skip to content

prathamc00/Deepfake-detection-usingAI

Repository files navigation

Deepfake Detection Web Application

A web-based AI-powered application for detecting deepfake content in images and videos.

Project Structure

├── frontend/                 # React TypeScript frontend
│   ├── src/
│   │   ├── components/      # React components
│   │   ├── services/        # API services
│   │   └── types/           # TypeScript type definitions
│   └── public/              # Static assets
├── backend/                  # FastAPI Python backend
│   ├── app/
│   │   ├── api/            # API endpoints
│   │   ├── services/       # Business logic services
│   │   ├── models/         # Data models
│   │   └── core/           # Core configuration
│   └── tests/              # Backend tests
├── shared/                   # Shared utilities and types
│   ├── utils/              # Common utilities
│   └── types/              # Shared type definitions
└── .github/workflows/        # CI/CD configuration

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ (for local development)
  • Python 3.11+ (for local development)

Quick Start with Docker

  1. Clone the repository
  2. Run the application:
    docker-compose up --build
  3. Access the application:

Development Setup

Backend Development

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

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

    pip install -r requirements.txt
  4. Run the development server:

    uvicorn app.main:app --reload

Frontend Development

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm start

Development with Docker

For development with hot reloading:

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build

Testing

Backend Tests

cd backend
pytest tests/ -v

Frontend Tests

cd frontend
npm test

Features

  • Upload and analyze images for deepfake detection
  • Upload and analyze videos with frame-by-frame analysis
  • AI-powered detection using ensemble models
  • Detailed analysis reports with confidence scores
  • Secure file handling with automatic cleanup
  • Real-time progress tracking
  • Responsive web interface

Technology Stack

Frontend:

  • React 18 with TypeScript
  • Material-UI for components
  • React Query for state management
  • Axios for API communication

Backend:

  • FastAPI for REST API
  • Celery for background processing
  • Redis for task queue
  • PyTorch/TensorFlow for AI models
  • OpenCV for video processing

Infrastructure:

  • Docker for containerization
  • GitHub Actions for CI/CD
  • Nginx for reverse proxy

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors