The Face Encoder project is a FastAPI-based service that allows users to upload images for face encoding. It provides functionalities for starting a new session, uploading images, and retrieving session summaries.
- Python 3.6 or higher
- Docker
- Docker Compose
face_encoder
: Contains the main application codedatabase
: Contains the database codedocs
: Contains the documentationutils
: Contains the utility codek8
: Contains the Kubernetes manifeststests
: Contains the test code
├── database
│ ├── config.py
│ ├── crud.py
│ ├── database.py
│ └── models.py
├── docker-compose.yaml
├── docs
├── face_encoder
│ ├── app
│ │ └── app.py
│ ├── Dockerfile
│ └── __main__.py
├── k8
│ ├── env-configmap.yaml
│ ├── face_encoder_app
│ │ ├── face-encoder-app-deployment.yaml
│ │ └── face-encoder-app-service.yaml
│ ├── face_encoding
│ │ ├── face-encoding-deployment.yaml
│ │ └── face-encoding-service.yaml
│ ├── postgresql
│ │ ├── postgresql-deployment.yaml
│ │ └── postgresql-service.yaml
│ └── README.md
├── poetry.lock
├── pyproject.toml
├── README.md
- Clone the repository
- Set up the environment variables in a
.env
file. You can use theenv.template
file - Build the Docker containers with
docker compose build
- Start Docker containers with
docker compose up
If you want to test the application on your own, you can use the DockerHub image vpilotoamaro/face-encoder:latest
You can test the application with Swagger by openning http://localhost:8001/docs
- Start Session: Start a new session for face encoding
- Upload Image: Upload an image for face encoding
- Session Summary: Retrieve a summary of the session
- /start_session: POST method to start a new session
- /upload: POST method to upload an image
- /session_summary/{session_id}: GET method to get the session summary
- Add queueing service for uploading images for better performance and scalability. (RabbitMQ with Celery)
- Session caching for better performance. (Redis)
- Vinicius Amaro