https://github.com/donartkins/deepcheckai
DeepCheck AI is a comprehensive Python-based service for detecting manipulated media including images, videos, and audio files
https://github.com/donartkins/deepcheckai
cloudinary-api deepfake-detection flask-api python3 rest-api
Last synced: 10 months ago
JSON representation
DeepCheck AI is a comprehensive Python-based service for detecting manipulated media including images, videos, and audio files
- Host: GitHub
- URL: https://github.com/donartkins/deepcheckai
- Owner: DonArtkins
- License: mit
- Created: 2025-09-10T12:55:52.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-10T13:12:43.000Z (10 months ago)
- Last Synced: 2025-09-10T17:17:43.557Z (10 months ago)
- Topics: cloudinary-api, deepfake-detection, flask-api, python3, rest-api
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# DeepCheck AI π‘οΈ
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://github.com/psf/black)
DeepCheck AI is a comprehensive Python-based service for detecting manipulated media including **images, videos, and audio files**. Built with a modular architecture, it integrates state-of-the-art deepfake detection models and provides easy-to-use REST API endpoints that can be seamlessly connected to web frontends.
---
## β¨ Key Features
- πΌοΈ **Multi-Modal Detection**: Analyze images, videos, and audio files
- π **Confidence Scoring**: Get detailed confidence metrics for all results
- π **Bulk Processing**: Upload and process multiple files simultaneously
- π§ **Modular Architecture**: Easy integration of new detection models
- π **REST API**: Ready-to-use Flask/FastAPI endpoints
- βοΈ **Configurable**: Flexible configuration via environment variables
- π **Production Ready**: Optimized for deployment and scaling
---
## π Project Structure
```
deepfake-ai-service/
βββ app/
β βββ main.py # Application entry point
β βββ models/ # AI detection models
β β βββ image_detector.py # Image deepfake detection
β β βββ video_detector.py # Video deepfake detection
β β βββ audio_detector.py # Audio deepfake detection
β βββ utils/ # Utility functions
β β βββ preprocessing.py # Media preprocessing
β β βββ validation.py # Input validation
β β βββ helpers.py # Common helper functions
β βββ routes/ # API route definitions
β βββ api.py # Main API routes
β βββ health.py # Health check endpoints
βββ config/
β βββ settings.py # Application settings
β βββ logging.conf # Logging configuration
βββ tests/ # Test suite
β βββ test_models.py # Model tests
β βββ test_api.py # API endpoint tests
β βββ fixtures/ # Test media files
βββ temp/ # Temporary file storage
βββ logs/ # Application logs
βββ requirements.txt # Python dependencies
βββ requirements-dev.txt # Development dependencies
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ Dockerfile # Docker configuration
βββ docker-compose.yml # Docker Compose setup
βββ run.py # Application runner
βββ README.md # This file
βββ CONTRIBUTING.md # Contribution guidelines
```
---
## π Quick Start
### Prerequisites
- Python 3.8 or higher
- Git
- Virtual environment (recommended)
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/YOUR_USERNAME/deepcheck-ai.git
cd deepcheck-ai
```
2. **Create and activate virtual environment**
```bash
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
# On Windows
python -m venv venv
venv\Scripts\activate
```
3. **Install dependencies**
```bash
pip install -r requirements.txt
```
4. **Configure environment**
```bash
cp .env.example .env
# Edit .env with your configuration
```
5. **Run the application**
```bash
python run.py
```
The service will be available at `http://localhost:5000`
---
## π₯οΈ Usage
### API Endpoints
#### Health Check
```bash
GET /health
```
#### Upload and Analyze Media
```bash
POST /api/analyze
Content-Type: multipart/form-data
# Parameters:
# - file: Media file (image/video/audio)
# - threshold: Confidence threshold (optional, default: 0.5)
```
#### Example Response
```json
{
"status": "success",
"file_type": "image",
"is_deepfake": false,
"confidence": 0.85,
"processing_time": 2.34,
"metadata": {
"model_version": "v2.1.0",
"timestamp": "2024-03-15T10:30:00Z"
}
}
```
### Python Client Example
```python
import requests
url = "http://localhost:5000/api/analyze"
files = {"file": open("suspicious_image.jpg", "rb")}
data = {"threshold": 0.7}
response = requests.post(url, files=files, data=data)
result = response.json()
print(f"Is deepfake: {result['is_deepfake']}")
print(f"Confidence: {result['confidence']}")
```
### Frontend Integration
The API is designed to work seamlessly with web frontends. For a complete example with Next.js, check out our [frontend repository](https://github.com/YOUR_USERNAME/deepcheck-frontend).
---
## π§ Configuration
### Environment Variables
Create a `.env` file in the root directory:
```env
# Server Configuration
PORT=5000
DEBUG=True
SECRET_KEY=your-secret-key-here
# Model Configuration
DEFAULT_THRESHOLD=0.5
MAX_FILE_SIZE=100MB
SUPPORTED_FORMATS=jpg,jpeg,png,mp4,avi,wav,mp3
# Storage Configuration
TEMP_DIR=./temp
LOG_LEVEL=INFO
# GPU Configuration (optional)
USE_GPU=True
CUDA_DEVICE=0
```
### Advanced Configuration
For advanced settings, modify `config/settings.py`:
```python
class Config:
# Model configurations
IMAGE_MODEL_PATH = "models/image_detector.pth"
VIDEO_MODEL_PATH = "models/video_detector.pth"
AUDIO_MODEL_PATH = "models/audio_detector.pth"
# Processing limits
MAX_VIDEO_DURATION = 300 # seconds
MAX_BATCH_SIZE = 10
# Performance tuning
WORKER_THREADS = 4
ENABLE_CACHING = True
```
---
## π³ Docker Deployment
### Using Docker Compose (Recommended)
```bash
docker-compose up -d
```
### Manual Docker Build
```bash
# Build image
docker build -t deepcheck-ai .
# Run container
docker run -p 5000:5000 -v $(pwd)/temp:/app/temp deepcheck-ai
```
---
## π§ͺ Testing
Run the test suite:
```bash
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/ -v
# Run with coverage
python -m pytest tests/ --cov=app --cov-report=html
```
---
## π Performance
### Benchmarks
| Media Type | Average Processing Time | GPU Acceleration |
| ---------- | --------------------------- | ---------------- |
| Images | 0.5s | 3x faster |
| Videos | 2-10s (depending on length) | 5x faster |
| Audio | 1-3s | 2x faster |
### Optimization Tips
- Enable GPU acceleration for significant performance gains
- Use batch processing for multiple files
- Configure appropriate worker threads based on your hardware
- Enable caching for repeated analyses
---
## π£οΈ Roadmap
### Version 2.0
- [ ] Advanced transformer-based models (BERT, Vision Transformer)
- [ ] Real-time streaming detection
- [ ] Enhanced GPU optimization (TensorRT integration)
- [ ] Multi-language support for API documentation
### Version 2.1
- [ ] Kubernetes deployment templates
- [ ] Advanced analytics dashboard
- [ ] Model fine-tuning capabilities
- [ ] Integration with cloud storage providers (AWS S3, Google Cloud)
### Version 3.0
- [ ] Federated learning support
- [ ] Custom model training interface
- [ ] Advanced forensic analysis features
- [ ] Mobile SDK for iOS/Android
---
## π€ Contributing
We welcome contributions from developers of all skill levels! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines on how to contribute to DeepCheck AI.
### Quick Contribution Steps
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Submit a pull request
---
## π License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
---
## π Acknowledgements
We thank the following projects and research communities:
- **[DeepFace](https://github.com/serengil/deepface)** - Face recognition and analysis framework
- **[OpenCV](https://opencv.org/)** - Computer vision library
- **[PyTorch](https://pytorch.org/)** - Deep learning framework
- **[Librosa](https://librosa.org/)** - Audio analysis library
- **Academic Research Community** - For groundbreaking work in deepfake detection
### Research Papers
- "FaceForensics++: Learning to Detect Manipulated Facial Images" (RΓΆssler et al., 2019)
- "The DeepFake Detection Challenge (DFDC) Dataset" (Dolhansky et al., 2020)
- "DeeperForensics-1.0: A Large-Scale Dataset for Real-World Face Forgery Detection" (Jiang et al., 2020)
---
## π Support
- π **Bug Reports**: [GitHub Issues](https://github.com/YOUR_USERNAME/deepcheck-ai/issues)
- π‘ **Feature Requests**: [GitHub Discussions](https://github.com/YOUR_USERNAME/deepcheck-ai/discussions)
- π§ **Email**: support@deepcheck-ai.com
- π¬ **Discord**: [Join our community](https://discord.gg/deepcheck-ai)
---
## π Project Stats




---
Built with β€οΈ for a safer digital world