Lightweight detection of companion weeds in rapeseed based on improved YOLOv13n
Abstract
To solve the problems in accurately and efficiently detecting weeds in rapeseed fields under complex conditions, this paper proposes an improved MMB-YOLO model based on YOLOv13n. This model is built upon YOLOv13n and employs the MobileNetV3 lightweight architecture as the backbone network to decrease the model complexity. A lightweight detection head named MBConv is incorporated to reduce the computational cost while keeping good feature extraction ability. Additionally, the existing WIoUv3 loss function is modified by techniques such as MPDIoU (Minimum Point Distance IoU) and adaptive scaling to propose the B-WIoU loss function, which improves the model’s generalization ability and the detection precision. The training outcomes indicate that the MMB-YOLO model achieves a precision of 93.8%, a recall of 93.8%, an mAP50 of 95.8% and an mAP50-95 of 76.0%, with increments of 3.3%, 6.3%, 3.2% and 4.5% respectively compared to the original model, and the GFLOPs are reduced by 29.7%. In real-world applications, the model can detect weeds at an average speed of 25.3 FPS on an edge device, meeting the precision and speed requirements for weed detection in modern agriculture.