Short-Sighted Kitten is an exploration of facial landmarks detection model on cats. It currently contains pre-trained models for cat face ROI detection and facial landmarks detection, as well as a web application serving as a demo, which adds eyeglasses and speech bubbles to the detected cat eyes and mouth.
The recommended method to try the web application for demo is Google Colab.
You can also set up the repo in local environment. A GPU instance is recommended as the model loading and inference time may be slow on CPU. Below are the procedures:
- Install Python 3.6+, preferably via Anaconda:
$ python --version
Python 3.7.6
- Install dependencies:
$ pip install -r requirements.txt
- Download and extracts pre-trained models in the project folder:
$ tree -L 2
...
├── models
│ ├── face_detection_model
│ └── landmarks_model
...
- Launch web server:
$ uvicorn main:app
- To develop the API server, launch web server with reload:
$ uvicorn main:app --reload
- To develop the client side web application and skip the model loading procedures, launch mock server with reload:
$ uvicorn mock:app --reload
- Launch Chrome Devtools to disable cache
The models are trained in Google Colab using GPUs. Relevant notebooks are located in the notebooks
folder: