Agricultural field segmentation using spatial attention mechanism and multi-task learning strategy
The accurate identification of agricultural fields,which are the smallest units of agricultural farming,is crucial for monitoring land resources and arable land utilization.Manual mapping methods are time-consuming and expensive,and they are incapable of real-time or near-real-time updates.To enhance agricultural field delineation efficiency,we introduce Field-Net,a field segmentation model that leverages a spatial attention mechanism and multitask learning in this research.Field-Net is based on the UNet architecture.It combines a spatial attention mechanism and a multitask learning approach.In addition to the segmentation task,we incorporate boundary identification and distance to the field boundary as two additional tasks,enabling the model to learn representative features related to fields.The model's performance was evaluated using Gaofen-1 and Ziyuan-3 satellite images with a spatial resolution of 2 m in Lijin County,Dongying City,Shandong Province.We labeled 3,480 tiles that measured 256x256 pixels in YanWo District,with 3000 used for training,360 for validation,and 120 for the spatial generalization performance test.We initially analyzed loss weight for the three tasks,i.e.,mask,boundary,and pixel-to-boundary distance,in multitask learning by using a gradient test.For multitask learning,loss weight should prioritize the mask segmentation task as the primary task,while other tasks should be considered secondary.Across the entire test set,Field-Net achieved an overall accuracy of 92.23%and an Intersection Over Union(IOU)of 87.05%.We compared Field-Net with four state-of-the-art architectures:DeepLab v3+,HRNet,LinkNet,and D-LinkNet.Field-Net outperformed all of them in semantic segmentation tasks,with an IOU that was 0.26%higher than Link-Net,the most accurate among the four compared models,and 7.59%higher than that of DeepLab v3+.In the spatial generalization performance test,the average IOU of the Field-Net model was 3.51%higher than that of the Link-Net model,and spatial generalization performance was significantly improved.Ablation tests demonstrated that the spatial attention mechanism and multitask learning strategy improved the Fl score by 1.01%and IOU by 1.6%compared with the ResUNet model.The multitask learning strategy led to an improvement of 0.18%in Fl score for Field-Net and an improvement of 0.21%in IOU.Although challenges remain in identifying contiguous fields due to unclear boundaries,future enhancements can incorporate multitemporal and high-resolution remote sensing images to improve field feature discrimination.Feature visualization analysis revealed that the spatial attention mechanism and multitask learning strategy enabled the model to learn clustered features at field boundaries and within plots,enhancing feature representativeness.Overall,the Field-Net model supports the field-level monitoring of cropland use,including nonagricultural applications,such as grain production,enhancing the efficiency and timeliness of land resource monitoring.In generating the field dataset of China,complex and fragmented croplands pose considerable challenges to this task.In the future,the problem of lack of samples for model training can be solved by accumulating field segmentation datasets from different regions by borrowing the paradigm of Image-Net,while a general model for channels,regions,and sensors should be constructed subsequently.In the future,with the arrival of the"large model"era of deep learning,constructing a model for the task of parcel segmentation is also necessary to segment every field from the perspective of model and dataset.
filed segmentationField-Net modelspatial attention mechanismmulti-task learningGF satellite data