AUTHOR=Li Yadong , Guo Ruinan , Li Rujia , Ji Rongbiao , Wu Mengyao , Chen Dinghao , Han Cong , Han Ruilin , Liu Yongxiu , Ruan Yuwen , Yang Jianping TITLE=An improved U-net and attention mechanism-based model for sugar beet and weed segmentation JOURNAL=Frontiers in Plant Science VOLUME=Volume 15 - 2024 YEAR=2025 URL=https://www.frontiersin.org/journals/plant-science/articles/10.3389/fpls.2024.1449514 DOI=10.3389/fpls.2024.1449514 ISSN=1664-462X ABSTRACT=IntroductionWeeds are a major factor affecting crop yield and quality. Accurate identification and localization of crops and weeds are essential for achieving automated weed management in precision agriculture, especially given the challenges in recognition accuracy and real-time processing in complex field environments. To address this issue, this paper proposes an efficient crop-weed segmentation model based on an improved UNet architecture and attention mechanisms to enhance both recognition accuracy and processing speed.MethodsThe model adopts the encoder-decoder structure of UNet, utilizing MaxViT (Multi-Axis Vision Transformer) as the encoder to capture both global and local features within images. Additionally, CBAM (Convolutional Block Attention Module) is incorporated into the decoder as a multi-scale feature fusion module, adaptively adjusting feature map weights to enable the model to focus more accurately on the edges and textures of crops and weeds.Results and discussionExperimental results show that the proposed model achieved 84.28% mIoU and 88.59% mPA on the sugar beet dataset, representing improvements of 3.08% and 3.15% over the baseline UNet model, respectively, and outperforming mainstream models such as FCN, PSPNet, SegFormer, DeepLabv3+, and HRNet. Moreover, the model’s inference time is only 0.0559 seconds, reducing computational overhead while maintaining high accuracy. Its performance on a sunflower dataset further verifies the model’s generalizability and robustness. This study, therefore, provides an efficient and accurate solution for crop-weed segmentation, laying a foundation for future research on automated crop and weed identification.