Improved YOLOv11n-seg for impurity detection in mechanically harvested sugarcane
Fengguang He1,2, Sili Zhou1,2, Pinlan Chen1,2
1Agricultural Machinery Research Institute, Chinese Academy of Tropical Agricultural Sciences, Zhanjiang, Guangdong, China.
None:
The content of impurities in mechanically harvested sugarcane is a critical factor for evaluating harvest quality and determining market price. To enable intelligent detection of impurities in mechanically harvested sugarcane, this study proposes an impurity detection method based on an improved YOLOv11n-seg model. The method integrates four enhancement modules into the original YOLOv11n-seg architecture. Firstly, a lightweight C2_Ghost module is introduced into the high-channel feature extraction stages of both the backbone and neck, thereby reducing computational complexity and feature redundancy. Subsequently, a C2_FSAS module is designed to perform frequency-domain relationship modelling, enhancing long-range semantic dependency representation. An Efficient Channel Attention (ECA) mechanism is then applied to deep high-level semantic features to adaptively reweight salient feature channels. Finally, the traditional fixed interpolation-based upsampling operation is replaced with a dynamic DySample upsampling strategy to recover fine-grained edge features. Experimental results indicate that Improved YOLOv11n-seg achieves segmentation performance of 97.0%, 98.1%, 99.2%, and 82.9% in terms of P, R, mAP0.5, and mAP0.5:0.95, respectively. Compared with the original YOLOv11n-seg, the proposed model achieves a 1.8% improvement in mAP0.5:0.95, a 10.2% reduction in parameter count, and maintains a real-time inference speed of 34.8 FPS on the Jetson Xavier NX under TensorRT acceleration. Ablation studies validate the effectiveness of the four-module synergistic design, with C2_FSAS and DySample contributing most significantly to the improvement in mAP. Moreover, the model exhibits enhanced edge delineation accuracy and inter-class discrimination capability. In summary, the Improved YOLOv11n-seg achieves a favourable balance between segmentation accuracy and real-time performance, enabling precise segmentation of sugarcane segments and diverse impurity types. The proposed method provides reliable technical support for intelligent impurity rate detection in mechanically harvested sugarcane and practical deployment on edge computing platforms.


