Abstract:
Accurate and timely recognition of pests and diseases is often required in precision agriculture. However, conventional deep learning models rely on large-scale annotated data for effective training, leading to weak generalization. The challenges also remain, including the extreme scarcity of high-quality labeled samples, serious symptom variations over regions and crop varieties, strong interference from complex field backgrounds, and highly imbalanced sample distributions among different disease categories. In this study, a high-performance, parameter-efficient, and robust vision-language model was developed for stable and accurate plant disease identification under extremely limited training samples. Real-world deployment was also realized in field environments, particularly for the wide application of intelligent disease diagnosis. A Dual-prompt Hierarchical Interactive vision-language model (DPHI) was constructed using the Contrastive Language-Image Pre-training (CLIP) architecture. Three components were utilized to strengthen deep cross-modal fusion for feature identification. (1) A Synergistic Prompt Interaction (SPI) module was constructed to extract learnable visual and textual prompts hierarchically at each layer of the visual and text encoders. A class-mask-guided bidirectional cross-attention mechanism was applied to realize fine-grained semantic alignment between visual and textual features, while filtering out irrelevant background noise and suppressing inter-class feature confusion. (2) A Dynamic Prototype Constraint (DPC) mechanism was established to maintain stable and consistent category representations, in which the Exponential Moving Average (EMA) strategy was used to dynamically update class visual prototypes. The disturbance was reduced from small-batch sampling bias, noisy data, and outlier samples. (3) A multi-task collaborative contrastive loss function was designed to optimize the shared visual-text feature space, which combined cross-entropy loss, relative distance loss, and textual dispersion loss to simultaneously strengthen intra-class compactness and inter-class separability. Comprehensive experiments were implemented under the 16-shot few-shot setting on three representative public datasets: PlantVillage, PlantDoc, and Sugarcane Leaf Disease Dataset, which covered controlled laboratory environments, complex real-field conditions, and single-crop fine-grained disease classification. The results showed that the DPHI model achieved the highest classification accuracy and F1-score on all three datasets, outperforming state-of-the-art prompt learning, including Context Optimization (CoOp) and Multi-modal Prompt Learning (MaPLe), as well as classic convolutional neural networks and Transformer-based recognition models. An apple disease dataset was collected from Yaozhou District, Tongchuan City, Shaanxi Province, China. The DPHI obtained 92.11% macro-average accuracy and 92.20% macro-average F1-score, indicating the outstanding recognition precision even in classes with extremely scarce samples, such as brown spot disease. The pre-trained CLIP backbone network was frozen to train only a small number of learnable prompt parameters. Llow computational cost and memory usage were attained in both training and inference stages, which greatly improved training efficiency with the low hardware requirements for practical deployment. The DPHI model significantly improved the few-shot learning performance, fine-grained discrimination, and cross-scenario generalization for agricultural disease recognition. The findings can also provide a reliable, parameter-efficient, and low-cost technical solution for intelligent disease diagnosis in real agricultural applications, such as rare cash crops, newly emerging epidemic diseases, and cross-regional popularization. The application cost of intelligent disease recognition can be effectively reduced to ensure the practical feasibility of model deployment in complex field environments.