Few-shot agricultural disease detection method using contextual attention generation
Xin Ning, S. D. Gao, J.G. Liu, Long Cheng, Yugui Zhang
Abstract
Agricultural diseases are a problem on a global scale. Developing efficient methods for detecting various types of plant diseases is of great significance for boosting the yield of economic crops. Given the characteristics of limited samples and class imbalance among different plant disease types, this study proposes a generative few-shot agricultural disease detection method based on a contextual attention mechanism. Our approach constrains contextual information in layout positions of different categories within images, enhancing the model's ability to understand categorical spatial relationships and achieving more precise disease localization; Subsequently, we design a semantic feature vector fusion method that integrates disease characteristics with leaf features in generated images through attention mechanisms, ensuring high visual fidelity; Furthermore, we introduce a generative model-based augmentation paradigm that utilizes feature consistency for data expansion, effectively enlarging plant disease datasets. Comprehensive experiments validate our method on two datasets using multiple state-of-the-art object detection models. Results demonstrate an average improvement of 12.9 % across these models on the two datasets. This framework significantly enhances model generalization for rare categories and imbalanced disease data recognition, providing a robust solution to data scarcity challenges in plant disease object detection.