Deep learning models for classifying 26 cereal crop pest species from images. Three architectures are provided: EfficientNet-B6, MobileNetV3-Large, and InceptionV3, each available in PyTorch, ONNX, and TFLite formats.
Model Description
These models were trained to identify 26 species of cereal crop pests from field images. The goal is to support automated pest monitoring and integrated pest management (IPM) in cereal crop agriculture.
All models were trained on the University of Idaho RCDS HPC cluster using SLURM, with CUDA 11.8:
Model
GPU
Epochs Completed
Wall Time
Best Checkpoint Epoch
EfficientNet-B6
NVIDIA RTX 3090 (24 GB)
10
~5h 47m
1
InceptionV3
NVIDIA RTX 4090 (24 GB)
51
~6h 02m
4
MobileNetV3-Large
NVIDIA RTX 4090 (24 GB)
79
~6h 04m
5
All three training runs were terminated by the SLURM scheduler wall time limit. Best model checkpoints were saved based on minimum validation loss, which was achieved early in training for all models. Subsequent epochs continued to reduce training loss but showed increasing validation loss (overfitting), confirming that early checkpoint selection was appropriate.
Training Curves
Training Curves
Key observations:
EfficientNet-B6 converged fastest, achieving its best validation loss (0.433) at epoch 1 with 88.8% validation accuracy. By epoch 10, training accuracy reached 98.2% while validation accuracy peaked at 92.2% (epoch 7).
InceptionV3 achieved its best validation loss (0.578) at epoch 4. Validation accuracy plateaued around 89-90% while training accuracy continued to ~99.3%, indicating overfitting after ~15 epochs.
MobileNetV3-Large achieved its best validation loss (0.474) at epoch 5. It trained the longest (79 epochs), reaching 99.7% training accuracy while validation accuracy stabilized around 90-92%.
Hyperparameters
Optimizer: Adam (lr=1e-4)
LR Schedule: ReduceLROnPlateau (factor=0.9, patience=5)
Batch size: 8
Max epochs: 1000 (early stopping via best validation loss)
Loss: CrossEntropyLoss
Class balancing: WeightedRandomSampler (inverse class frequency)
Input resolution: 528x528 (resize to 572, then center crop for val/test)
Learning Rate Decay
The ReduceLROnPlateau scheduler reduced the learning rate by 0.9x each time validation loss failed to improve for 5 consecutive epochs:
Models were trained on a specific dataset of cereal pest images and may not generalize well to pest species not in the training set.
The non_pest_herbivores class is the most challenging across all models (66.7% accuracy at best), likely due to high intra-class visual variability.
Input images are expected to be well-lit, focused close-ups of individual insects.
Acknowledgments
This project, titled "Harnessing Artificial Intelligence for Implementing Integrated Pest Management in Small-Grain Production Systems," is funded under the U.S. Department of Agriculture No. 2021-67021-34253.
Team
Sanford Eigenbrode - Distinguished Professor, Entomology, Plant Pathology, and Nematology, University of Idaho (PI)
Arash Rashed - Virginia Tech Southern Piedmont Agricultural Research and Extension Center
Marek Borowiec - Assistant Professor, Insect Systematist, Director of C. P. Gillette Museum, Colorado State University
Subodh Adhikari - Assistant Professor, Entomology Extension Specialist, Utah State University
Luke Sheneman - Director of Research Computing, University of Idaho
Jennifer Hinds - Research Applications Architect, University of Idaho
John Brunsfeld - Senior Full Stack Developer, University of Idaho
Citation
bibtex
1@misc{sheneman2025cerealpestaid,
2 author = {Sheneman, Luke},
3 title = {CerealPestAID: Deep Learning Models for Cereal Pest Identification},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/sheneman/CerealPestAID}
7}