<<<<<<< HEAD
=======
7df14d1 (UI enhanced)
DeepShield AI for upload-first deepfake detection
A responsive web application for analysing image, video, and audio authenticity with a FastAPI backend and a modern React frontend.
<<<<<<< HEAD
=======
>>>>>>> 7df14d1 (UI enhanced)
<<<<<<< HEAD KAVACH-AI is a web-first deepfake detection platform built around one reliable user journey: upload, analyse, review, repeat.
Multimodal Deepfake Detection System Using Advanced Machine Learning Techniques is a web-first deepfake detection platform built around one reliable user journey: upload, analyse, review, repeat.
7df14d1 (UI enhanced)
The repository was cleaned and reorganized so the active application is easy to understand:
backend/contains the FastAPI service, validation, model loading, and image/audio/video pipelines.frontend/contains the responsive React application for upload, progress tracking, and result review.legacy/contains archived experiments and older realtime/dashboard code that are no longer part of the running product.
- Accepts image, video, and audio uploads.
- Validates file type and file size before analysis.
- Runs a weighted deepfake scoring pipeline.
- Returns a readable result with verdict, confidence, model breakdown, warnings, waveform data, and sampled video frames when available.
- Works as a fully web application. The Chrome extension path has been removed.
flowchart TB
subgraph Clients["Client Tier"]
Web["React Web App\nVite + Framer Motion + responsive UI"]
Mobile["Mobile / Tablet Browser\nSame web experience"]
end
subgraph Backend["FastAPI Service"]
Main["main.py\nCORS, lifespan, error handling"]
Health["routers/health.py"]
Analyse["routers/analyse.py"]
Schemas["schemas/request.py + response.py"]
end
subgraph Detection["Detection Core"]
Loader["models/loader.py\nstartup model registry"]
Ensemble["models/ensemble.py\nweighted voting"]
ImagePipe["pipelines/image_pipeline.py"]
VideoPipe["pipelines/video_pipeline.py"]
AudioPipe["pipelines/audio_pipeline.py"]
end
subgraph Support["Support Modules"]
Config["config.py"]
Files["utils/file_utils.py"]
Logger["utils/logger.py"]
end
Web --> Main
Mobile --> Main
Main --> Health
Main --> Analyse
Analyse --> Schemas
Analyse --> ImagePipe
Analyse --> VideoPipe
Analyse --> AudioPipe
ImagePipe --> Loader
VideoPipe --> Loader
AudioPipe --> Loader
Loader --> Ensemble
Main --> Config
Analyse --> Files
Main --> Logger
flowchart LR
A["User opens web app"] --> B["Upload media\nimage / video / audio"]
B --> C["Client validation\nsize + format + preview"]
C --> D["POST /analyse"]
D --> E["Server validation\nmime + size + temp file handling"]
E --> F{"Media type"}
F -->|Image| G["Image pipeline"]
F -->|Video| H["Video pipeline\nframe sampling + optional audio extraction"]
F -->|Audio| I["Audio pipeline"]
G --> J["Weighted scoring"]
H --> J
I --> J
J --> K["Verdict + confidence + warnings"]
K --> L["Results page\nmodel scores, waveform, frame grid"]
L --> M["Analyse another"]
.
+-- backend/
¦ +-- main.py
¦ +-- config.py
¦ +-- routers/
¦ +-- models/
¦ +-- pipelines/
¦ +-- schemas/
¦ +-- utils/
¦ +-- requirements.txt
¦ +-- Dockerfile
+-- frontend/
¦ +-- src/
¦ ¦ +-- api/
¦ ¦ +-- components/
¦ ¦ +-- hooks/
¦ ¦ +-- pages/
¦ ¦ +-- styles/
¦ +-- package.json
¦ +-- Dockerfile
+-- docs/
¦ +-- API.md
¦ +-- INSTALL.md
¦ +-- CODEBASE_DIAGRAM.md
¦ +-- assets/banner.png
+-- legacy/
¦ +-- backend/
¦ +-- frontend/
¦ +-- root-docs/
¦ +-- scripts/
+-- docker-compose.yml
- FastAPI
- Pydantic Settings
- Transformers
- Torch / Torchvision / timm
- OpenCV
- librosa / soundfile / scipy
- React
- Vite
- Framer Motion
- Tailwind CSS
- Axios
- Lucide Icons
- Primary startup path: Docker Compose
- Fallback path: Python venv + npm
- Environment bootstrapping via
.env.examplefiles
This is the fastest and most reliable way to run the project on a fresh system.
<<<<<<< HEAD
git clone https://github.com/abisheik687/kavach-ai.git
cd kavach-ai
=======
git clone https://github.com/abisheik687/Multimodal Deepfake Detection System Using Advanced Machine Learning Techniques.git
cd Multimodal Deepfake Detection System Using Advanced Machine Learning Techniques
>>>>>>> 7df14d1 (UI enhanced)cp .env.example .env
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envWindows PowerShell alternative:
Copy-Item .env.example .env
Copy-Item backend\.env.example backend\.env
Copy-Item frontend\.env.example frontend\.envdocker compose up --build- Web App:
http://localhost:4173 - Backend API:
http://localhost:8000 - API Docs:
http://localhost:8000/docs
Use this if you do not want Docker.
- Python 3.11+
- Node.js 20+
- npm
- ffmpeg
<<<<<<< HEAD
git clone https://github.com/abisheik687/kavach-ai.git
cd kavach-ai
=======
git clone https://github.com/abisheik687/Multimodal Deepfake Detection System Using Advanced Machine Learning Techniques.git
cd Multimodal Deepfake Detection System Using Advanced Machine Learning Techniques
>>>>>>> 7df14d1 (UI enhanced)cp .env.example .env
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envWindows PowerShell alternative:
Copy-Item .env.example .env
Copy-Item backend\.env.example backend\.env
Copy-Item frontend\.env.example frontend\.envpython -m venv .venvWindows PowerShell:
.\.venv\Scripts\Activate.ps1macOS / Linux:
source .venv/bin/activatepip install --upgrade pip
pip install -r backend/requirements.txtThis repository currently ships with frontend/package-lock.json, so npm ci is the correct fast and deterministic install method.
npm ci --prefix frontendcd backend
uvicorn main:app --reloadcd frontend
npm run dev- Web App:
http://localhost:4173 - Backend API:
http://localhost:8000 - API Docs:
http://localhost:8000/docs
- Web App:
http://localhost:4173 - Backend API:
http://localhost:8000 - API Docs:
http://localhost:8000/docs - Health Check:
http://localhost:8000/health
The repository ships with these active templates:
- Root:
.env.example - Backend:
backend/.env.example - Frontend:
frontend/.env.example
These defaults are already tuned for the active upload-first application.
- The Chrome extension has been removed from the active product path.
- The older realtime and experimental surfaces are preserved under
legacy/for reference only. - If Hugging Face model downloads are unavailable, the backend still runs using deterministic fallback scorers instead of fake placeholder outputs.
- Video audio extraction requires
ffmpeg; the Docker backend image installs it automatically.