A comprehensive deepfake detection system with FastAPI backend, React frontend, and ML model.
├── backend/ # FastAPI Backend API
├── model/ # Machine Learning Model
├── UI/ # React Frontend
└── README.md # This file
cd backendpython3.12 -m venv venv(orpython3.11)source venv/bin/activatepip install -r requirements.txtcp env.example .env- Create database:
createdb deepfake_detector(or usepsqlcommand) alembic upgrade headdocker-compose up -dORuvicorn app.main:app --reload
Migrations:
- Generate:
alembic revision --autogenerate -m "description" - Apply:
alembic upgrade head - Rollback:
alembic downgrade -1
API Docs:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
cd UInpm installnpm start
Visit http://localhost:5173 (Vite default port)
Scripts:
npm start- Development servernpm run build- Production buildnpm run test:unit- Run tests
Tech Stack: React 18 • TypeScript • Vite • Tailwind CSS
- Uses Xception model for deepfake detection
- OpenCV/MediaPipe for face detection
- Processes videos frame-by-frame
- Returns confidence scores and predictions
- JWT authentication
- Video/image upload and analysis
- Real-time processing with progress tracking
- Confidence scoring with detailed reports
- PostgreSQL database with SQLModel/SQLAlchemy