AI-Lab-Makerere/beans
Viewer • Updated • 1.3k • 7.4k • 46
How to use nailashfrni/image_classification with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="nailashfrni/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("nailashfrni/image_classification")
model = AutoModelForImageClassification.from_pretrained("nailashfrni/image_classification")# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("nailashfrni/image_classification")
model = AutoModelForImageClassification.from_pretrained("nailashfrni/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.2885 | 0.9179 |
| No log | 2.0 | 104 | 0.1829 | 0.9469 |
| No log | 3.0 | 156 | 0.1789 | 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="nailashfrni/image_classification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")