Precision weed detection and mapping in vegetable crops are beneficial for improving the effectiveness of weed control. This study proposes a novel method for indirect weed detection and mapping using a detection network based on the You-Only-Look-Once-v8 (YOLOv8) architecture. This approach detects weeds by first identifying vegetables and then segmenting weeds from the background using image processing techniques. Subsequently, weed mapping was established and innovative path planning algorithms were implemented to optimize actuator trajectories along the shortest possible path. Experimental results demonstrated significant improvements in both precision and computational efficiency compared with the original YOLOv8 network. The mean average precision at 0.5 (mAP50) increased by 0.2, while the number of parameters, giga floating-point operations per second (GFLOPS), and model size decreased by 0.57 million, 1.8 GFLOPS, and 1.1 MB, respectively, highlighting enhanced accuracy and reduced computational costs. Among the analyzed path planning algorithms, including Christofides, Dijkstra, and dynamic programming (DP), the Dijkstra algorithm was the most efficient, producing the shortest path for guiding the weeding system. This method enhances the robustness and adaptability of weed detection by eliminating the need to detect diverse weed species. By integrating precision weed mapping and efficient path planning, mechanical actuators can target weed-infested areas with optimal precision. This approach offers a scalable solution that can be adapted to other precision weeding applications.
Weed infestation poses a significant threat to bok choy (Brassica rapa subsp. chinensis) cultivation, reducing crop yield and quality through resource competition and pest facilitation. Traditional weed detection methods face two major bottlenecks: one is data annotation, arising from the need for extensive, species-diverse datasets, and the other is visual discrimination, due to the high morphological similarity between crops and weeds at certain growth stages. To address these challenges, this study proposed an indirect weed detection framework that combines an optimized You Only Look Once version 10 (YOLOv10) model for crop detection with Excess Green ExG-based segmentation of residual vegetation. The model incorporates RFD and C2f-WDBB modules to improve feature preservation and multi-scale fusion. Compared with baseline YOLOv10, the final proposed RCW-YOLOv10 reduced the number of parameters by 1.04 million and improved detection performance, achieving increases of 3.5%, 1.5%, and 1.1% percentage points in Precision, Recall, and mAP50, respectively, under field conditions. The system initially detected bok choy plants, subsequently localizing weeds by masking crop regions and thresholding residual ExG signals in the uncovered areas. The detected weed coordinates were used to construct a distribution map that may support targeted control in precision agriculture. This approach simplifies weed identification under the tested bok choy field conditions and may be adaptable to other crops after further validation.