MSE-YOLOv8n: a cotton leaf disease detection model for complex backgrounds and small targets
Kaisi Xue, W. Zhang, Ziwei Gan, Chengkun Zhang
As one of China’s pivotal cash crops, cotton’s leaf health directly impacts the textile industry and agricultural economic growth, with leaf diseases emerging as a critical constraint on cotton yield. Traditional manual identification of cotton leaf diseases, plagued by high subjectivity, frequent errors, and inefficiency, fails to meet large-scale detection needs. With advances in deep learning and machine vision, image-based disease recognition has become an effective solution—and among such technologies, the YOLO series of object detection algorithms, renowned for their efficiency and accuracy, have shown remarkable potential in cotton leaf disease detection. While various YOLO-based improvements exist, detecting cotton leaf diseases in natural environments remains hindered by core challenges: complex background interference and difficulties in identifying small-target diseases. To address this, this study proposes a composite improved algorithm named MSAA-Smallhead-EMA_attention-YOLOv8n (abbreviated as M-S-E-YOLOv8n), optimized from the YOLOv8n model. Specifically, it integrates: (1) an MSAA module to enhance complex background processing and reduce interference; (2) a “Smallhead” detection head to improve small-target recognition; and (3) an EMA-attention module to strengthen feature representation while streamlining computations without losing channel information. Experimental results demonstrate that M-S-E-YOLOv8n outperforms the original YOLOv8n significantly: mAP@0.50:0.95 increases by 1.4%, precision by 3.7%, and recall by 2.9%. This effectively resolves detection challenges for cotton leaf diseases in complex environments, providing technical support for disease prevention and control in the cotton industry.