Introduction
Automated Plant Disease Detection (PDD) is a critical component of modern precision agriculture. However, current deep learning approaches face significant challenges. Convolutional Neural Networks (CNNs) excel at capturing local textures but often miss broader global context. Conversely, Vision Transformers (ViTs) capture global dependencies but suffer from quadratic computational complexity, making them inefficient for high-resolution agricultural imagery. Furthermore, the scarcity of labeled data for diverse crops and the reliance on static loss functions limit the adaptability of existing models.
Methodology: The ConMamba Framework
To address these limitations, we propose ConMamba, a novel self-supervised learning framework that leverages State Space Models (SSMs).
Vision Mamba Encoder (VME)
At the core of ConMamba is a bidirectional Vision Mamba encoder. Unlike the self-attention mechanism in Transformers, the VME processes image patches with linear complexity. This allows the model to maintain a global receptive field without the prohibitive computational cost, making it ideal for identifying scattered disease symptoms across a leaf.
Dual-Level Contrastive Learning
ConMamba employs a sophisticated dual-level contrastive loss strategy:
- Intra-class Contrast: Focuses on local robustness by ensuring that different augmented views of the same leaf yield similar feature embeddings.
- Inter-class Contrast: Enhances global discriminability by pushing embeddings of different disease classes apart in the feature space.
Dynamic Weight Adjustment
A key innovation is the use of learnable uncertainty parameters to adaptively balance these two losses. This dynamic adjustment allows the model to prioritize either local or global feature alignment based on training progress, optimizing the learning process without manual hyperparameter tuning.
Datasets and Evaluation
The performance of ConMamba was validated across several benchmark datasets, representing a wide range of agricultural scenarios.
- PlantVillage: 54,306 images across 14 species in controlled settings.
- PlantDoc: 2,598 "in-the-wild" images with complex backgrounds.
- Citrus: 759 images focused on citrus-specific pathologies.
- Generalization Benchmarks: Additional testing on Tea Sickness and Apple Foliar datasets confirmed the model's versatility.
Results and Key Insights
ConMamba achieves state-of-the-art (SOTA) performance, consistently outperforming both CNN and Transformer-based architectures.
Performance Metrics
The model reached accuracies of 98.62% on PlantVillage, 94.29% on PlantDoc, and 91.38% on Citrus. It surpassed Transformer-based models like IEM-ViT and Mix-ViT by up to 1.49 percentage points while maintaining superior computational efficiency.
Qualitative Analysis
Class Activation Maps (CAM) demonstrate that ConMamba focuses precisely on actual disease lesions. While baseline models often exhibit "blurry" attention or focus on irrelevant background elements, ConMamba’s bidirectional SSM architecture allows it to pinpoint tiny, scattered spots while understanding their distribution across the entire leaf.
Conclusion and Future Directions
ConMamba demonstrates that bidirectional State Space Models combined with dynamic contrastive learning can effectively overcome the data and efficiency hurdles in plant disease detection. Future work will focus on model compression techniques, such as quantization and pruning, to facilitate deployment on edge devices like Raspberry Pi or NVIDIA Jetson for real-time field applications. Additionally, we aim to further refine the dynamic integration strategies to handle even more extreme domain shifts in lighting and background clutter.
Summary updated