Views
No views yet
microsoft/resnet-18, trained on the AI-Lab-Makerere/beans dataset.angular_leaf_spotbean_rusthealthy| Metric | Result |
|---|---|
| Accuracy | 0.9453 |
| Macro-F1 | 0.9460 |
| Test loss | 0.1533 |
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| Angular leaf spot | 0.9512 | 0.9070 | 0.9286 | 43 |
| Bean rust | 0.8913 | 0.9535 | 0.9213 | 43 |
| Healthy | 1.0000 | 0.9762 | 0.9880 | 42 |

1from PIL import Image
2from transformers import pipeline
3
4classifier = pipeline(
5 "image-classification",
6 model="Zharasbek/resnet18-bean-disease-classifier",
7)
8
9image = Image.open("bean_leaf.jpg").convert("RGB")
10predictions = classifier(image, top_k=3)
11
12print(predictions)