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.
- π€ 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
| 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 |
- β 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
- 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
git clone https://github.com/SanketP2003/AIVerifySnap.git
cd AIVerifySnapCopy 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/.envKey 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:8000Terminal 1 β ML Service:
cd ML_Service
python -m pip install -r requirements.txt
python -m uvicorn main:app --reload --port 8000Terminal 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.jarTerminal 3 β Frontend:
cd frontend
npm install --legacy-peer-deps
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
- ML Service: http://127.0.0.1:8000
- API Docs: http://localhost:8080/swagger-ui.html
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
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
POST /api/users/signup
GET /api/users/history
DELETE /api/users/{id}
See Swagger UI for full API documentation.
| 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())" |
- Backend: See
backend/README.mdfor Spring Boot architecture - Frontend: See
frontend/README.mdfor Next.js setup - ML Service: See
ML_Service/for model training & inference details
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License β see LICENSE file for details.
- Sanket Patil β Project Creator
- Built with β€οΈ for digital media verification
- HuggingFace for SigLIP model
- SerpAPI for reverse image search integration
- PyTorch & TensorFlow community
- Spring Boot & Next.js communities
Made with π for a safer, more trustworthy internet