Views
No views yet
{
"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]1
2from transformers import pipeline
3from PIL import Image
4
5# Use a pipeline as a high-level helper
6
7pipe = pipeline("image-classification", model="ayoubkirouane/VIT_Beans_Leaf_Disease_Classifier")
8
9# Load the image
10
11image_path = "Your image_path "
12image = Image.open(image_path)
13
14# Run inference using the pipeline
15result = pipe(image)
16
17# The result contains the predicted label and the corresponding score
18predicted_label = result[0]['label']
19confidence_score = result[0]['score']
20
21print(f"Predicted Label: {predicted_label}")
22print(f"Confidence Score: {confidence_score}")