Enterprise-grade, multi-modal AI content detection engine.
Catch ChatGPT essays, Midjourney images, Sora deepfakes, and ElevenLabs voice clones β all in one platform.
AI-generated content is everywhere β and existing detection tools are fragmented. Teachers juggle separate tools for text, images, and video. Students get falsely flagged. Deepfakes go undetected. There is no single platform that handles all modalities.
DetectAi solves this with a unified, multi-modal detection engine that analyzes text, images, video, and audio through a single API and dashboard.
DetectAi uses a Branch-and-Fuse architecture. Each media type is processed through an independent pipeline composed of specialized analysis branches. Branch outputs are fused into a single, calibrated confidence score.
graph TB
subgraph Client["π₯οΈ Frontend β React + Vite"]
UI[Landing Page / Dashboard]
Auth[Clerk Auth]
SEO[Programmatic SEO Engine]
end
subgraph Gateway["β‘ FastAPI Gateway β Azure App Service"]
direction TB
TextRouter["/detect/text"]
ImageRouter["/detect/image"]
VideoRouter["/detect/video"]
AudioRouter["/detect/audio"]
end
subgraph TextEngine["π Text Engine β 5 Branches"]
T1[RoBERTa Transformer]
T2[GPT-2 Perplexity]
T3[Stylometry Analysis]
T4[Sentence-BERT Embeddings]
T5[Humanization Detector]
TF[LightGBM Meta-Classifier]
end
subgraph ImageEngine["πΌοΈ Image Engine β 6 Branches"]
I1[ViT Deep Classifier]
I2[Error Level Analysis]
I3[FFT Spectral Analysis]
I4[EXIF Metadata Inspection]
I5[PRNU Sensor Noise]
I6[Statistical Heuristics]
IF[Weighted Confidence Fusion]
end
subgraph VideoEngine["π¬ Video Engine β 9 Branches"]
V1[ViT + DinoV2 Ensemble]
V2[Temporal Consistency]
V3[RAFT Optical Flow]
V4[MiDaS Depth Physics]
V5[CLIP Semantic Drift]
V6[FFT Spectral Score]
V7[PRNU Sensor Noise]
V8[Audio-Visual Sync]
V9[Codec Heuristics]
VF[9-Branch Weighted Fusion]
end
subgraph AudioEngine["ποΈ Audio Engine"]
A1[MFCC + Spectral Features]
A2[Calibrated Random Forest]
end
UI -->|HTTPS| Gateway
TextRouter --> TextEngine
ImageRouter --> ImageEngine
VideoRouter --> VideoEngine
AudioRouter --> AudioEngine
T1 & T2 & T3 & T4 & T5 --> TF
I1 & I2 & I3 & I4 & I5 & I6 --> IF
V1 & V2 & V3 & V4 & V5 & V6 & V7 & V8 & V9 --> VF
A1 --> A2
π Deep dive: See docs/architecture.md for full technical details on each branch.
| Feature | Description |
|---|---|
| π€ Text Detection | 5-branch ensemble (RoBERTa, perplexity, stylometry, embeddings, humanization) with LightGBM meta-classifier and per-sentence explainability |
| πΌοΈ Image Detection | 6-branch fusion (ViT, ELA, FFT, EXIF, PRNU, heuristics) with perceptual hash caching |
| π¬ Video Detection | 9-branch fusion (ViT, DinoV2, RAFT optical flow, MiDaS depth, CLIP semantic drift, temporal analysis) |
| ποΈ Audio Detection | Spectral feature extraction + calibrated Random Forest for voice clone detection |
| π Dashboard | Real-time scan results, history tracking, analytics charts |
| π Authentication | Clerk-powered OAuth with SSO support |
| π Dark Mode | Full dark/light theme support with smooth transitions |
| π SEO Engine | Programmatic long-tail SEO with Schema.org structured data and auto-generated sitemap |
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, Framer Motion, Recharts |
| Auth | Clerk |
| Backend | FastAPI, Python 3.11, Uvicorn |
| ML Models | PyTorch, HuggingFace Transformers (ViT, RoBERTa, DinoV2, RAFT, MiDaS, GPT-2) |
| Ensemble | LightGBM, scikit-learn (isotonic calibration) |
| Task Queue | Celery + Redis |
| Database | SQLite |
| Hosting | Azure App Service (B3), Vercel |
| CI/CD | GitHub Actions β Azure auto-deploy |
| Analytics | Vercel Web Analytics |
Click to expand directory tree
detectai/
βββ backend/ # FastAPI application
β βββ main.py # App entrypoint & router registration
β βββ text/ # Text detection module
β β βββ router.py # /detect/text endpoint
β β βββ engines/ # 5 detection branches
β β β βββ transformer.py # ββ RoBERTa classifier
β β β βββ perplexity.py # ββ GPT-2 perplexity scorer
β β β βββ stylometry.py # ββ Statistical text analysis
β β β βββ embeddings.py # ββ Sentence-BERT similarity
β β β βββ humanization.py # ββ Paraphrase detector
β β βββ ensemble/ # Meta-classifier & calibration
β β βββ explainability/ # Per-sentence attribution
β β βββ preprocessors/ # Chunking & language detection
β β βββ models/ # Serialized model artifacts
β βββ image/ # Image detection module
β β βββ router.py # /detect/image endpoint
β β βββ fusion.py # Weighted branch fusion
β β βββ tasks.py # Celery async tasks
β β βββ branches/ # 6 detection branches
β β βββ deep_classifier.py # ViT classifier
β β βββ ela.py # Error Level Analysis
β β βββ fft_cnn.py # FFT spectral analysis
β β βββ metadata.py # EXIF inspection
β β βββ prnu_residual.py # Sensor noise analysis
β β βββ advanced_heuristics.py
β βββ video/ # Video detection module
β β βββ router.py # /detect/video endpoint
β β βββ branches/ # 9 detection branches
β β βββ vit_ensemble.py # ViT + DinoV2
β β βββ temporal_consistency.py
β β βββ motion_physics.py # RAFT optical flow
β β βββ depth_physics.py # MiDaS depth estimation
β β βββ semantic_drift.py # CLIP embeddings
β β βββ fft_score.py
β β βββ prnu_score.py
β β βββ audio_physics.py
β β βββ advanced_heuristics.py
β βββ audio/ # Audio detection module
β β βββ router.py # /detect/audio endpoint
β β βββ tasks.py # Feature extraction & classification
β βββ database.py # SQLite connection manager
β βββ history.py # Scan history CRUD
β βββ models.py # Pydantic schemas
β βββ celery_app.py # Task queue config
β βββ Dockerfile # Container build
β βββ requirements.txt # Python dependencies
βββ frontend/ # React SPA
β βββ src/
β β βββ App.jsx # Router & providers
β β βββ pages/ # Page components
β β βββ components/ # Shared UI components
β β βββ config/seoConfig.js # Programmatic SEO configuration
β β βββ context/ # Theme provider
β β βββ lib/ # Utility functions
β βββ public/ # Static assets, sitemap, robots.txt
β βββ index.html # HTML entry point
β βββ vite.config.js # Vite build configuration
βββ docs/ # Technical documentation
β βββ architecture.md # System architecture deep-dive
β βββ api_reference.md # API endpoint reference
β βββ text_engine_architecture.md
βββ .github/workflows/ # CI/CD pipelines
β βββ azure-deploy.yml # Auto-deploy to Azure on push
βββ .gitignore
βββ CONTRIBUTING.md
βββ LICENSE # All Rights Reserved
βββ README.md # β You are here
- Python 3.11+
- Node.js 18+
- Git
git clone https://github.com/Harsh2o/detectai.git
cd detectaicd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Add your HuggingFace token
uvicorn main:app --reload --host 0.0.0.0 --port 8000The API will be live at http://localhost:8000/docs
cd frontend
npm install
cp .env.example .env.local # Configure API URL & Clerk keys
npm run devThe app will be live at http://localhost:5173
The backend auto-deploys via GitHub Actions. Every push to main triggers the workflow in .github/workflows/azure-deploy.yml.
# Deploys to: https://detectai-api-xxxxx.azurewebsites.netThe frontend auto-deploys via Vercel's GitHub integration. Connect your repo in the Vercel dashboard and set the following environment variables:
| Variable | Value |
|---|---|
VITE_API_URL |
Your Azure backend URL |
VITE_CLERK_PUBLISHABLE_KEY |
Your Clerk publishable key |
| Document | Description |
|---|---|
| Architecture | Full system architecture, engine details, and infrastructure |
| API Reference | Complete REST API endpoint documentation |
| Text Engine | Deep-dive into the text detection pipeline |
| Contributing | Development setup and contribution guidelines |
This project is licensed under All Rights Reserved β see the LICENSE file for details. You may view this code for educational purposes, but copying, deploying, or modifying it is strictly prohibited.
Built with β€οΈ by Harsh Gupta
Live Demo Β· API Docs Β· Report Bug Β· Request Feature
