## 5 Conclusions  
Addressing the challenges of inaccurate weed targeting and high crop damage rates associated with traditional laser weeding equipment, the present study is the first to apply image segmentation technology to the field of laser weeding, using instance segmentation to precisely guide the laser targeting. We propose a BFFDC-YOLOv8-seg weed segmentation model that integrates dynamic snake convolution and a weighted bidirectional feature pyramid network to precisely locate the boundaries of weed stems and leaves, addressing the issues of inaccurate weed targeting and high crop damage rates in traditional laser weeding equipment. In the original YOLOv8 network, weighted multiscale feature fusion is implemented to enhance the network's ability to perceive small objects; DSConv replaces some 3 \(\times\) 3 convolutional kernels, making the existing convolutional layers more flexible and better adapted to the irregular edges of weed stems and leaves. Experimental results demonstrate that the BFFDC-YOLOv8-seg model achieves an accuracy of 97.5%, a recall of 97.5%, an mAP50 of 98.8%, and an mAP50-95 of 84.2% on the test set. Compared to the current mainstream models such as Mask-RCNN, YOLOv5-seg, YOLOv7-seg, and YOLOv8-seg, this model achieves better mAP50 values, with improvements of 10.8%, 13.4%, 1.3%, and 2.8%, respectively. Additionally, the model size is only 6.8 MB, and in stability tests on the Jetson Orin nano independent device, the actual scenes captured by the camera can be processed at a detection speed of 24.8 FPS with an mAP50 of 95.8%. The proposed model delivers precise real-time weed segmentation, making it suitable for small, cost-effective automatic laser weeding devices.  
Conceptualization, Z.L. and A.L.; methodology, Z.L. and A.L.; software, Z.L.; validation, Z.L. and Y.M.; formal analysis, Z.L. and A.L.; investigation, Z.L.; resources, Y.M.; data curation, Z.L.; writing--original draft preparation, Z.L.; writing--review and editing, Z.L. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Undergraduate Training Programs for Innovation and Entrepreneurship of Guizhou University (gzusc (2023)015).  
The weed dataset from agricultural fields used in this study contains sensitive regional information. In accordance with relevant laws and regulations, this dataset is not publicly accessible to prevent potential environmental risks and misuse. Therefore, the dataset will not be stored in any public databases nor shared via other public means. Researchers interested in accessing these data for verifying the validity of the research findings may contact the corresponding author of this paper. Access may be considered within a properly regulated and confidential frame work, provided that sufficient justification and compliance with confidentiality requirements are met. The publicly available plant instance segmentation dataset mentioned in Section 2.2.2 and the COCO128 dataset discussed in Section 3.1.1 of this paper can be accessed and downloaded via the Kaggle platform through the following link: [[https://www.kaggle.com/datasets/leozhnui/weed-seg](https://www.kaggle.com/datasets/leozhnui/weed-seg)]([https://www.kaggle.com/datasets/leozhnui/weed-seg](https://www.kaggle.com/datasets/leozhnui/weed-seg)).  
The author would like to extend sincere gratitude to the College of Big Data and Information Engineering for providing the necessary laboratory facilities and equipment that were crucial for conducting this research. Special thanks are also owed to my supervisor, whose guidance was invaluable throughout the research process. Additionally, I wish to express my deep appreciation to my family, whose unwavering support and encouragement have been a constant source of strength. Their belief in my abilities has been a great motivation.  
The authors declare no conflicts of interest.