Skip to main content
SLU publication database (SLUpub)

Research article2024Peer reviewedOpen access

Cross-domain transfer learning for weed segmentation and mapping in precision farming using ground and UAV images

Gao, Junfeng; Liao, Wenzhi; Nuyttens, David; Lootens, Peter; Xue, Wenxin; Alexandersson, Erik; Pieters, Jan


Weed and crop segmentation is becoming an increasingly integral part of precision farming that leverages the current computer vision and deep learning technologies. Research has been extensively carried out based on images captured with a camera from various platforms. Unmanned aerial vehicles (UAVs) and ground-based vehicles including agricultural robots are the two popular platforms for data collection in fields. They all contribute to site-specific weed management (SSWM) to maintain crop yield. Currently, the data from these two platforms is processed separately, though sharing the same semantic objects (weed and crop). In our paper, we have proposed a novel method with a new deep learning-based model and the enhanced data augmentation pipeline to train field images alone and subsequently predict both field images and UAV images for weed segmentation and mapping. The network learning process is visualized by feature maps at shallow and deep layers. The results show that the mean intersection of union (IOU) values of the segmentation for the crop (maize), weeds, and soil background in the developed model for the field dataset are 0.744, 0.577, 0.979, respectively, and the performance of aerial images from an UAV with the same model, the IOU values of the segmentation for the crop (maize), weeds and soil background are 0.596, 0.407, and 0.875, respectively. To estimate the effect on the use of plant protection agents, we quantify the relationship between herbicide spraying saving rate and grid size (spraying resolution) based on the predicted weed map. The spraying saving rate is up to 90 % when the spraying resolution is at 1.78 × 1.78 cm2 . The study shows that the developed deep convolutional neural network could be used to classify weeds from both field and aerial images and delivers satisfactory results. To achieve this performance, it is crucial to perform preprocessing techniques that reduce dataset differences between two distinct domains.


Deep learning; Remote sensing; Cross-domain learning; Weighted loss; Feature visualization; Weed mapping

Published in

Expert Systems with Applications
2024, Volume: 246, article number: 122980

    Associated SLU-program

    SLU Plant Protection Network

    UKÄ Subject classification

    Agricultural Science
    Computer Vision and Robotics (Autonomous Systems)

    Publication identifier


    Permanent link to this page (URI)