YOLOv8-LSW: A Lightweight Bitter Melon Leaf Disease Detection Model - Shuang Liu; Haobin Xu; Ying Deng; Yixin Cai; Yongjie Wu; Xiaohao Zhong; Jingyuan Zheng; Zhiqiang Lin; Miaohong Ruan; Jianqing Chen; Fengxiang Zhang; Huiying Li; et al. (Agriculture, 2025)
Bitter melon, an important medicinal and edible economic crop, is often threatened by diseases such as downy mildew, powdery mildew, viral diseases, anthracnose, and blight during its growth. Efficient and accurate disease detection is of significant importance for achieving sustainable disease management in bitter melon cultivation. To address the issues of weak generalization ability and high computational demands in existing deep learning models in complex field environments, this study proposes an improved lightweight YOLOv8-LSW model. The model incorporates the inverted bottleneck structure of LeYOLO-small to design the backbone network, utilizing depthwise separable convolutions and cross-stage feature reuse modules to achieve lightweight design, reducing the number of parameters while enhancing multi-scale feature extraction capabilities. It also integrates the ShuffleAttention mechanism, strengthening the feature response in lesion areas through channel shuffling and spatial attention dual pathways. Finally, WIoUv3 replaces the original loss function, optimizing lesion boundary regression based on a dynamic focusing mechanism. The results show that YOLOv8-LSW achieves a precision of 95.3%, recall of 94.3%, mAP50 of 98.1%, mAP50-95h of 95.6%, and F1-score of 94.80%, which represent improvements of 2.2%, 2.7%, 1.2%, 2.2%, and 2.46%, respectively, compared to the original YOLOv8n. The effectiveness of the improvements was verified through heatmap analysis and ablation experiments. The number of parameters and GFLOPS were reduced by 20.58% and 20.29%, respectively, with an FPS of 341.58. Comparison tests with various mainstream deep learning models also demonstrated that YOLO-LSW performs well in the bitter melon disease detection task. This research provides a technical solution with both lightweight design and strong generalization ability for real-time detection of bitter melon diseases in complex environments, which holds significant application value in promoting precision disease control in smart agriculture.