AI-Lab-Makerere/beans
Viewer • Updated • 1.3k • 8.43k • 46
How to use stlxx/vit-base-beans with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="stlxx/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("stlxx/vit-base-beans")
model = AutoModelForImageClassification.from_pretrained("stlxx/vit-base-beans", device_map="auto")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("stlxx/vit-base-beans")
model = AutoModelForImageClassification.from_pretrained("stlxx/vit-base-beans", device_map="auto")This model is a fine-tuned version of google/vit-huge-patch14-224-in21k on the beans 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 |
|---|---|---|---|---|
| 1.0596 | 1.0 | 259 | 1.0507 | 0.7143 |
| 1.0165 | 2.0 | 518 | 1.0165 | 0.7895 |
| 1.0113 | 3.0 | 777 | 0.9941 | 0.8045 |
| 1.0067 | 4.0 | 1036 | 0.9804 | 0.8195 |
| 0.9746 | 5.0 | 1295 | 0.9760 | 0.8195 |
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="stlxx/vit-base-beans") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")