Abstract:Quality detection of sugarcane seed segments is a key step in the pre-cutting preparation process. To address challenges such as complex environments and limited computational resources on edge devices in practical seed preparation scenarios, a lightweight sugarcane seed quality detection method was proposed based on an improved YOLO v8n model. By introducing mixed local channel attention (MLCA) and partial convolution (PConv) to the network structure, redundant computations were effectively reduced while enhancing the model’s focus on critical features. A dynamic upsampling module (DySample) was adopted in the neck network to more accurately capture the boundaries and details of feature points. Additionally, the detection head was improved by using a re-parameterized shared convolution structure, further reducing model complexity. The final model, named YOLO v8-SD, was integrated with a monocular camera distance estimation algorithm to calculate the distance between the cut surface and adjacent sugarcane nodes. Experimental results showed that YOLO v8-SD achieved an mAP50 of 98.3%, a frame detection speed of 142.9f/s, and a model size of only 3.45MB. Compared with the original model, the parameter count and FLOPs were reduced by 47.8% and 33.3%, respectively, the model size was reduced by 41.9%, and the frame rate was increased by 7.8f/s. Furthermore, the proposed method achieved an average relative error of less than 6.1% in cut-surface distance estimation. The improved model was deployed on an NVIDIA Jetson Orin NX development board and tested in a prototype sugarcane seed screening system. The results demonstrated an average detection accuracy of 97.33% across different sugarcane varieties, meeting the requirements of practical applications.