Real-time detection method for Litchi diseases and pests based on improved YOLOv5s - Ma, Xingzao; Huang, Tianyang; Zhao, Gaoyuan; Qiu, Zhi; Li, Hua; Fang, Zhuangdong (Frontiers in Plant Science, 2025)
Accurate, efficient, and economical detection of Litchi pests and diseases is critical for sustainable orchard management, yet traditional manual methods often fall short in these aspects. To address these limitations, an improved YOLOv5s model, named YOLOv5s-SNV2-GSE, was proposed in this study for real-time detection on embedded platforms. The backbone network was modified by replacing conventional convolutional blocks with ShuffleNetV2, leveraging channel shuffling and group convolution to reduce model parameters and computational cost. In the detection head, standard convolutional blocks and C3 modules were replaced with depthwise convolutions (DWConv) and C3Ghost modules to further minimize model size. Squeeze-and-Excitation (SE), Convolutional Block Attention Module (CBAM), and Coordinate Attention (CoordAtt) mechanisms were incorporated into the backbone network to enhance feature extraction. Additionally, the Efficient Intersection over Union (EIoU) loss function was adopted to improve convergence speed and bounding box regression accuracy. The experimental results demonstrated that the improved YOLOv5s-SNV2-GSE model achieved a mean average precision (mAP) of 96.7%. Compared to the original YOLOv5s, the proposed model reduced computational cost by 87.5%, number of parameters by 86.7%, and model size by 55.6%. When deployed on a Raspberry Pi 4B, the model achieved an average inference speed of 3.3 frames per second (FPS), representing a 57.1% improvement and meeting real-time detection requirements. These results indicate that the proposed model provides a practical and efficient solution for real-time Litchi pests and diseases detection in resource-constrained environments.