ethz/food101
Viewer • Updated • 101k • 29.6k • 134
How to use jackie68/foodImageToText with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="jackie68/foodImageToText")
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("jackie68/foodImageToText")
model = AutoModelForImageClassification.from_pretrained("jackie68/foodImageToText")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("jackie68/foodImageToText")
model = AutoModelForImageClassification.from_pretrained("jackie68/foodImageToText")This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the food101 dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 3.215 | 0.99 | 62 | 2.9381 | 0.778 |
| 1.7683 | 2.0 | 125 | 1.6041 | 0.911 |
| 1.2081 | 2.99 | 187 | 1.1491 | 0.894 |
| 0.82 | 4.0 | 250 | 0.9028 | 0.899 |
| 0.7188 | 4.99 | 312 | 0.7217 | 0.913 |
| 0.5186 | 6.0 | 375 | 0.5988 | 0.928 |
| 0.4582 | 6.99 | 437 | 0.5468 | 0.926 |
| 0.4185 | 8.0 | 500 | 0.4943 | 0.93 |
| 0.3909 | 8.99 | 562 | 0.4865 | 0.925 |
| 0.3513 | 9.92 | 620 | 0.4850 | 0.925 |
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="jackie68/foodImageToText") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")