Deploy deepface model fastapi (develop)
In this article the deployment of this deepface model is going to be explained. This implementation is with Fastapi, Traefik and mongodb.
The repo of this article is here.
Data Model
For the purpose of saving the images from request app, two mongodb model is developed:
Fastapi
In order to deploy deepface app, Fastapi framework is going to be employed. This development is built on the docker image:
In docker image the builtin models for face analyze and face compare is going to be downloaded by running preload.py
The art in this implementation is changing the image file into array, for analysis by deepface.
For load balancing Traefik is used.
To build and run the app:
docker-compose up — build
In the NEXT article the deployment on heroku is explained.