Notebook and script to train on the Oxford Cats and Dogs Breeds Classification dataset and predict cat breeds from thecatapi.com
The notebook outputs up to three potential breed mixes because many cat pictures are not of full breeds.
Install and activate the virtual environment with either Mamba or Conda using the environment file.
git clone git@github.com:ericdatakelly/cat-breed-classifier.git
cd cat-breed-classifier
mamba env create -f environment.yaml
mamba activate cat-breed-classifier
Get a free API key from thecatapi.com and put it in your user folder (~/.config/catapi/api_key.txt
).
Run the notebook.
Get Cats and Dogs Breeds Classification Oxford Dataset and put the annotation and image folders into the data folder of this project, e.g., data/cat_dog_breeds_oxford/annotations/trainval.txt
Run the cat_breed_train.py
script. It will save a loss plot and a new model in the same directory.
View results of the new model by updating the model name in the notebook and running all cells.