|
|
--- |
|
|
title: Video Face Swap API |
|
|
emoji: π |
|
|
colorFrom: pink |
|
|
colorTo: indigo |
|
|
sdk: docker |
|
|
sdk_version: latest |
|
|
app_file: api_server.py |
|
|
pinned: false |
|
|
disable_embedding: false |
|
|
short_description: GPU-accelerated face swap video processing API |
|
|
license: mit |
|
|
--- |
|
|
|
|
|
# Face Swap Video API |
|
|
|
|
|
GPU-accelerated FastAPI backend for face swap video processing with MongoDB storage. |
|
|
|
|
|
## π Quick Start |
|
|
|
|
|
### Docker Deployment (Recommended) |
|
|
|
|
|
```bash |
|
|
docker-compose up --build |
|
|
``` |
|
|
|
|
|
The API will be available at `http://localhost:8000` |
|
|
|
|
|
See [API Documentation](api/README.md) for detailed usage and endpoints. |
|
|
|
|
|
## Features |
|
|
|
|
|
- β
GPU acceleration with CUDA support |
|
|
- β
Asynchronous face swap processing |
|
|
- β
MongoDB Atlas integration |
|
|
- β
RESTful API with Swagger documentation |
|
|
- β
Result video download URLs |
|
|
- β
Job status tracking |
|
|
|
|
|
## API Endpoints |
|
|
|
|
|
- `POST /api/source-image` - Upload source image |
|
|
- `POST /api/target-video` - Upload target video |
|
|
- `POST /api/face-swap` - Start face swap processing |
|
|
- `GET /api/job/{job_id}` - Get job status |
|
|
- `GET /api/result-video/{result_video_id}` - Download result video |
|
|
- `GET /docs` - Interactive API documentation |
|
|
|
|
|
## Requirements |
|
|
|
|
|
- Docker with NVIDIA GPU support (nvidia-docker2) |
|
|
- MongoDB Atlas account (or local MongoDB) |
|
|
- CUDA 12.1+ compatible GPU |
|
|
|
|
|
## License |
|
|
|
|
|
MIT License - Based on DeepFakeAI/facefusion |
|
|
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |