Precision weeding is crucial for maximizing crop yields and minimizing herbicide use. However, deploying standard deep learning models in agriculture faces challenges due to the high morphological diversity of weeds and the computational constraints of edge devices. Hence, this study proposes MCS-YOLO, a lightweight detection model based on the YOLOv8 architecture. First, a channel-level Mamba module is integrated into the backbone to model long-range feature dependencies and enhance global texture representation. The LMAB module employs parallel depthwise separable convolutions with varying receptive fields and coordinate attention to improve multi-scale weed discrimination. To mitigate feature blurring and misalignment during upsampling, the LCAU module adopts dynamic offset sampling beyond fixed interpolation methods. Finally, the SCS-Head integrates dual-branch depthwise separable convolution with channel shuffling to reduce parameter redundancy while preserving efficient feature expression. Experimental results on the Weed-Crop dataset demonstrate that MCS-YOLO achieves 76.4% mAP@50 and 38.3% mAP@50–95, outperforming YOLOv8s by 3.1% and 1.5%, respectively. Furthermore, the parameter count is reduced by 20.7%, from 11.13 M to 8.83 M, and GFLOPs are reduced by 39.6%, from 28.5 to 17.2. These results confirm that MCS-YOLO effectively balances a lightweight design with high detection accuracy, offering a viable solution for real-time weed detection and automated weeding on embedded agricultural platforms.
29 October 2026 in Measurement Science and Technology
Accurate crop–weed discrimination is essential for site-specific weed management and reduced herbicide use in precision agriculture. In real field environments, irregular plant morphology, small targets, mutual leaf occlusion, and cluttered soil backgrounds degrade detection accuracy, while on-board deployment further requires real-time inference on resource-constrained devices. This study proposes RT-CWDT, a lightweight real-time crop–weed detector that improves the feature representation of RT-DETR-R18 in the backbone, in the enhancement of the high-level feature, and in the encoder. The selective gated residual block restricts the spatial convolution of the backbone to a quarter of the channels and recalibrates the result with a gated module. The dual-attention hybrid-kernel module applies attention-guided large kernels to part of the channels of the high-level feature and preserves lightweight local feature modeling on the remaining ones. The adaptive sampling encoder combines deformable sampling with a reordering attention, enabling high-level features to align with the irregular geometry of plants rather than a fixed token grid. On the Weed-Crop dataset, RT-CWDT reaches 76.7% precision, 73.0% recall, 75.9% mAP50, and 38.8% mAP50:95, outperforming RT-DETR-R18 by 3.5 percentage points in mAP50 while reducing parameters by 21.1% and GFLOPs by 18.1%. RT-CWDT also outperforms RT-DETR-R18 on the CropAndWeed and ImageWeeds datasets, which differ in species, label scheme, and viewpoint, and it keeps its advantage under both single-factor and compound simulated imaging degradations. Using TensorRT INT8 on an NVIDIA Jetson Orin NX, RT-CWDT runs at 51.9 FPS against 42.0 FPS for RT-DETR-R18. RT-CWDT therefore improves detection accuracy while maintaining a lightweight architecture and real-time inference, which suits the detection of crops and weeds on a resource-constrained embedded device.