Addressing the challenges of multi-scene precision pesticide application for field broccoli crops and computational limitations of edge devices, this study proposes a lightweight broccoli detection method named DWG-YOLOv8, based on an improved YOLOv8s architecture. Firstly, Ghost Convolution is introduced into the C2f module, and the standard CBS module is replaced with Depthwise Separable Convolution (DWConv) to reduce model parameters and computational load during feature extraction. Secondly, a CDSL module is designed to enhance the model’s feature extraction capability. The CBAM attention mechanism is incorporated into the Neck network to strengthen the extraction of channel and spatial features, enhancing the model’s focus on the target. Experimental results indicate that compared to the original YOLOv8s, the DWG-YOLOv8 model has a size decreased by 35.6%, a processing time reduced by 1.9 ms, while its precision, recall, and mean Average Precision (mAP) have increased by 1.9%, 0.9%, and 3.4%, respectively. In comparative tests on complex background images, DWG-YOLOv8 showed reductions of 1.4% and 16.6% in miss rate and false positive rate compared to YOLOv8s. Deployed on edge devices using field-collected data, the DWG-YOLOv8 model achieved a comprehensive recognition accuracy of 96.53%, representing a 5.6% improvement over YOLOv8s. DWG-YOLOv8 effectively meets the lightweight requirements for accurate broccoli recognition in complex field backgrounds, providing technical support for object detection in intelligent precision pesticide application processes for broccoli.
To improve the mechanized transplanting efficiency for large-scale broccoli production in Ningxia, this study aims to identify key morphological traits of seedlings suitable for mechanized transplanting. A Box–Behnken design was used to set three experimental factors, broccoli variety, seedling age, and plug tray specification, to evaluate their effects on seedling plant type (plant height, stem diameter, canopy diameter, stem inclination angle, and plant type cone angle) and root system characteristics (substrate loss rate). The results showed that plug tray specification was the primary factor affecting substrate loss rate, followed by variety and seedling age. Seedling age was the dominant factor affecting plant height, stem diameter, and canopy diameter, while plug tray specification primarily influenced stem inclination angle. Optimization via response surface methodology (RSM) indicated that the best transplanting performance was achieved with the “Hannai Youxiu” variety (excellent cold tolerance), 30-day-old seedlings, and 72-cell or 98-cell plug trays. Field validation confirmed that under these optimal parameters the mechanized transplanting feeding rate reached 100%, the seedling missing rate was 2.5%, and the transplanting qualification rate was 97.5%, with all RMSE values being less than 7.5%. These findings provide a scientific basis for the mechanized transplanting of broccoli in Ningxia, recommending the “Hannai Youxiu” variety and 98-cell plug trays with 30-day-old seedlings to enhance transplanting quality and production efficiency.