Skip to content
/ Sherlock Public

Multi modal deepfake detection system using FastAPI, PyTorch, and a Cloudflare Workers edge gateway, with a Next.js dashboard.

Notifications You must be signed in to change notification settings

obsTR/Sherlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🕵️‍♂️ SHERLOCK: Deepfake Detection System

Sherlock Banner

Python PyTorch FastAPI Next.js Cloudflare Workers License

Advanced Multi-Modal Deepfake Detection secured by Edge Computing.

Report Bug · Request Feature


⚡ Overview

Sherlock is a state-of-the-art cybersecurity platform designed to detect synthetic media manipulation. By combining Visual Artifact Analysis (EfficientNet) with Audio Spectral Analysis (MFCC/CNN), Sherlock provides a robust defense against deepfakes.

The system is built with a Security-First architecture, featuring an Edge Gateway that sanitizes and validates requests before they reach the core inference engine.

🚀 Key Features

Feature Description
👁️ Multi-Modal Detection Analyzes both Video (visual artifacts) and Audio (voice synthesis) concurrently.
🛡️ Edge Security Protected by a Cloudflare Worker gateway that handles Auth, Rate Limiting, and Validation.
⚡ Real-Time Inference Optimized PyTorch pipeline delivering sub-second frame analysis.
📊 Cyber Dashboard Modern, dark-mode React/Next.js interface for visualization and reporting.
🔍 Explainable AI Provides confidence scores for both visual and audio components.

🏗️ Architecture

sherlock_flow

🛠️ Technology Stack

Frontend (Command Center)

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS, Framer Motion
  • Theme: Cyberpunk / Dark Mode

Edge (Security Layer)

  • Platform: Cloudflare Workers
  • Language: TypeScript
  • Functions: JWT Verification, Rate Limiting

Backend (The Brain)

  • Framework: FastAPI
  • ML Core: PyTorch, TorchVision, Torchaudio
  • Processing: OpenCV, Librosa, NumPy

🏁 Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • FFmpeg (Installed and in system PATH)

1. 🧠 Start the Backend (ML Engine)

cd backend
pip install -r requirements.txt
python app/main_api.py

Server will start on http://localhost:8000

2. 🛡️ Start the Edge Gateway

cd edge
npm install
npx wrangler dev

Gateway will start on http://localhost:8787

3. 💻 Start the Frontend Dashboard

cd frontend
npm install
npm run dev

UI will be available at http://localhost:3000


🧪 Usage & Testing

You can test the full pipeline using the included integration script or the Web UI.

Option A: Web UI

  1. Open http://localhost:3000.
  2. Drag & Drop a video file (MP4/AVI).
  3. Click ANALYZE MEDIA.

Option B: CLI Test

# Generates a dummy video and sends it through the pipeline
python integration_test.py

📂 Project Structure

Sherlock/
├── 📂 backend/             # Python ML Engine
│   ├── 📂 app/             # Application Code
│   │   ├── 📂 core/        # Detection Logic
│   │   ├── 📂 services/    # Model & Processor Services
│   │   └── 📂 api/         # FastAPI Endpoints
│   └── main_api.py         # Entry Point
│
├── 📂 edge/                # Cloudflare Worker
│   ├── 📂 src/             # Worker Logic (Auth/Proxy)
│   └── wrangler.toml       # Edge Config
│
└── 📂 frontend/            # Next.js Dashboard
    ├── 📂 components/      # React UI Components
    └── 📂 app/             # Pages & Layouts

📜 License

Distributed under the MIT License. See LICENSE for more information.


Built for the future of Cybersecurity.
Developed with ❤️ by Onur Kolay

About

Multi modal deepfake detection system using FastAPI, PyTorch, and a Cloudflare Workers edge gateway, with a Next.js dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published