Image Classification
Transformers
Safetensors
vit
vision
Generated from Trainer
Eval Results (legacy)
Instructions to use omidmns/vit-base-beans with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use omidmns/vit-base-beans with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="omidmns/vit-base-beans") 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("omidmns/vit-base-beans") model = AutoModelForImageClassification.from_pretrained("omidmns/vit-base-beans") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("omidmns/vit-base-beans")
model = AutoModelForImageClassification.from_pretrained("omidmns/vit-base-beans")Quick Links
vit-base-beans
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.0393
- Accuracy: 0.9916
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: 2e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 1337
- optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- num_epochs: 5.0
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.1829 | 1.0 | 2869 | 0.1319 | 0.9686 |
| 0.1706 | 2.0 | 5738 | 0.0846 | 0.9795 |
| 0.0941 | 3.0 | 8607 | 0.0590 | 0.9862 |
| 0.0977 | 4.0 | 11476 | 0.0447 | 0.9906 |
| 0.1617 | 5.0 | 14345 | 0.0393 | 0.9916 |
Framework versions
- Transformers 4.47.0
- Pytorch 2.5.1+cu124
- Datasets 3.1.0
- Tokenizers 0.21.0
- Downloads last month
- 5
Model tree for omidmns/vit-base-beans
Base model
google/vit-base-patch16-224-in21kEvaluation results
- Accuracy on imagefolderself-reported0.992
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="omidmns/vit-base-beans") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")