BACKGROUNDSemantic segmentation of weed and crop images is a key component and prerequisite for automated weed management. For weeds in unmanned aerial vehicle (UAV) images, which are usually characterized by small size and easily confused with crops at early growth stages, existing semantic segmentation models have difficulties to extract sufficiently fine features. This leads to their limited performance in weed and crop segmentation of UAV images.RESULTSWe proposed a fine‐grained feature‐guided UNet, named FG‐UNet, for weed and crop segmentation in UAV images. Specifically, there are two branches in FG‐UNet, namely the fine‐grained feature branch and the UNet branch. In the fine‐grained feature branch, a fine feature‐aware (FFA) module was designed to mine fine features in order to enhance the model's ability to segment small objects. In the UNet branch, we used an encoder–decoder structure to realize high‐level semantic feature extraction in images. In addition, a contextual feature fusion (CFF) module was designed for the fusion of the fine features and high‐level semantic features, thus enhancing the feature discrimination capability of the model. The experimental results showed that our proposed FG‐UNet, achieved state‐of‐the‐art performance compared to other semantic segmentation models, with mean intersection over union (MIOU) and mean pixel accuracy (MPA) of 88.06% and 92.37%, respectively.CONCLUSIONThe proposed method in this study lays a solid foundation for accurate detection and intelligent management of weeds. It will have a positive impact on the development of smart agriculture. © 2024 Society of Chemical Industry.