Skip to content

Chun0119/Short-sighted-Kitten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Short-Sighted Kitten

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.

Screenshot

Google Colab

The recommended method to try the web application for demo is Google Colab.

Open In Colab

Local Setup

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:

  1. Install Python 3.6+, preferably via Anaconda:
$ python --version
Python 3.7.6
  1. Install dependencies:
$ pip install -r requirements.txt
  1. Download and extracts pre-trained models in the project folder:
$ tree -L 2
...
├── models
│   ├── face_detection_model
│   └── landmarks_model
...
  1. Launch web server:
$ uvicorn main:app

Development

  • 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

Models

The models are trained in Google Colab using GPUs. Relevant notebooks are located in the notebooks folder:

  • training.ipynb walks through the training process of the two models Open In Colab
  • inference.ipynb outlines the inference process of the whole pipeline using the saved models, from image to landmarks Open In Colab
  • server.ipynb describes the procedures to set up the web application on Google Colab Open In Colab

Acknowledgements

About

Short-Sighted Kitten is an exploration of facial landmarks detection model on cats.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages