Plant Disease Classification
15-class PlantVillage benchmark. MobileNetV2 individual best: 92.86%. Ensemble (MobileNetV2+EfficientNetB3+ResNet50) test: 83.43%. 42.5× class imbalance. Fixed generator-reset bug that caused ensemble collapse.
PlantVillage: ~55K images, 15 classes, 42.5× imbalance
2-phase TL (warmup + fine-tune) → soft ensemble with class-weighted loss
Plant disease detection on PlantVillage — 15 disease classes across pepper and potato plants.
Dataset
- ▸~55,000 images, 15 classes, 80/10/10 train/val/test split
- ▸Class imbalance: 42.5× (Tomato_YellowLeafCurlVirus vs Potato_healthy)
- ▸Imbalance strategy: class weights + label smoothing 0.1
All 6 Models
| Model | Val Accuracy |
|---|---|
| SimpleCNN | 70.01% |
| DeepCNN + BatchNorm | 78.41% |
| EfficientNetB3 (2-phase TL) | 79.93% |
| ResNet50 (2-phase TL) | 87.72% |
| MobileNetV2 (2-phase TL) | 92.86% |
| Ensemble (3 TL avg) | 82.40% val / 83.43% test |
2-Phase Transfer Learning
- ▸Warmup (8 epochs): frozen backbone
- ▸Fine-tune (3 epochs): CosineDecayRestarts LR, mixed precision float16
Bug Fixed: Generator Reset The ensemble collapsed to ~7% accuracy (random chance) because data generators were not reset between inference passes. Each generator remembered its last position, returning misaligned batches to each model. Fix: re-initialize generators before each model's predict() call.
Why Ensemble < MobileNetV2? Soft averaging MobileNetV2 (92.86%) with EfficientNetB3 (79.93%) dilutes MobileNetV2's superior predictions. The ensemble provides better test generalization (83.43%) but lower val accuracy.