Downloads · 30 days
13
2% of all-time downloads
ayoubkirouane/VIT_Beans_Leaf_Disease_Classifier
VIT_Beans_Leaf_Disease_Classifier is a image classification model from ayoubkirouane. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
Model Name: VITBeansLeafDiseaseClassifier Base Model: Google/ViT-base-patch16-224-in21k Task: Image Classification (Beans Leaf Disease Classification) Dataset: Beans leaf dataset with images of diseased and healthy le…
Downloads · 30 days
13
2% of all-time downloads
All-time downloads
768
Public
Repo size
687 MB
Likes
0
Public
Click a slice to open those files.
.bin343 MB · 100%
From the Hugging Face model README
The goal of this model is to classify leaf images into three categories:
{
"angular_leaf_spot": 0,
"bean_rust": 1,
"healthy": 2,
}

| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.1495 | 1.54 | 100 | 0.0910 | 0.9774 |
| 0.0121 | 3.08 | 200 | 0.0155 | 1.0 |
! pip -q install datasets transformers[torch]
from transformers import pipeline
from PIL import Image
# Use a pipeline as a high-level helper
pipe = pipeline("image-classification", model="ayoubkirouane/VIT_Beans_Leaf_Disease_Classifier")
# Load the image
image_path = "Your image_path "
image = Image.open(image_path)
# Run inference using the pipeline
result = pipe(image)
# The result contains the predicted label and the corresponding score
predicted_label = result[0]['label']
confidence_score = result[0]['score']
print(f"Predicted Label: {predicted_label}")
print(f"Confidence Score: {confidence_score}")