Serving Photo2Cartoon and RetinaFaceAntiCov machine learning models using
In my previous article, I talked about hosting machine learning models using
Streamlit. In this article let’s continue to add additional models into the application.
Serving Machine Learning Models (DCGAN, PGAN, ResNext) using FastAPI and Streamlit
The application is dockerized into 2 containers separately — 1 for the
Streamlit frontend and another for the
FastAPI backend. To bring up the application, clone the repository here and run the “
make up” command under
The command basically runs the
docker-compose command to create the Docker images and containers and then runs the start-up scripts.
Below is the content of the
The application shall take a while to start as there are quite a number of steps to be executed. Once started, log in to
http://localhost:8051 and you should see the
Streamlit user interface.
For this model, I am going to use PaddleGAN. For this model, the cartoon style is more realistic and contains unequivocal ID information
Let’s try with some images for fun.
For this model, I am going to use InsightFace to detect if someone is wearing a face mask.
A white rectangle is drawn when a face mask is detected.
A green rectangle is drawn when there is no face mask.
It is quite amazing what deep learning can do when trained with enough data.