Overview:
Face Swap is a facial fusion application that allows users to swap faces in images. It offers a feature to configure templates for facial fusion and provides options to adjust facial angles. The application can be deployed using Docker or supervisor+gunicorn. It also provides API endpoints for face detection and swapping. The API returns specific error codes to indicate the success or failure of requests.
Features:
- Facial Fusion: Users can swap faces in images using the application.
- Template Configuration: Templates for facial fusion can be configured and updated.
- Facial Angle Configuration: Users can configure the thresholds for facial angle rotation.
- Environment Variable Configuration: The application supports environment variable configuration.
- Docker Deployment: The application can be deployed using Docker.
- Supervisor+Gunicorn Deployment: The application can be deployed using supervisor and gunicorn.
- API Endpoint: /api/v1/faceswap: API endpoint for facial fusion using v1 version.
- API Endpoint: /api/v1/face_detect: API endpoint for face detection in images.
Configuration:
- Template Configuration: Place facial fusion templates in the ./res/templates directory and update the template configuration in the ./res/templates/templates.yaml file.
- Facial Angle Configuration: Create a ./res/face/face.yaml file and configure the thresholds for facial angle rotation.
- Environment Variable Configuration: Create a .env file in the project root directory and set the required environment variables.
Deployment:
There are two deployment options available for the application:
Docker Deployment:
- Clone the project to your local machine.
- Start the Docker container using the docker-compose.yml file.
Supervisor+Gunicorn Deployment (CentOS 7.8 Example):
- Install the required dependencies and upgrade pip3.
- Create and activate the project's virtual environment.
- Install the project dependencies.
- Install and configure supervisor.
- Configure supervisor to start on boot and view its status.
- Configure the application in supervisor.
- Restart supervisor.
Summary:
Face Swap is a facial fusion application that allows users to swap faces in images. It provides various configuration options for templates and facial angles. The application can be deployed using Docker or supervisor+gunicorn. It also offers API endpoints for face detection and swapping.