A method for farmland segmentation in remote sensing images based on multi-task learning
Through multi-task learning combined with improved edge detection and semantic segmentation models, the loss weight is dynamically adjusted, which solves the problem of inaccurate edge and internal information extraction in remote sensing recognition of cultivated land plots, and achieves efficient cultivated land plot recognition.
Patent Information
- Application Number
- CN202310289901.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2043-03-23
AI Technical Summary
The existing remote sensing recognition method for cultivated land plots based on deep convolutional neural network cannot accurately obtain the information of the plot edge and internal area, and the feature extraction efficiency of the mixed method is not high.
Using a multi-task learning method, combined with the improved edge detection model DexiNed and the semantic segmentation model UNet, the subtask loss weight is adjusted through the dynamic average weighting algorithm, and a farmland plot recognition is used to identify cultivated land using the expansion sliding window prediction method, and a farmland plot recognition network model is constructed.
It improves the accuracy and robustness of farmland land identification, ensures the accuracy of information on the edge and internal area of the plot, reduces the calculation complexity and parameter quantity, and enhances the identification accuracy at the boundaries of the plot.
Smart Images

Figure CN116188993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of farmland plot information extraction and remote sensing image processing, and in particular to a remote sensing image farmland plot segmentation method based on multi-task learning. Background Art
[0002] Arable land parcels are enclosed areas of farmland with consistent land use. They serve as the fundamental units for farmland management and planning, and as the foundation for agricultural production activities. Obtaining high-precision parcel information is crucial for understanding farmland dynamics, assisting with farmland resource allocation, and promoting the development of precision agriculture technology platforms.
[0003] Remote sensing technology, with its wide observation angles and timely data, often provides data support for agricultural applications such as farmland parcel information extraction. Remote sensing methods for farmland parcel identification based on deep convolutional neural networks (CNNs) have several drawbacks. First, methods that use only CNN edge detection models to detect parcel edges and subsequently extract farmland parcels cannot directly obtain independent and accurate closed parcels, often requiring cumbersome post-processing steps. Second, methods that use only CNN semantic segmentation models to identify parcels tend to overlook the edge effects of plant species or other vegetation, resulting in the extraction of parcels lacking accurate edge information. Third, hybrid methods that combine the advantages of edge detection and semantic segmentation have achieved superior performance to the aforementioned two methods. However, existing studies often implement them in a step-by-step manner, resulting in inefficient feature extraction.
[0004] Multi-task learning is a machine learning method that obtains additional information about the main task from multiple related tasks to influence the task outcomes. Its goal is to improve prediction efficiency and accuracy through inductive transfer and shared representations. The most commonly used multi-task learning parameter sharing method in deep learning is hard parameter sharing. This method uses the same underlying parameters between different tasks and designs different model outputs to meet the different requirements of each task. Compared to single-task learning, multi-task learning methods are more helpful in optimizing the generalization error of the model and improving the overall performance of the model. Existing methods for remote sensing imagery farmland segmentation based on multi-task learning suffer from low accuracy in identifying plot boundaries. Summary of the Invention
[0005] In order to solve the defect that remote sensing identification of cultivated land plots cannot obtain accurate plot edge information and internal area information, the purpose of the present invention is to provide a remote sensing image cultivated land plot segmentation method based on multi-task learning that can accurately identify cultivated land plots with accurate edge structure and area information.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for segmenting cultivated land plots from remote sensing images based on multi-task learning, the method comprising the following steps in sequence:
[0007] (1) Produce a farmland plot dataset based on remote sensing images;
[0008] (2) Improve the edge detection model DexiNed and obtain the improved edge detection model DexiNed as the edge branch;
[0009] (3) Using the decoder of the semantic segmentation model UNet as a reference, a semantic branch is built. The edge branch and the semantic branch together form a farmland parcel recognition network model based on multi-task learning;
[0010] (4) Using a dynamic average weighting algorithm to adaptively adjust the subtask loss weights of the farmland plot recognition network model based on multi-task learning;
[0011] (5) Input the cultivated land plot dataset into the cultivated land plot recognition network model based on multi-task learning for training;
[0012] (6) The large-scale remote sensing image to be segmented is input into the trained farmland parcel recognition network model based on multi-task learning, and the expansion sliding window prediction method is used for prediction to obtain the farmland parcel recognition results in the area.
[0013] The step (1) specifically includes the following steps:
[0014] (1) Create a farmland plot dataset based on remote sensing images and divide it into a training set and a test set;
[0015] (2) Improve the edge detection model DexiNed and obtain the improved edge detection model DexiNed as the edge branch;
[0016] (3) Using the decoder of the semantic segmentation model UNet as a reference, a semantic branch is built. The edge branch and the semantic branch together form a farmland parcel recognition network model based on multi-task learning;
[0017] (4) Using a dynamic average weighting algorithm to adaptively adjust the subtask loss weights of the farmland plot recognition network model based on multi-task learning;
[0018] (5) Input the training set into the farmland plot recognition network model based on multi-task learning for training;
[0019] (6) The large-scale remote sensing image to be segmented is input into the trained farmland parcel recognition network model based on multi-task learning, and the expansion sliding window prediction method is used for prediction to obtain the farmland parcel recognition results in the area.
[0020] The step (2) specifically includes the following steps:
[0021] (2a) removing the sixth main detection module of the edge detection model DexiNed and the corresponding side output of the sixth main detection module to obtain a simplified DexiNed network model, wherein the simplified DexiNed network model has five main detection modules;
[0022] (2b) Depthwise separable convolution is used to replace the ordinary convolution in the five main detection modules of the simplified DexiNed network model; under the same input conditions, the ratio relationship is used to measure the optimization effect of the convolution parameters as follows:
[0023]
[0024] Among them, P DSC and P C They represent the parameters of depth-wise separable convolution and ordinary convolution respectively; M represents the channel dimension of the input feature map; N represents the channel dimension of the output feature map; H k 、W k Indicates the size of the convolution kernel.
[0025] The step (3) specifically includes the following steps:
[0026] (3a) Building the semantic branch: Use six 3*3 convolutional layers to form three groups of convolutions. Upsampling is achieved by transposed convolution between adjacent convolution groups. By the third group of convolutions, the resolution of the feature map becomes half of the original image size. After the third group of convolutions, an upsampling operation is added to fully restore the resolution of the feature map to the same size as the input, so that it can match the reference mask;
[0027] (3b) Add a global efficient context module to each level of the semantic branch built in step (3a) to capture the long-range dependency of features;
[0028] (3c) The global efficient context module first performs two transformations on the input features. One transformation uses a two-dimensional 1×1 convolution and a Softmax activation function to obtain a global attention weight matrix of size HM×1×1. The other transformation flattens the spatial dimension of the feature map and transforms the scale to C×HW. The two outputs are matrix multiplied to obtain a global feature F of scale C×1×1 as described in formula (2). Subsequently, the feature map is input into a one-dimensional convolution to capture the interaction information between channels. The convolution kernel scale K represents the channel coverage rate near a certain channel that participates in the generation of the attention weight of the channel. It is a parameter dynamically determined by formula (3) and is positively correlated with the channel dimension C. The higher the dimension, the easier it is for the channel to interact with remote information. Finally, the features obtained by the above transformation and the original features are added pixel by pixel. The input and output relationship of the entire global efficient context module is shown in formula (4):
[0029]
[0030]
[0031]
[0032] Among them, m, j represent the enumeration index of the feature map position; N p Represents the number of positions in the feature map; W k represents the weight of the 1×1 convolution kernel; x j 、x m Represents the characteristic response at any position; represents the adaptive change function of the convolution kernel; |·| odd The value of the convolution kernel scale K is limited to an odd number; γ and b are constants used to change the channel dimension and the convolution kernel size, usually 2 and 1; z i Indicates module output; x i Represents the module input, W q Represents the weight of the one-dimensional convolution kernel.
[0033] The step (4) specifically includes the following steps:
[0034] (4a) The dynamic average weighted algorithm is used to adaptively assign task loss weights. The overall loss calculation method of the farmland plot recognition network model based on multi-task learning is:
[0035] L total =ω seg L seg +ω edge L edge (5)
[0036] Among them, L total 、L seg 、Ledge Respectively represent the overall loss function, segmentation task loss function and edge detection task loss function; ω seg is the weight of the semantic segmentation subtask loss function, ω edge is the weight of the loss function of the edge detection subtask;
[0037] (4b) The dynamic average weighted algorithm dynamically updates the sample weight according to the task learning rate and uses the loss reduction rate as the learning rate measurement standard. When the subtask learning rate is faster, the corresponding task importance is reduced so that the training speed of each task is in a balanced state. The loss reduction rate and weight coefficient calculation formulas are shown in formulas (6) and (7):
[0038]
[0039]
[0040] Among them, ω k (t) represents the weight coefficient of the loss function of subtask k in the current training round; S represents the weight scaling factor, and the weighted sum is S; λ k (t-1) represents the learning rate of subtask k; T represents the weight distribution control factor. The larger T is, the more uniform the weight distribution is. and Represents the loss function of the previous round and the previous round.
[0041] The step (5) specifically includes the following steps:
[0042] (5a) The model training and prediction processes were completed on a 64-bit Ubuntu server, using the PyTorch framework based on Python 3.7 and CUDNN 11.3. The CPU and GPU used were a 2.20 GHz Intel Xeon E5-2650 v4 and an NVIDIA GTX 1080Ti, respectively.
[0043] (5b) Adam optimizer is used to optimize the network model parameters, the initial learning rate is set to 10-4, and the training batch size is set to 8.
[0044] In step (6), the expanded sliding window prediction method is as follows: the sliding window is set to 512*512 pixels in size, and each movement only outputs the prediction results of 256*256 pixels at the center position, discarding other places. The discarded places will become the center positions of other prediction output images, ensuring lossless prediction of the entire image.
[0045] It can be seen from the above technical solutions that the beneficial effects of the present invention are: First, the present invention builds a network model based on a deep learning method. Compared with image processing technology methods based on human experience or professional knowledge, it can extract richer advanced features such as context information, high-order semantic information, spatial morphology information, etc., thereby making the accuracy and robustness of land parcel recognition better; Second, the global efficient context module of the present invention combines the characteristics of efficient channel attention and global context modules, and has the advantage of further reducing the complexity of module structure, calculation amount and parameter amount on the basis of realizing the remote feature dependency capture function; Third, the adaptive dynamic average weighted algorithm adopted by the present invention reasonably allocates edge detection and semantic analysis in the land parcel recognition task scenario. The contribution of the sub-tasks is determined, which avoids the dominance of any sub-task in the model feature learning; Fourth, the network model constructed based on the multi-task joint learning method of the present invention regards the recognition of cultivated land plots as an image segmentation task, and improves the recognition accuracy at the boundaries of plots by enhancing the expression of plot edge features. It solves the problems that only edge detection models cannot directly obtain independent and accurate closed plots, only plots extracted using semantic segmentation models are prone to lack of accurate edge structures, and the hybrid step-by-step method combining the advantages of edge detection and semantic segmentation has low feature extraction efficiency. The cultivated land plot recognition network model based on multi-task learning has the advantages of strong robustness, relatively regular geometric structure at the edges of recognition results, and less mis-segmentation and missed segmentation of internal areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of the method of the present invention;
[0047] Figure 2 Schematic diagram of the structure of the farmland plot recognition network model based on multi-task learning in the present invention;
[0048] Figure 3 Schematic diagram of the structure of the improved edge detection model DexiNed in the present invention;
[0049] Figure 4 Schematic diagram of the structure of the global efficient context module in the present invention;
[0050] Figure 5 This is the result map of cultivated land identification in the present invention. DETAILED DESCRIPTION
[0051] like Figure 1 As shown in FIG, a method for segmenting cultivated land plots in remote sensing images based on multi-task learning includes the following steps in sequence:
[0052] (1) Create a farmland plot dataset based on remote sensing images and divide it into a training set and a test set;
[0053] (2) Improve the edge detection model DexiNed and obtain the improved edge detection model DexiNed as the edge branch;
[0054] (3) Using the decoder of the semantic segmentation model UNet as a reference, a semantic branch is built. The edge branch and the semantic branch together form a farmland parcel recognition network model based on multi-task learning;
[0055] (4) Using a dynamic average weighting algorithm to adaptively adjust the subtask loss weights of the farmland plot recognition network model based on multi-task learning;
[0056] (5) Input the training set into the farmland plot recognition network model based on multi-task learning for training;
[0057] (6) The large-scale remote sensing image to be segmented is input into the trained farmland parcel recognition network model based on multi-task learning, and the expansion sliding window prediction method is used for prediction to obtain the farmland parcel recognition results in the area.
[0058] The step (1) specifically includes the following steps:
[0059] (1a) Download 17-level Google Earth remote sensing images with a spatial resolution of 2.15 meters;
[0060] (1b) Open the downloaded remote sensing image in the geographic information processing software ArcGIS, use the manual annotation method of visual interpretation to outline the cultivated land plot surface vector, and use the feature to line tool to convert the surface vector into a line vector;
[0061] (1c) Convert the surface vector and line vector obtained in step (1b) to a vector-to-raster format, and output semantic labels and edge labels at the same scale as the remote sensing image. In the labels, white represents cultivated land pixels with a pixel value of 1, and black represents background pixels with a pixel value of 0.
[0062] (1d) Using the sliding window cropping method to simultaneously crop the remote sensing image, semantic labels, and edge labels, we obtain an initial sample set of 747 pairs of pixels with a size of 512*512.
[0063] (1f) The initial sample set is expanded to 6 times its original size by data augmentation using vertical flipping, horizontal flipping, and rotations of 90°, 180°, and 270°, generating a farmland plot dataset with 4482 pairs of images and labels. 90% of the data in the farmland plot dataset is used as the training set, and the remaining 10% of the data is used as the test set.
[0064] The step (2) specifically includes the following steps:
[0065] (2a) removing the sixth main detection module of the edge detection model DexiNed and the corresponding side output of the sixth main detection module to obtain a simplified DexiNed network model, wherein the simplified DexiNed network model has five main detection modules;
[0066] (2b) Depthwise separable convolution is used to replace the ordinary convolution in the five main detection modules of the simplified DexiNed network model. Depthwise separable convolution can achieve the same function as ordinary convolution while reducing the number of model parameters and computational complexity. Under the same input conditions, the ratio relationship is used to measure the optimization effect of convolution parameters as follows:
[0067]
[0068] Among them, P DSC and P C They represent the parameters of depth-wise separable convolution and ordinary convolution respectively; M represents the channel dimension of the input feature map; N represents the channel dimension of the output feature map; H k 、W k Indicates the size of the convolution kernel.
[0069] The step (3) specifically includes the following steps:
[0070] (3a) Building the semantic branch: Use six 3*3 convolutional layers to form three groups of convolutions. Upsampling is achieved by transposed convolution between adjacent convolution groups. By the third group of convolutions, the resolution of the feature map becomes half of the original image size. After the third group of convolutions, an upsampling operation is added to fully restore the resolution of the feature map to the same size as the input, so that it can match the reference mask;
[0071] (3b) Adding a global efficient context module to each level of the semantic branch built in step (3a) to capture the long-range dependency of features, so that the farmland parcel recognition network model based on multi-task learning can fully understand the farmland parcel recognition task from a global perspective;
[0072] (3c) Figure 4As shown in Figure 1, the global efficient context module first performs two-way transformation on the input features. One way uses a two-dimensional 1×1 convolution and a Softmax activation function to obtain a global attention weight matrix of size HM×1×1. The other way flattens the spatial dimension of the feature map and transforms the scale to C×HW. The two outputs are matrix multiplied to obtain a global feature F of scale C×1×1 as described in formula (2). Subsequently, the feature map is input into a one-dimensional convolution to capture the interaction information between channels. The convolution kernel scale K represents the channel coverage rate near a certain channel that participates in the generation of the attention weight of the channel. It is a parameter dynamically determined by formula (3) and is positively correlated with the channel dimension C. The higher the dimension, the easier it is for the channel to interact with remote information. Finally, the features obtained by the above transformation and the original features are added pixel by pixel. The input and output relationship of the entire global efficient context module is shown in formula (4):
[0073]
[0074]
[0075]
[0076] Among them, m, j represent the enumeration index of the feature map position; N p Represents the number of positions in the feature map; W k represents the weight of the 1×1 convolution kernel; x j 、x m Represents the characteristic response at any position; represents the adaptive change function of the convolution kernel; |·| odd The value of the convolution kernel scale K is limited to an odd number; γ and b are constants used to change the channel dimension and the convolution kernel size, usually 2 and 1; z i Indicates module output; x i Represents the module input, W q Represents the weight of the one-dimensional convolution kernel.
[0077] The step (4) specifically includes the following steps:
[0078] (4a) Since the contribution of each task to the farmland parcel recognition network model based on multi-task learning is different during the target optimization process, in order to prevent some tasks from dominating in the gradient backpropagation stage and affecting the effect of the farmland parcel recognition network model based on multi-task learning, the dynamic weighted average algorithm (DWA) is used to adaptively allocate task loss weights. The overall loss calculation method of the farmland parcel recognition network model based on multi-task learning is:
[0079] L total=ω seg L seg +ω edge L edge (5)
[0080] Among them, L total 、L seg 、L edge Respectively represent the overall loss function, segmentation task loss function and edge detection task loss function; ω seg is the weight of the semantic segmentation subtask loss function, ω edge is the weight of the loss function of the edge detection subtask;
[0081] (4b) The dynamic average weighted algorithm dynamically updates the sample weight according to the task learning rate and uses the loss reduction rate as the learning rate measurement standard. When the subtask learning rate is faster, the corresponding task importance is reduced so that the training speed of each task is in a balanced state. The loss reduction rate and weight coefficient calculation formulas are shown in formulas (6) and (7):
[0082]
[0083]
[0084] Among them, ω k (t) represents the weight coefficient of the loss function of subtask k in the current training round; S represents the weight scaling factor, and the weighted sum is S; λ k (t-1) represents the learning rate of subtask k; T represents the weight distribution control factor. The larger T is, the more uniform the weight distribution is. and Represents the loss function of the previous round and the previous round.
[0085] The step (5) specifically includes the following steps:
[0086] (5a) The model training and prediction processes were completed on a 64-bit Ubuntu server, using the PyTorch framework based on Python 3.7 and CUDNN 11.3. The CPU and GPU used were a 2.20 GHz Intel Xeon E5-2650 v4 and an NVIDIA GTX 1080Ti, respectively.
[0087] (5b) Adam optimizer is used to optimize the network model parameters, the initial learning rate is set to 10-4, and the training batch size is set to 8.
[0088] In step (6), considering that a complete remote sensing image often contains a large number of pixels, directly inputting it into the farmland plot recognition network model based on multi-task learning will cause computer memory overflow, so it is necessary to adopt a method of first dividing and then seamlessly splicing for prediction. The input remote sensing image is cropped into small images in sequence. In order to prevent the pixels at the boundary of the remote sensing image from producing obvious splicing marks during the process of splicing and restoring it into a large image, which affects the image prediction effect, the expansion sliding window prediction method is as follows: the sliding window is set to 512*512 pixels in size, and each movement only outputs the prediction results of 256*256 pixels at the center position, and discards other places. The discarded places will become the center position of other prediction output images, ensuring lossless prediction of the entire image.
[0089] like Figure 2 As shown in the figure, the farmland parcel recognition network model based on multi-task learning consists of an edge branch and a semantic branch. The edge branch is responsible for edge detection in the input image, while the semantic branch is responsible for object segmentation. Multi-task learning uses edge detection as an auxiliary task and enhances the feature expression of the main task of semantic segmentation through inductive transfer and shared representation. After the input image is feature-encoded by the encoder, the objectives of the two tasks are optimized under the guidance of edge labels and semantic labels respectively.
[0090] like Figure 3 As shown in the figure, the edge branch of the multi-task cultivated land plot recognition network is composed of a lightweight optimized edge detection model DexiNed. The lightweight optimization method includes two aspects: first, the sixth main detection stage and the corresponding side output of the DexiNed model are removed; second, the ordinary convolution in the main detection module is replaced by depthwise separable convolution, which effectively reduces the number of model parameters and calculations, and reduces the requirements of the overall network model for computer storage and running performance.
[0091] like Figure 4 As shown in the figure, the global efficient context module consists of three parts: the context modeling module, the channel dependency transformation module, and the feature fusion module. The context modeling module is responsible for obtaining the global relationship information of the feature map. The channel dependency transformation module emphasizes the key channel features and suppresses useless information through nonlinear transformation. The feature fusion module uses the broadcast mechanism to aggregate the global information to each position of the feature map.
[0092] like Figure 5As shown, two typical scenes from the test set are selected to demonstrate the multi-task learning-based farmland parcel recognition network model of the present invention. In one scene, the image contains more farmland pixels, while in the other scene, the image contains a denser proportion of non-farmland pixels. The farmland parcels obtained by the multi-task learning-based farmland parcel recognition network model in both scenes are closely aligned with the ground truth. Whether it is farmland areas, parcel outlines, or small-scale features such as ridges, the segmentation results are relatively accurate.
[0093] In summary, the global efficient context module of the present invention combines the characteristics of efficient channel attention and global context modules, and has the advantage of further reducing the complexity of module structure, computational complexity and parameter quantity on the basis of realizing the remote feature dependency capture function; the adaptive dynamic average weighted algorithm adopted by the present invention reasonably distributes the contribution of edge detection and semantic segmentation subtasks in the land parcel recognition task scenario, avoiding any subtask from dominating the model feature learning.
Claims
1. A method for segmenting cultivated land plots from remote sensing images based on multi-task learning, characterized by: The method comprises the following steps in sequence: (1) Create a farmland plot dataset based on remote sensing images and divide it into a training set and a test set; (2) Improve the edge detection model DexiNed and obtain the improved edge detection model DexiNed as the edge branch; (3) Using the decoder of the semantic segmentation model UNet as a reference, a semantic branch is built. The edge branch and the semantic branch together form a farmland parcel recognition network model based on multi-task learning; (4) Using a dynamic average weighting algorithm to adaptively adjust the subtask loss weights of the farmland plot recognition network model based on multi-task learning; (5) Input the training set into the farmland plot recognition network model based on multi-task learning for training; (6) The large-scale remote sensing image to be segmented is input into the trained farmland parcel recognition network model based on multi-task learning, and the expansion sliding window prediction method is used to perform prediction to obtain the farmland parcel recognition result; The step (1) specifically includes the following steps: (1a) Download 17-level Google Earth remote sensing images with a spatial resolution of 2.15 meters; (1b) Open the downloaded remote sensing image in the geographic information processing software ArcGIS, draw the surface vector of the cultivated land plot, and use the feature to line tool to convert the surface vector into a line vector; (1c) Convert the surface vector and line vector obtained in step (1b) to a vector-to-raster format, and output semantic labels and edge labels at the same scale as the remote sensing image. In the labels, white represents cultivated land pixels with a pixel value of 1, and black represents background pixels with a pixel value of 0. (1d) Using the sliding window cropping method to simultaneously crop the remote sensing image, semantic labels, and edge labels, we obtain an initial sample set of 747 pairs of pixels with a size of 512*512. (1f) The initial sample set is expanded to 6 times the original size by vertical flipping, horizontal flipping, and rotating 90°, 180°, and 270° data augmentation to generate a farmland plot dataset with 4482 pairs of images and labels. 90% of the data in the farmland plot dataset is used as the training set, and the remaining 10% of the data is used as the test set. The step (2) specifically includes the following steps: (2a) removing the sixth main detection module of the edge detection model DexiNed and the corresponding side output of the sixth main detection module to obtain a simplified DexiNed network model, wherein the simplified DexiNed network model has five main detection modules; (2b) Using depthwise separable convolution to replace the ordinary convolution in the five main detection modules of the simplified DexiNed network model, the improved edge detection model DexiNed is obtained; under the same input conditions, the optimization effect of the convolution parameters is measured using the ratio relationship as follows: Among them, P DSC and P C They represent the parameters of depth-wise separable convolution and ordinary convolution respectively; M represents the channel dimension of the input feature map; N represents the channel dimension of the output feature map; H k 、W k Indicates the size of the convolution kernel.
2. The method for segmenting cultivated land plots from remote sensing images based on multi-task learning according to claim 1, characterized in that: The step (3) specifically includes the following steps: (3a) Building the semantic branch: Use six 3*3 convolutional layers to form three groups of convolutions. Upsampling is achieved by transposed convolution between adjacent convolution groups. By the third group of convolutions, the resolution of the feature map becomes half of the original image size. After the third group of convolutions, an upsampling operation is added to fully restore the resolution of the feature map to the same size as the input, so that it can match the reference mask; (3b) Add a global efficient context module to each level of the semantic branch built in step (3a) to capture the long-range dependency of features; (3c) The global efficient context module first performs two transformations on the input features. One transformation uses a two-dimensional 1×1 convolution and a Softmax activation function to obtain a global attention weight matrix of size HM×1×1. The other transformation flattens the spatial dimension of the feature map and transforms the scale to C×HW. The two outputs are matrix multiplied to obtain a global feature F of scale C×1×1 as described in formula (2). Subsequently, the feature map is input into a one-dimensional convolution to capture the interaction information between channels. The convolution kernel scale K represents the channel coverage rate near a certain channel that participates in the generation of the attention weight of the channel. It is a parameter dynamically determined by formula (3) and is positively correlated with the channel dimension C. The higher the dimension, the easier it is for the channel to interact with remote information. Finally, the features obtained by the above transformation and the original features are added pixel by pixel. The input and output relationship of the entire global efficient context module is shown in formula (4): Among them, m, j represent the enumeration index of the feature map position; N p Represents the number of positions in the feature map; W k represents the weight of the 1×1 convolution kernel; x j 、x m Represents the characteristic response at any position; represents the adaptive change function of the convolution kernel; |·| odd The value of the convolution kernel scale K is limited to an odd number; γ and b are constants used to change the channel dimension and the convolution kernel size, usually 2 and 1; z i Indicates module output; x i Represents the module input, W q Represents the weight of the one-dimensional convolution kernel.
3. The method for segmenting cultivated land plots from remote sensing images based on multi-task learning according to claim 1, characterized in that: The step (4) specifically includes the following steps: (4a) The dynamic average weighted algorithm is used to adaptively assign task loss weights. The overall loss calculation method of the farmland plot recognition network model based on multi-task learning is: L total =ω seg L seg +oh edge L edge (5) Among them, L total 、L seg 、L edge Respectively represent the overall loss function, segmentation task loss function and edge detection task loss function; ω seg is the weight of the semantic segmentation subtask loss function, ω edge is the weight of the loss function of the edge detection subtask; (4b) The dynamic average weighted algorithm dynamically updates the sample weight according to the task learning rate and uses the loss reduction rate as the learning rate measurement standard. When the subtask learning rate is faster, the corresponding task importance is reduced so that the training speed of each task is in a balanced state. The loss reduction rate and weight coefficient calculation formulas are shown in formulas (6) and (7): Among them, ω k (t) represents the weight coefficient of the loss function of subtask k in the current training round; S represents the weight scaling factor, and the weighted sum is S; λ k (t-1) represents the learning rate of subtask k; T represents the weight distribution control factor. The larger T is, the more uniform the weight distribution is. and Represents the loss function of the previous round and the previous round.
4. The method for segmenting cultivated land plots from remote sensing images based on multi-task learning according to claim 1, characterized in that: The step (5) specifically includes the following steps: (5a) The model training and prediction processes were completed on a 64-bit Ubuntu server, using the PyTorch framework based on Python 3.7 and CUDNN 11.
3. The CPU and GPU used were a 2.20 GHz Intel Xeon E5-2650 v4 and an NVIDIA GTX 1080Ti, respectively. (5b) Adam optimizer is used to optimize the network model parameters, the initial learning rate is set to 10-4, and the training batch size is set to 8.
5. The method for segmenting cultivated land plots from remote sensing images based on multi-task learning according to claim 1, characterized in that: In step (6), the expanded sliding window prediction method is as follows: the sliding window is set to 512*512 pixels in size, and each movement only outputs the prediction results of 256*256 pixels at the center position, discarding other places. The discarded places will become the center positions of other prediction output images, ensuring lossless prediction of the entire image.
Citation Information
Patent Citations
High-resolution remote sensing image land coverage classification method based on local detail enhancement and edge constraint
CN113343789A
Strip mine stope change area detection method based on improved Unet++
CN113887459A