Instructions to use hilmansw/resnet18-catdog-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hilmansw/resnet18-catdog-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="hilmansw/resnet18-catdog-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("hilmansw/resnet18-catdog-classifier") model = AutoModelForImageClassification.from_pretrained("hilmansw/resnet18-catdog-classifier") - Notebooks
- Google Colab
- Kaggle
Model description
This model is a fine-tuned version of microsoft/resnet-18 on an custom dataset. This model was built using the "Cats & Dogs Classification" dataset obtained from Kaggle. During the model building process, this was done using the Pytorch framework with pre-trained Resnet-18. The method used during the process of building this classification model is fine-tuning with the dataset.
Training results
| Epoch | Accuracy |
|---|---|
| 1.0 | 0.9357 |
| 2.0 | 0.9786 |
| 3.0 | 0.9000 |
| 4.0 | 0.9214 |
| 5.0 | 0.9143 |
| 6.0 | 0.9429 |
| 7.0 | 0.9714 |
| 8.0 | 0.9929 |
| 9.0 | 0.9714 |
| 10.0 | 0.9714 |
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- loss_function = CrossEntropyLoss
- optimizer = AdamW
- learning_rate: 0.0001
- batch_size: 16
- num_epochs: 10
Framework versions
- Transformers 4.33.2
- Pytorch 2.0.1+cu118
- Datasets 2.14.5
- Tokenizers 0.13.3
- Downloads last month
- 11
Model tree for hilmansw/resnet18-catdog-classifier
Base model
microsoft/resnet-18