A comprehensive deepfake detection system built for hackathon demonstration, featuring a Next.js frontend and Flask backend with multi-modal AI analysis.
Test at https://notreally.vercel.app/
- Multi-Modal Analysis: Combines facial feature analysis, audio processing, and metadata extraction
- Real-time Processing: Fast analysis with live progress updates
- Interactive Dashboard: Beautiful charts and detailed feature breakdowns
- Explainable AI: Shows which features contributed to the authenticity score
- Modern UI: Built with Next.js, TypeScript, and Tailwind CSS
wit-hackathon/
├── frontend/ # Next.js React application
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # React components
│ │ └── types/ # TypeScript type definitions
│ └── package.json
├── backend/ # Flask Python API
│ ├── app.py # Main Flask application
│ ├── requirements.txt
│ └── uploads/ # Temporary file storage
└── plan.md # Detailed implementation plan
- Next.js 14 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- Recharts for data visualization
- Lucide React for icons
- Axios for API communication
- Flask for REST API
- Flask-CORS for cross-origin requests
- OpenCV for video processing
- MediaPipe for facial analysis
- Librosa for audio processing
- XGBoost for ML classification
- SQLite for data storage (planned)
- Node.js 18+ and npm
- Python 3.8+
- FFmpeg (for video processing)
cd frontend
npm install
npm run devcd backend
pip install -r requirements.txt
python app.pycd backend
# Quotes are needed for the space in the real dataset folder name
python train_model.py "DFD_original sequences" DFD_manipulated_sequences
# This writes backend/model.pklThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- File Upload: User uploads video file via drag-and-drop interface
- Feature Extraction:
- Facial landmark detection using MediaPipe
- Blink rate calculation
- Facial jitter analysis
- Audio MFCC extraction
- ML Classification: XGBoost model predicts authenticity score
- Results Display: Interactive dashboard with charts and explanations
- Drag-and-drop interface
- File type and size validation
- Real-time upload progress
- Error handling
- Authenticity score with confidence level
- Feature breakdown charts
- Detailed metrics table
- Explainable AI insights
POST /api/analyze- Upload and analyze videoGET /api/results/<job_id>- Get analysis resultsGET /api/health- Health check
- Update types in
frontend/src/types/ - Create components in
frontend/src/components/ - Add API endpoints in
backend/app.py - Update the analysis pipeline as needed
# Frontend tests
cd frontend
npm test
# Backend tests
cd backend
python -m pytest- Real-time video streaming analysis
- Batch processing for multiple files
- User authentication and history
- Advanced ML models (CNN, Transformer)
- API rate limiting and security
- Docker containerization
- Cloud deployment (AWS/GCP)
This is a hackathon project, but contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is created for educational and hackathon purposes.