AI-Lab-Makerere/beans
Viewer • Updated • 1.3k • 9.05k • 45
How to use liangy2/vit-base-beans with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="liangy2/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("liangy2/vit-base-beans")
model = AutoModelForImageClassification.from_pretrained("liangy2/vit-base-beans")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("liangy2/vit-base-beans")
model = AutoModelForImageClassification.from_pretrained("liangy2/vit-base-beans")This model is a fine-tuned version of google/vit-base-patch16-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 | Accuracy | Validation Loss |
|---|---|---|---|---|
| 0.3303 | 1.0 | 130 | 0.9624 | 0.2543 |
| 0.1519 | 2.0 | 260 | 0.9850 | 0.1059 |
| 0.1879 | 3.0 | 390 | 0.9850 | 0.0908 |
| 0.1189 | 4.0 | 520 | 0.9850 | 0.0714 |
| 0.1095 | 5.0 | 650 | 0.9850 | 0.0711 |
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="liangy2/vit-base-beans") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")