Abstract:Aiming to address the challenges of real-time and accurate detection of the seeding quality of chili seedling trays, considering the computing power limitations of edge devices, a lightweight detection algorithm YOLO v8n SCS (YOLO v8n improved with StarNet, CAM, and SCConv) was proposed based on YOLO v8n. Meanwhile, the technical strategy of “ single-cell training + whole-tray detection冶 was adopted to reduce training costs and improve training efficiency. Firstly, the StarNet lightweight network and the CAM ( Context augmentation module) were used as the backbone network to achieve multi- receptive field information fusion of deep features while reducing the complexity of the model. Secondly, the spatial and channel reconstruction convolution ( SCConv) was employed to optimize the bottleneck structure of the intermediate layer cross stage partial network fusion (C2f) module to enhance the feature extraction ability of the module and improve the model inference speed. Finally, the P2 detection layer was fused and the detection heads were reduced to one to enhance the model’s detection performance for small targets. The results showed that the YOLO v8n SCS model had a parameter quantity of 1.2 × 10 6 , a memory occupation of 2.7 MB, and a computation amount of 7.6 伊 10 9 FLOPs. On the single-cell dataset of the seedling trays, its mAP50 was 98.3% , mAP50 - 95 was 83.8% , and the frame rate was 112 f / s. Compared with the baseline model YOLO v8n, the parameter quantity was reduced by 62.5% , mAP50 was increased by 2.5 percentage points, mAP50 - 95 was increased by 2.1 percentage points, the floating-point operations were reduced by 1.3 × 10 9 , and the frame rate was increased by 23.1% . In the whole-tray detection task, its detection frame rate was 21 f / s and the detection accuracy rate was 98.2% . Compared with the baseline model, the detection frame rate was increased by 8.2% and the accuracy rate was increased by 1.1 percentage points. For 72-cell seedling trays with a seeding speed within 800 trays/ h and 128-cell seedling trays with a seeding speed within 600 trays/ h, its average detection accuracy was above 96% , and the detection errors of single-seed rate, reseeding rate, and miss-seeding rate were less than 1.8% . This study achieved a good balance between performance and computational cost, reduced the computing power requirements for deploying edge devices, met the online detection needs for the seeding quality of chili seedling trays, and provided key technical support for the intelligent upgrade of the seedling production line.