Maize Disease and Pest Classification Models

Pre-trained deep learning models for the joint classification of foliar diseases and arthropod pests in maize (Zea mays L.), trained on a multi-source dataset of 29,075 images covering nine classes.

Models included

Model Parameters F1 macro Use case
mobilenetv3_best.pth 4.21 M 0.9482 ± 0.0036 Edge deployment, mobile applications
vit_base_best.pth 85.81 M 0.9579 ± 0.0032 High-accuracy server inference

Classes (9 total)

Diseases (7): healthy, leaf_blight, leaf_spot, lethal_necrosis, rust, streak_virus Pests (2): fall_armyworm, grasshopper, leaf_beetle

Training details

  • Framework: PyTorch 2.x + timm
  • Optimizer: AdamW (lr=1e-4, wd=0.01)
  • Scheduler: Cosine annealing
  • Augmentation: Albumentations (RandomResizedCrop, HorizontalFlip, Rotation, ColorJitter)
  • Mixed precision: Yes (torch.cuda.amp)
  • Multi-seed protocol: 3 independent seeds (42, 123, 7) under deterministic mode
  • Hardware: NVIDIA L4 GPU

Dataset sources

  • Ghana smartphone field captures (multi-class, including pests)
  • CIMMYT/Kenya (maize lethal necrosis)
  • PlantVillage (healthy + rust)
  • Pandian et al. 2019 (additional rust samples)

How to use

import torch, timm

# MobileNetV3
model = timm.create_model("mobilenetv3_large_100", num_classes=9)
ckpt = torch.load("mobilenetv3_best.pth", map_location="cpu")
model.load_state_dict(ckpt["model_state_dict"] if "model_state_dict" in ckpt else ckpt)
model.eval()

Citation

If you use these models, please cite:

@article{julians30_2026,
  title={Local convolutions vs. global attention: CNN-Vision Transformer benchmark
         for joint maize disease and pest classification},
  author={Julians30 and Co-authors},
  journal={Agriculture (MDPI)},
  year={2026}
}

License

Apache 2.0

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using Julians30/maize-disease-models 1