CASSAVISION
Deep Learning Cassava Leaf Disease Classification & Explainable Agricultural AI
Applied computer vision and explainable AI system classifying cassava foliar diseases across five Makerere AI Lab/NaCRRI classes with perceptual-hash deduplication, damped class-imbalance weighting, post-hoc temperature calibration, and Grad-CAM + occlusion sensitivity maps.

Why it exists
Smallholder cassava farmers across Sub-Saharan Africa lose major yields to mosaic, brown streak, and bacterial blight. I wanted an optical diagnostics system that doesn't just guess a disease label with overconfident softmax, but visually proves whether it is looking at leaf lesions or background soil.
How it works
- 01Zero-leakage data pipeline with 64-bit perceptual hashing (dHash) and Union-Find clustering ensuring identical/near-duplicate leaves never leak across train/val/test splits
- 02Biologically grounded augmentation bounding hue jitter (<= 0.02) to avoid artificially mutating healthy chlorophyll into disease chlorosis, paired with damped inverse-frequency loss weighting and label smoothing
- 03Multi-architecture benchmark comparing Balanced Random Forest, custom 4-stage CNN, and ImageNet-pretrained MobileNetV2, MobileNetV3-Small, and ResNet-18 with discriminative AdamW fine-tuning
- 04Pre-inference optical validation and out-of-distribution (OOD) screening on Laplacian sharpness and Excess-Green (ExG) vegetative indices
- 05Post-hoc L-BFGS-B temperature scaling for calibrated predictive probabilities, paired with Shannon entropy uncertainty thresholds
- 06Spatial Grad-CAM heatmaps, perturbation occlusion sensitivity maps, and Center-vs-Border saliency ratios in a 4-tab Streamlit studio
What was hard
Balancing severe field class imbalance (CMD > 60% vs CBB < 10%) while preventing models from using soil backgrounds and lighting artifacts as shortcut features.