CoolFace
Modelpublic

deyakovleva/vit-base-oxford-iiit-pets

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes13downloads
Model Card

vit-base-oxford-iiit-pets

This model was trained to classify cats and dogs and define it's breed using transfer learning method. It is a fine-tuned version of google/vit-base-patch16-224 on the pcuenq/oxford-pets dataset. It achieves the following results on the evaluation set:

  • Loss: 0.2068
  • Accuracy: 0.9350

Model description

Since google/vit-base-patch16-224 was used as the base model, the final classification layer was modified to predict 37 classes of cats and dogs from the dataset.

Intended uses & limitations

This model is designed for educational purposes, enabling the classification of cats and dogs and the identification of their breeds. It currently supports 37 distinct breeds, offering a starting point for various learning and experimentation scenarios. Beyond its educational use, the model can serve as a foundation for further development, such as expanding its classification capabilities to include additional breeds, other animal species, or even entirely different tasks. With fine-tuning, this model could be adapted to broader applications in animal recognition, wildlife monitoring, and pet identification systems.

Training and evaluation data

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0003
  • trainbatchsize: 16
  • evalbatchsize: 8
  • seed: 42
  • optimizer: Use adamwtorch with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
  • lrschedulertype: linear
  • num_epochs: 10

Training results

Training LossEpochStepValidation LossAccuracy
0.36251.03700.29330.9269
0.20022.07400.22210.9432
0.15113.011100.20570.9418
0.12534.014800.18760.9418
0.12365.018500.18250.9432
0.10786.022200.17850.9418
0.0787.025900.18090.9364
0.07988.029600.17850.9378
0.08119.033300.17740.9364
0.073610.037000.17690.9391

Evaluation results

MetricValue
Evaluation Loss0.2202
Evaluation Accuracy92.56%
Evaluation Runtime (s)7.39
Samples Per Second100.04
Steps Per Second12.59
Epoch10

Framework versions

  • Transformers 4.46.3
  • Pytorch 2.0.1+cu117
  • Datasets 3.1.0
  • Tokenizers 0.20.3