Instructions to use RononoaIgor98/cassava-leaf-disease-efficientnet-b0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use RononoaIgor98/cassava-leaf-disease-efficientnet-b0 with timm:
import timm model = timm.create_model("hf_hub:RononoaIgor98/cassava-leaf-disease-efficientnet-b0", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Cassava Leaf Disease Classifier (EfficientNet-B0) โ v2
Fine-tuned EfficientNet-B0 classifying cassava leaf photos into 5 categories, trained on the Cassava Leaf Disease Classification dataset (~21,400 real field images from Uganda, Makerere AI Lab).
First step toward offline, edge-deployable computer vision for physical-world problems in Africa.
Classes
- 0: Cassava Bacterial Blight (CBB)
- 1: Cassava Brown Streak Disease (CBSD)
- 2: Cassava Green Mottle (CGM)
- 3: Cassava Mosaic Disease (CMD)
- 4: Healthy
Results (held-out 20% stratified validation)
- Accuracy: 0.800
- Macro F1: 0.684
- Best class: Mosaic (F1 0.911). Hardest: Bacterial Blight (F1 0.531).
Training
- Base: EfficientNet-B0 (ImageNet pretrained,
timm) - 224x224, ImageNet normalization; augmentation: flips, rotation, color jitter
- Class-weighted CrossEntropy (inverse-frequency) for heavy imbalance (~61% Mosaic)
- AdamW, lr 1e-4, CosineAnnealing over 12 epochs, best-epoch by macro-F1
- Hardware: Kaggle Tesla T4
Known limitation (important)
The model sometimes classifies mild or early-stage diseased leaves as Healthy โ the highest-stakes error for real deployment, since it misses infections. This is worst for early Bacterial Blight. Faint disease signal on mostly-green leaves is the model's core remaining weakness and is not fully solved by this version.
Usage
import timm, torch
model = timm.create_model("efficientnet_b0", pretrained=False, num_classes=5)
model.load_state_dict(torch.load("pytorch_model.bin", map_location="cpu"))
model.eval()
- Downloads last month
- -