Qianqian Mu, Yongke Li, Nueraili Aierken, Lei Wang, Tao Zhao, Mengli Shan, Bowen Mao, En Yu
The cotton field weed detection model must balance detection accuracy, model size, and inference efficiency when deployed at the edge. This study constructed a dataset comprising four types of weeds based on field images collected from cotton fields in Xinjiang and proposed a lightweight detection model, RGC-YOLO, based on YOLOv8n. The model incorporates R-UIB modules into the deep layers of the backbone network to reduce the number of parameters and computational load during the high-channel feature extraction stage. A G-C2f module is introduced at the P5 feature fusion point in the neck network to improve the efficiency of deep semantic feature fusion. Additionally, a DIoU loss function is employed to strengthen the constraints on bounding box localization. The results show that, compared to YOLOv8n, RGC-YOLO achieves a 2.65% improvement in the mAP@0.75, while reducing the number of parameters and GFLOPs by 35.22% and 15.37%, respectively. This indicates that the model effectively reduces complexity while enhancing high-IoU localization performance. Eigen-CAM analysis further demonstrates that RGC-YOLO produces more concentrated feature responses in weed target regions and reduces irrelevant background activations. On the Jetson AGX Orin platform, the FP16 TensorRT engine for RGC-YOLO achieves high throughput and a compact footprint, demonstrating that its lightweight design translates into benefits for edge deployment. External validation on a sesame-field binary crop-weed dataset and the 2SeasonWeedDet8 multi-class weed dataset further confirms that RGC-YOLO maintains comparable detection performance while preserving its lightweight advantage across different agricultural scenarios.