# Deepfake Detector 🔍
A Django-based web application that uses machine learning to detect deepfake images and videos. Upload media files and get instant analysis results with confidence scores.
## 📁 Project Structure
```src/
├── deepfake_detector/ # Django project configuration
│ ├── settings.py # Project settings
│ ├── urls.py # Main URL routing
│ └── wsgi.py # WSGI configuration
├── myapp/ # Main application
│ ├── models.py # Database models
│ ├── views.py # Application logic
│ ├── urls.py # App URL routes
│ └── templates/ # HTML templates
├── media/uploads/ # User uploaded files storage
├── manage.py # Django management script
├── db.sqlite3 # SQLite database (development)
├── requirements.txt # Python dependencies
└── .gitignore # Git ignore rules- Python 3.8 or higher
- pip (Python package manager)
- Clone and setup
git clone https://github.com/Fritz-nvm/deepfake_detector/
cd src- Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies
pip install -r requirements.txt- Setup database
python manage.py migrate- Create admin user (optional)
python manage.py createsuperuser- Run development server
python manage.py runserverVisit http://localhost:8000 to access the application.
- Media Upload: Support for images and video files
- Deepfake Analysis: Machine learning model inference
- Results Display: Confidence scores and detection results
- User Interface: Clean, responsive web interface
- Django admin interface for management
- File upload handling with validation
- SQLite database for development
- Modular application structure
# Database operations
python manage.py makemigrations
python manage.py migrate
# Admin operations
python manage.py createsuperuser
# Testing
python manage.py test
# Run server
python manage.py runserver- Create a superuser account using
python manage.py createsuperuser - Start the development server
- Visit
http://localhost:8000/admin - Login with your superuser credentials
Main dependencies listed in requirements.txt:
- Django (web framework)
- Machine learning libraries (TensorFlow/PyTorch)
- Image processing libraries (OpenCV, Pillow)
- Other Python utilities
- Uploaded files are stored in
media/uploads/ - Development uses SQLite database (
db.sqlite3) - Add large files to
.gitignoreto avoid repository bloat
- This is a development version
- Machine learning model files are not included in this repository
- For production, consider using PostgreSQL instead of SQLite
- Add proper environment variables for security settings
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Built with Django & Python 🐍
This version includes:
- **Better project structure** with sub-file details
- **More detailed installation** with virtual environment
- **Expanded features** section
- **Development commands** section
- **File storage** explanation
- **Important notes** for developers
- **Clean, professional** formatting