Lightweight visual detection framework for complex background grape leaf disease detection
Abstract
Accurate crop disease detection is essential for precision agriculture, yet reliable visual identification remains challenging under complex backgrounds, varying illumination, and limited computational resources. This study proposes a lightweight grape leaf disease detection framework, ULR-YOLO, based on YOLO11n. The framework incorporates three customized modules: C3k2-UltraLightBlock for efficient feature extraction, LeafRepFusionStem for enhanced low-level feature representation, and Residual Channel–Spatial Attention–Hierarchical Scale Feature Pyramid Network (RCSA-HSFPN) for improved multi-scale feature fusion. A semi-synthetic grape leaf disease dataset was constructed using publicly available images with background replacement and data augmentation to increase scene diversity. Experimental results show that ULR-YOLO achieves 92.0% precision, 92.9% recall, and 93.0% mAP@0.5, with 2.9 GFLOPs and 1.73 M parameters, corresponding to reductions of 54.7% and 33.2%, respectively, compared with YOLO11n. Statistical analysis using five random seeds indicates that the performance improvement is consistent across repeated training runs. Uniform Manifold Approximation and Projection (UMAP) feature embedding analysis suggests improved feature separability, while Gradient-weighted Class Activation Mapping++ (Grad-CAM++) visualizations indicate more focused responses to diseased leaf regions and reduced responses to background regions. Additional experiments on independent grape disease datasets show that ULR-YOLO achieves competitive detection performance under different dataset conditions. These results indicate that ULR-YOLO provides an effective and computationally efficient approach for grape leaf disease detection, offering a favorable balance between detection accuracy and computational complexity.