A simple model to classify different cat species using pretrained resnet models.
We used the pre-trained ImageNet ResNet model, changed its fully connected layer, and got 95.90% accuracy on the test set.
5 classes of cats.
Ragdolls | Singapura cats | Persian cats | Sphynx cats | Scottish fold cats |
---|---|---|---|---|
Just run the train.py
python train.py
Remember to replace data_path with your own path. the default path is './cats'.
Just run the test.py
python test.py
Here you need to define test_data, test_labels yourself. You can refer to the method in train.py to read in, or you can read in according to your own method.