AI-Lab-Makerere/beans
Viewer • Updated • 1.3k • 8.95k • 45
How to use ahyar002/image_classification with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="ahyar002/image_classification")
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("ahyar002/image_classification")
model = AutoModelForImageClassification.from_pretrained("ahyar002/image_classification")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("ahyar002/image_classification")
model = AutoModelForImageClassification.from_pretrained("ahyar002/image_classification")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 | Validation Loss | Accuracy |
|---|---|---|---|---|
| No log | 1.0 | 52 | 0.2598 | 0.9565 |
| No log | 2.0 | 104 | 0.1608 | 0.9517 |
| No log | 3.0 | 156 | 0.1650 | 0.9565 |
Base model
google/vit-base-patch16-224-in21k
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="ahyar002/image_classification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")