Instructions to use Jommarn/animal-classification-resnet50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jommarn/animal-classification-resnet50 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Jommarn/animal-classification-resnet50") 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("Jommarn/animal-classification-resnet50") model = AutoModelForImageClassification.from_pretrained("Jommarn/animal-classification-resnet50", device_map="auto") - Notebooks
- Google Colab
- Kaggle
animal-classification-resnet50
This model is a fine-tuned version of microsoft/resnet-50 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.9563
- Accuracy: 0.9275
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0005
- train_batch_size: 8
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- num_epochs: 5
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 3.5643 | 1.0 | 254 | 1.8278 | 0.7591 |
| 2.5620 | 2.0 | 508 | 1.4595 | 0.7953 |
| 2.2235 | 3.0 | 762 | 1.2521 | 0.8290 |
| 2.0331 | 4.0 | 1016 | 1.0668 | 0.8549 |
| 1.8598 | 5.0 | 1270 | 1.1792 | 0.8187 |
Framework versions
- Transformers 5.16.1
- Pytorch 2.11.0+cu128
- Datasets 4.0.0
- Tokenizers 0.23.1
- Downloads last month
- 133
Model tree for Jommarn/animal-classification-resnet50
Base model
microsoft/resnet-50Evaluation results
- Accuracy on imagefoldervalidation set self-reported0.927