Skip to content

SanketP2003/AIVerifySnap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” AI Verify Snap

AI-Powered Deepfake Detection & Digital Forensics Platform

Java Python Node.js React License GitHub


🎯 Overview

AI Verify Snap is a state-of-the-art deepfake detection and digital forensics platform designed to verify the authenticity of digital media. As visual misinformation becomes increasingly sophisticated, this platform serves as your reliable defense against synthetic modifications, deepfakes, and manipulated imagery.

Key Capabilities

  • πŸ€– Advanced ML Detection β€” Dual-stream ResNet18 + ELA CNN fusion for accurate deepfake identification
  • πŸ”¬ Forensic Analysis β€” Error Level Analysis (ELA) to reveal hidden pixel-level inconsistencies
  • πŸ“Š Interactive Heatmaps β€” Visualize tampering artifacts with detailed heatmap overlays
  • πŸ” Reverse Image Search β€” Google Lens integration for cross-platform verification
  • πŸ“„ Detailed Reports β€” Generate downloadable forensic reports with full analysis
  • ⚑ Real-time Processing β€” Fast detection on GPU-accelerated infrastructure

πŸ—οΈ Tech Stack

Component Technology Purpose
Backend Spring Boot 3.2 + Java 21 REST API, Database, Business Logic
Frontend Next.js 14 + React 18 + TypeScript Web UI, Real-time Detection
ML Service FastAPI + PyTorch Deepfake Detection & ELA Analysis
Database PostgreSQL Detection History & User Management
GPU CUDA/PyTorch Accelerated ML Inference

πŸ“‹ Features

  • βœ… Upload & Analyze β€” Drag-and-drop image upload with instant analysis
  • βœ… Dual Detection Models β€” Custom AIVerifySnap model + HuggingFace SigLIP fallback
  • βœ… Error Level Analysis (ELA) β€” Forensic heatmap visualization
  • βœ… Reverse Image Search β€” Find similar images across the web via Google Lens
  • βœ… User Authentication β€” Secure sign-up and detection history tracking
  • βœ… Download Reports β€” Export forensic findings as PDF/JSON
  • βœ… Responsive UI β€” Works on desktop, tablet, mobile
  • βœ… Real-time Dashboard β€” Admin stats and monitoring

πŸš€ Quick Start

Prerequisites

  • Java 21 β€” Backend runtime
  • Python 3.10+ β€” ML service runtime
  • Node.js 18+ β€” Frontend tooling
  • PostgreSQL 13+ β€” Database
  • 4GB+ RAM, GPU recommended β€” For ML inference

Installation & Setup

1️⃣ Clone Repository

git clone https://github.com/SanketP2003/AIVerifySnap.git
cd AIVerifySnap

2️⃣ Environment Configuration

Copy env templates and fill in your secrets:

cp .env.example .env
cp ML_Service/.env.example ML_Service/.env
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

Key Environment Variables:

# ML Service
SERP_API_KEY=<your-serpapi-key>        # For reverse image search
HF_TOKEN=<your-huggingface-token>      # Optional, speeds model downloads

# Backend
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/aiverifysnap
SPRING_DATASOURCE_USERNAME=postgres
SPRING_DATASOURCE_PASSWORD=<your-db-password>
ML_SERVICE_URL=http://localhost:8000

# Frontend
NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_ML_URL=http://localhost:8000

3️⃣ Start Services

Terminal 1 β€” ML Service:

cd ML_Service
python -m pip install -r requirements.txt
python -m uvicorn main:app --reload --port 8000

Terminal 2 β€” Backend:

cd backend
./mvnw.cmd spring-boot:run
# or build then run:
./mvnw.cmd package -DskipTests
java -jar target/backend-0.0.1-SNAPSHOT.jar

Terminal 3 β€” Frontend:

cd frontend
npm install --legacy-peer-deps
npm run dev

4️⃣ Access Application

πŸ“ Project Structure

AIVerifySnap/
β”œβ”€β”€ backend/                  # Spring Boot REST API
β”‚   β”œβ”€β”€ src/main/java/...    # Java services, controllers, models
β”‚   β”œβ”€β”€ pom.xml              # Maven dependencies
β”‚   └── Dockerfile           # Docker image for backend
β”œβ”€β”€ frontend/                 # Next.js React web app
β”‚   β”œβ”€β”€ src/app/             # Pages and routes
β”‚   β”œβ”€β”€ src/components/      # React components
β”‚   β”œβ”€β”€ package.json         # Node dependencies
β”‚   └── Dockerfile           # Docker image for frontend
β”œβ”€β”€ ML_Service/              # FastAPI microservice
β”‚   β”œβ”€β”€ main.py              # FastAPI app & endpoints
β”‚   β”œβ”€β”€ model.py             # ML model architectures
β”‚   β”œβ”€β”€ utils.py             # ELA & preprocessing
β”‚   β”œβ”€β”€ requirements.txt     # Python dependencies
β”‚   └── Dockerfile           # Docker image for ML service
└── README.md                # This file

πŸ”Œ API Endpoints

Detection API

POST /api/detect
- Upload image and get deepfake detection
- Returns: verdict, confidence, ELA heatmap, forensic scores

POST /api/reverse-search
- Upload image for Google Lens reverse search
- Returns: visual matches, knowledge graph, metadata

User API

POST /api/users/signup
GET /api/users/history
DELETE /api/users/{id}

See Swagger UI for full API documentation.

πŸ› Troubleshooting

Issue Solution
ML Service crashes on import Run python -m uvicorn ML_Service.main:app from project root (not from ML_Service dir)
Reverse search returns 500 Set SERP_API_KEY environment variable with valid SerpAPI key
Frontend can't reach backend Ensure NEXT_PUBLIC_API_URL matches backend port (default: http://localhost:8080)
Database connection fails Verify PostgreSQL is running and credentials in .env are correct
GPU not detected in ML service Check CUDA installation and PyTorch GPU support: python -c "import torch; print(torch.cuda.is_available())"

πŸ“š Documentation

  • Backend: See backend/README.md for Spring Boot architecture
  • Frontend: See frontend/README.md for Next.js setup
  • ML Service: See ML_Service/ for model training & inference details

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License β€” see LICENSE file for details.


πŸ‘₯ Authors & Credits

  • Sanket Patil β€” Project Creator
  • Built with ❀️ for digital media verification

πŸ™ Acknowledgments

  • HuggingFace for SigLIP model
  • SerpAPI for reverse image search integration
  • PyTorch & TensorFlow community
  • Spring Boot & Next.js communities

⬆ back to top

Made with πŸ” for a safer, more trustworthy internet

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors