To address the challenges of difficult weed identification in the field environment during the corn seedling stage for laser weeding robots, and insufficient positioning accuracy caused by the difficulty in obtaining accurate and real time target spatial coordinates during operation, a seedling-stage corn field crop-weed identification and positioning system was developed using an improved deep learning object detection model and a stereo vision-based spatial localization method. The results showed that: 1) Based on the original YOLOv8n model, ConvNeXt V2 was introduced as the backbone network, a detection head for small-object detection was added, and the WIoU loss function was incorporated to construct the CSW-YOLOv8n crop-weed identification model with both high accuracy and lightweight characteristics. Compared with the baseline model, the precision, recall, mAP@50, and mAP@50-95 were improved by 3.8%, 4.1%, 3.4%, and 6.9%, respectively. The model size was 11.1 MB, and the AP@50 for weed detection increased by 6.3%. 2) On the basis of target recognition, a crop-weed visual localization method based on the OAK-D-S2-PoE depth camera was proposed. Through machine vision recognition and coordinate transformation, the spatial coordinates of weed targets in the field during the motion of the laser weeding robot were obtained. Laboratory spatial localization test results showed that the mean absolute error between the measured target distance and the actual distance was 12 mm, and the mean relative error was 1.14%, indicating that the localization accuracy met the requirements for laser weeding operations. 3) Simulation weeding tests were carried out based on the constructed crop-weed identification and localization system, achieving an execution success rate of 83%, which verified the feasibility of the system in target recognition, spatial localization, and execution guidance. The crop-weed identification and localization method proposed in this study demonstrates high detection accuracy and spatial localization reliability, and provides technical support for real-time crop-weed identification, precise localization, and weeding operations by laser weeding robots in corn fields during the seedling stage.
YOLOv8n模型使用的边界框损失函数是完整交并比(Complete intersection over union,)[26]。如图6所示,不仅考虑预测框与真实框的重叠区域,还综合考虑了中心点距离、宽高比以及角度差异,能够更加全面地衡量边界框的匹配程度。其中,红色和蓝色区域分别代表目标框和预测框的位置,表示二者的重叠情况。
ZhangZ G, YuanS X, ZhangJ J. Effects of reduction combined spray assistants on weed control efficacy and physiological metabolism in maize[J]. Jiangsu Agricultural Sciences, 2022, 50(22): 125-131 (in Chinese)
WuT, ZengS, ZhaoR M, TangL M, DuP, YaoL M. Research Analysis and study on intelligentialized technologies of intra-row weeding mechanical control[J]. Journal of Agricultural Mechanization Research, 2019, 41(6): 1-6, 12 (in Chinese)
[7]
毕征伦. 除草机械化发展现状与路径分析[J]. 农机科技推广, 2025(6): 26-27
[8]
BiZ L. Development status and path analysis of weeding mechanization[J]. Agriculture Machinery Technology Extension, 2025(6): 26-27 (in Chinese)
[9]
纪禹. 1 064 nm激光清除杂草的理论与实验研究[D]. 长春: 长春理工大学, 2024
[10]
JiY. Theoretical and experimental study of 1 064 nm continuous laser for weed removal[D]. Changchun: Changchun University of Science and Technology, 2024 (in Chinese)
FanB R, ZhaiA P, WangD, LiangT, ZhangG W, CaoS Y. Research on the recognition of mixed mid-infrared spectra of hazardous chemicals based on an improved high-order residual network [J]. Spectroscopy and Spectral Analysis, 2025, 45(9): 2459-2466 (in Chinese)
ZhaoN. Study on identification method of weeds based on machine vision[J]. Wireless Internet Technology, 2016, 13(23): 141-142 (in Chinese)
[15]
SulzbachE, ScheerenI, Torres VerasM S, TosinM C, Ellert KrothW A, MerottoA Jr, MarkusC. Deep learning model optimization methods and performance evaluation of YOLOv8 for enhanced weed detection in soybeans[J]. Computers and Electronics in Agriculture, 2025, 232: 110117
CaoY L, ZhaoY W, YangL L, LiJ, QinL L. Weed identification method in rice field based on improved DeepLabv3+[J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54(12): 242-252 (in Chinese)
[18]
YuH L, CheM H, YuH, MaY T. Research on weed identification in soybean fields based on the lightweight segmentation model DCSAnet[J]. Frontiers in Plant Science, 2023, 14: 1268218
XuG Q, HuangM F, HuangJ P. Weed segmentation in multispectral images from drones based on an improved semantic segmentation model[J]. Jiangsu Agricultural Sciences, 2022, 50(12): 212-220 (in Chinese)
[21]
YuH L, MenZ B, BiC G, LiuH J. Research on field soybean weed identification based on an improved UNet model combined with a channel attention mechanism[J]. Frontiers in Plant Science, 2022, 13: 890051
CaiY L, XiaoJ Y, YuC R, SongZ, LiJ, YueX J. UANP-MT based semi-supervised image segmentation method for identifying weeds in cabbage field [J]. Transactions of the Chinese Society of Agricultural Engineering, 2023, 39(11): 183-191 (in Chinese)
WangC, WuX H, ZhangY Q, WangW J. Recognizing weeds in maize fields using shifted window Transformer network[J]. Transactions of the Chinese Society of Agricultural Engineering, 2022, 38(15): 133-142 (in Chinese)
ChenC Y, PengC, ChengY F, WangY Q, ZouS S. Research on identification of grain crops and weeds based on lightweight YOLOv5[J]. Agriculture and Technology, 2023, 43(22): 36-40 (in Chinese)
HeQ L, YangJ W, LiangJ X, FuL Y, TengJ, LiS W. Weed identification method in corn fields applied to embedded weeding robots[J]. Computer Engineering and Applications, 2024, 60(2): 304-313 (in Chinese)
[30]
PeiH T, SunY Q, HuangH, ZhangW, ShengJ J, ZhangZ Y. Weed detection in maize fields by UAV images based on crop row preprocessing and improved YOLOv4[J]. Agriculture, 2022, 12(7): 975
[31]
RaiN, ZhangY, VillamilM, HowattK, OstlieM, SunX. Agricultural weed identification in images and videos by integrating optimized deep learning architecture on an edge computing technology[J]. Computers and Electronics in Agriculture, 2024, 216: 108442
[32]
LiJ Y, ZhangW, ZhouH, YuC T, LiQ D. Weed detection in soybean fields using improved YOLOv7 and evaluating herbicide reduction efficacy[J]. Frontiers in Plant Science, 2024, 14: 1284338
[33]
WangQ F, ChengM, HuangS, CaiZ J, ZhangJ L, YuanH B. A deep learning approach incorporating YOLO v5 and attention mechanisms for field real-time detection of the invasive weed Solanum rostratum Dunal seedlings[J]. Computers and Electronics in Agriculture, 2022, 199: 107194
[34]
CaiL, ZhouC L, WangY Q, WangH, LiuB Y. Binocular vision-based pole-shaped obstacle detection and ranging study [J]. Applied Sciences, 2023, 13(23): 12617
SunH, RuanJ K, WangC, XieM M. Surface defect detection algorithm of differential shell of improved ConvNextV2-YOLOv8[J]. Instrument Technique and Sensor, 2025(2): 100-108 (in Chinese)
[38]
汪时行. 基于改进YOLOv5算法的金属表面缺陷检测研究[D]. 岳阳: 湖南理工学院, 2023
[39]
WangS X. Research on metal surface defect detection based on improved YOLOv5 algorithm[D]. Yueyang: Hunan Institute of Science and Technology, 2023 (in Chinese)