GitHunt

DeepScan-AI

AI-powered DeepFake Detection using frame-by-frame video analysis

license last-commit top-language languages

Built with:

Next.js Tailwind CSS Node.js FastAPI TensorFlow Python Axios TypeScript React OpenCV Keras Express.js Multer Neural Networks



๐Ÿ“œ Table of Contents

๐Ÿ“– Overview

DeepScan-AI is a full-stack AI application for detecting deepfakes in videos. It leverages a custom-trained TensorFlow model to analyze individual frames and computes an overall verdict of authenticity.


๐Ÿ“ธ UI Screenshots


โœจ Features

โœ… Feature Description
๐ŸŽฅ Video Upload Drag & drop or browse to upload video
๐Ÿ“ธ Frame-by-Frame Scan Breaks video into frames and runs each through a trained model
๐Ÿง  Deep Learning Model TensorFlow CNN predicts manipulation score per frame
๐Ÿ“Š Final Verdict Displays averaged score with verdict: โœ… Authentic / โš ๏ธ Deepfake
๐ŸŒ Fully Responsive Tailwind-powered sleek and modern interface
๐Ÿš€ FastAPI + Express Lightweight backend infrastructure

๐Ÿง  Technology Stack

DeepScan-AI is built using a modular, full-stack architecture that combines modern web technologies with machine learning. Here's a breakdown of the stack:

๐ŸŒ Frontend

Technology Purpose
Next.js React-based framework for frontend pages
React Component-driven UI logic
Tailwind CSS Utility-first CSS for styling
Lucide Icons Clean, minimal icon set used in UI
Axios HTTP client for interacting with the API

๐Ÿ–ฅ๏ธ Backend (Upload & Routing)

Technology Purpose
Node.js Runtime environment
Express.js Upload route and form handling
Multer Middleware for handling file uploads

๐Ÿงช AI/ML Inference Engine

Technology Purpose
Python Core language for analysis pipeline
FastAPI Fast and lightweight API server
TensorFlow ML framework for deepfake detection
Keras High-level neural networks API (CNN model usage)
OpenCV Frame extraction and image processing

๐Ÿงฑ Infrastructure

  • Local Development using localhost:3000 (frontend), 4000 (upload), and 8000 (inference)
  • Modular Folder Structure: /client, /server, /analyzer for separation of concerns
  • REST API communication between services

๐Ÿ’ก The stack was chosen to maximize performance, maintainability, and ease of integration between modern web and AI tools.


๐Ÿง  How It Works

  1. Upload a video from the client.
  2. The Express server handles file saving.
  3. FastAPI backend extracts frames using OpenCV.
  4. Each frame is evaluated using a CNN deepfake model.
  5. The average of frame scores determines the authenticity verdict.
  6. Results are sent back to the frontend for display.

๐Ÿ“‚ Project Structure

DeepScan-AI/
โ”œโ”€โ”€ client/               # Next.js frontend
โ”‚   โ””โ”€โ”€ pages/
โ”‚       โ””โ”€โ”€ index.tsx     # Main UploadPage
โ”œโ”€โ”€ server/               # Node.js Express middleware
โ”‚   โ””โ”€โ”€ index.js
โ”œโ”€โ”€ analyzer/             # Python FastAPI + TensorFlow backend
โ”‚   โ”œโ”€โ”€ main.py
โ”‚   โ”œโ”€โ”€ mesonet.py
โ”‚   โ””โ”€โ”€ mesonet_model.h5  # Pretrained model
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .gitignore

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

Before getting started with DeepScan-AI, make sure you have the following installed:

  • Node.js (v18+)
  • npm or yarn
  • Python (3.8+)
  • pip and virtualenv

๐Ÿ› ๏ธ Installation

Follow these steps to set up the full DeepScan-AI stack on your machine:


๐Ÿ” 1. Clone the repository

git clone https://github.com/your-username/DeepScan-AI
cd DeepScan-AI

โš™๏ธ 2. Set up the Deepfake Analysis Backend (FastAPI + TensorFlow)

cd analyzer
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install fastapi==0.95.2 uvicorn==0.22.0 numpy==1.24.4 opencv-python==4.8.0.76 tensorflow==2.11.0 python-multipart==0.0.6 pydantic==1.10.13
uvicorn main:app --reload

The backend will start at: http://localhost:8000

๐ŸŒ 3. Start the Node.js Upload Server

cd ../server
npm install
node index.js

Upload server will run at: http://localhost:4000

๐Ÿ–ผ๏ธ 4. Start the Next.js Frontend

cd ../client
npm install
npm run dev

Frontend will be live at: http://localhost:3000

Contributing

๐Ÿง‘โ€๐Ÿ’ป Author

Built by Alexander Potiagalov