Enhancing wheat seed classification with ensemble voting of multiple fine-tuned pre-trained models
摘要
Accurate classification of wheat seeds is crucial to ensuring global food security and supporting the sustainable improvement of agriculture against climate and economic challenges. Despite advances in computer vision, existing classification methods often lack sufficient accuracy and interpretability, thus limiting their practical application in precision agriculture. In this study, we address this gap by fine-tuning pre-trained models using the Fastai library, which is well known for its superior performance in computer vision applications. We evaluate various pre-trained models using the Fastai library. Motivated by the need to enhance accuracy, we identify the two most effective models for wheat seed classification and implement a voting-based ensemble learning strategy. This approach aggregates the predictions of the selected models, determining the final class using a voting policy. To assess the feasibility of our method, we test it on two different wheat seed datasets under distinct classification scenarios. Experiments show that combining models using the hard voting policy significantly improves classification performance compared to using individual models. Our approach achieves 98.92% accuracy for bread wheat varieties in the first dataset, while the second dataset records accuracies of 100% for hard-white wheat, 99.68% for hard-red wheat, and 99.82% across all wheat varieties. To enhance interpretability, we employ Gradient-weighted Class Activation Mapping (Grad-CAM) visualizations. It provides insight into the features that the model prioritizes when categorizing different wheat varieties. Our findings demonstrate the robustness and practical applicability of our method, contributing to the advancement of AI-driven solutions for precision agriculture.