Instructions to use elvispresniy/vit-food101 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use elvispresniy/vit-food101 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="elvispresniy/vit-food101") 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("elvispresniy/vit-food101") model = AutoModelForImageClassification.from_pretrained("elvispresniy/vit-food101", device_map="auto") - Notebooks
- Google Colab
- Kaggle
vit-food101
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.4925
- Accuracy: 0.899
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.0002
- train_batch_size: 64
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 4
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 2.682 | 0.6369 | 100 | 2.5501 | 0.802 |
| 1.312 | 1.2739 | 200 | 1.3870 | 0.855 |
| 0.7605 | 1.9108 | 300 | 0.9167 | 0.862 |
| 0.3844 | 2.5478 | 400 | 0.6248 | 0.88 |
| 0.1957 | 3.1847 | 500 | 0.5220 | 0.896 |
| 0.1756 | 3.8217 | 600 | 0.4925 | 0.899 |
Framework versions
- Transformers 4.42.4
- Pytorch 2.3.1+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1
- Downloads last month
- 7
Model tree for elvispresniy/vit-food101
Base model
google/vit-base-patch16-224-in21k