Abstract:Aiming to address the challenges of small-scale, densely distributed, and heavily occluded weed targets in the complex background of broadcast sown pea seedling fields, as well as the difficulty of existing methods in providing regional distribution information for variable-rate weeding, YOLO-PLM, a multi-task model for weed detection and regional density estimation was proposed based on an improved YOLO 11n framework. A regional density estimation branch was introduced to enable the model to simultaneously detect weeds and generate regional density heatmaps, thereby providing regional scale information for zone specific spraying and variable rate weeding. In addition, a P2 small-object detection layer was incorporated to enhance the perception of small weed targets and local clustering patterns. To reduce computational cost, part of the downsampling convolutions was replaced with a lightweight adaptive extraction (LAE) module, and the detection head was lightweight reconstructed by using the mobile inverted bottleneck convolution module (Detect_MBConv). Experimental results showed that YOLO-PLM achieved a precision of 97.4%, recall of 92.9%, mAP@0.5 of 96.9%, and mAP@0.5:0.95 of 83.4%, which was improved by 1.9, 4.0, 2.0, and 5.3 percentage points, respectively, over that of YOLO 11n-dens. The proposed model also achieved an MAE of 0.762 plants per region and an RMSE of 1.066 plants per region for regional density estimation, with 1.95×10^6 parameters and 7.7×10^9 FLOPs. Compared with YOLO v8n-dens, YOLO v9t-dens, YOLO v10n-dens, YOLO 11n-dens, and YOLO 12n-dens, the proposed model showed superior overall performance in detection accuracy, regional density estimation, and lightweightness. The results indicated that YOLO-PLM can provide effective technical support for precision variable-rate weeding in broadcast sown pea seedling fields.