Image cultivated land information extraction method based on multi-scale global-local information aggregation
Through the multi-scale global-local information aggregation network, combined with the convolutional neural network and the self-attention network, the problem of insufficient generalization and feature consideration of the remote sensing cultivated land data set is solved, high-precision cultivated land information extraction is achieved, and it can adapt to multi-scale scenarios and Reducing confounding improves the accuracy of monitoring large areas of cultivated land.
Patent Information
- Application Number
- CN202410704137.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-05-31
AI Technical Summary
Existing remote sensing cultivated land data sets lack multi-image sources, cross-resolution and high generalization image data. Deep learning algorithms are difficult to take into account the local features and global context information of the image, resulting in limited accuracy of cultivated land extraction, especially in wide areas. There are problems of confusion and lack of context in marginal areas in area cultivated land monitoring.
Use a multi-scale global-local information aggregation network, combine feature aggregation attention modules through ResNet and SegFormer branches, combine convolutional neural networks and self-attention networks, build bilateral encoders and global-local information mining modules, and introduce multi-scale progressive Upsampling and sliding window prediction methods based on center confidence improve the accuracy and generalization ability of cultivated land information extraction.
It achieves high-precision extraction of cultivated land and other surface feature information, reduces the confusion of surface feature categories, adapts to multi-scale and feature-diverse cultivated land scenes, and improves the accuracy and visualization effect of large-area cultivated land information extraction.
Smart Images

Figure CN118799723A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of remote sensing image processing, and more specifically, relates to a method for extracting cultivated land information from remote sensing images based on a multi-scale global-local information aggregation network. Background Art
[0002] Arable land is the basis for human food production and is vital to global food security, sustainable agricultural development and ecological balance. Arable land includes not only farmland, but also livestock land such as pastures and grasslands. With population growth and socio-economic transformation, the protection and rational use of arable land resources face severe challenges. Global food security is also threatened by tight supply in the international market, regional conflicts, extreme climate events and the impact of the epidemic. These factors make it an urgent task for national development to ensure the balance between food production and demand and food security. Therefore, strengthening the acquisition and protection of arable land information, improving food production efficiency and promoting the scientific use of arable land have become important strategic measures to cope with the global food crisis. In the process of implementing the above measures, the more prominent problem is the acquisition and monitoring of arable land information. my country has a vast land area and rich but unevenly distributed arable land resources; traditional methods of acquiring arable land information are time-consuming and costly, making it difficult to quickly and accurately obtain arable land information. Faced with this challenge, the rapid development of modern remote sensing technology and artificial satellite technology has provided an important data source for arable land extraction from high-resolution remote sensing images.
[0003] In recent years, compared with the traditional method of manually designing features to achieve cultivated land extraction, the research on cultivated land extraction from high-resolution remote sensing images based on deep learning has achieved more outstanding performance. Through this technology, relevant departments can monitor the use status of cultivated land and evaluate the quality of cultivated land in real time, providing a scientific basis for the protection and rational use of cultivated land. However, the current research in this field is mainly limited by two aspects: the development of cultivated land datasets and the design of deep learning algorithms. From the perspective of dataset development, the existing remote sensing cultivated land datasets lack image data and pixel labels from multiple image sources, cross-resolution and high generalization. Compared with other remote sensing land types, cultivated land has rich appearances and diverse types, and the semantic features of cultivated land in different regions show differences and irregularities. The datasets proposed so far usually use remote sensing images from the same geographical area and a single image source, lacking data diversity in real scenes. The deep learning network model constructed based on this dataset has serious lack of generalization, making it difficult to apply to the task of extracting cultivated land in a wide area, which seriously hinders the research and application of cultivated land extraction methods from high-resolution remote sensing images. From the perspective of algorithm design, remote sensing cultivated land extraction based on deep learning still faces several key problems. First, the scale, color, and texture characteristics of cultivated land in remote sensing images vary, requiring deep learning methods to combine local features of the image with global context information. There are few methods that can take both features into account in current research. Second, some land object categories other than cultivated land may also show similar characteristics to cultivated land in images. In addition, the number of samples of various types of land objects in the dataset is unbalanced, which makes the existing deep learning methods susceptible to interference from other categories during the training process, limiting the further improvement of cultivated land extraction accuracy. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for extracting cultivated land information from remote sensing images based on multi-scale global-local information aggregation. The method utilizes a multi-scale global-local information aggregation network to automatically learn the characteristics of cultivated land and other typical land features from remote sensing images, thereby realizing intelligent extraction of cultivated land and other types of typical land features with high extraction accuracy.
[0005] To achieve the above-mentioned object of the invention, the present invention provides an image farmland information extraction method based on multi-scale global-local information aggregation, characterized in that it comprises the following steps:
[0006] (1) Construct a remote sensing image dataset;
[0007] (1.1) Download multiple remote sensing images and use semantic segmentation and annotation tools to perform polygon annotation on the background and cultivated land in the remote sensing images to obtain semantic labels;
[0008] (1.2) Set the pixel values corresponding to the background and the cultivated land to 0 and 1, thereby generating a binary semantic label image, where the pixel value of the background area is set to 0 and the pixel value of the cultivated land is set to 1;
[0009] (1.3) Each remote sensing image and the corresponding semantic label image are cropped into blocks of size H×W, where the jth remote sensing image block after cropping the i-th remote sensing image is denoted as image i,j , the corresponding j-th remote sensing image block after cropping the i-th semantic label image is label i,j ; Where i represents the number of the remote sensing image, j represents the number of the cropped remote sensing image block; image i,j and label i,j The image size is H×W;
[0010] (1.4) The remote sensing image block image i,j And the corresponding semantic label image block label i,j As a set of training data, thus forming a training data set Dataset self ;
[0011] (2) Build and train a multi-scale global-local information aggregation network;
[0012] (2.1) From the training data set Dataset self Select a set of training data image i,j and label i,j , and the remote sensing image block image i,j As input to the multi-scale global-local information aggregation network;
[0013] (2.2) The multi-scale global-local information aggregation network starts with the encoder. The encoder contains two branches, the ResNet branch and the SegFormer branch. The ResNet branch contains a downsampling module and four cascaded residual block units. The downsampling module includes a 7x7 convolution layer and a maximum pooling layer. Each cascaded residual block unit includes two groups of residual blocks, each of which contains two 3×3 convolution layers, two batch normalization layers and two ReLU activation functions. The SegFormer branch contains four encoding stages. Each encoder stage contains an overlapping image patch embedding layer and several Transformer modules. The number of Transformer modules corresponding to the four stages in the SegFormer branch are [3, 4, 6, 3] respectively. Each Transformer module consists of an efficient self-attention layer, two hybrid feedforward network layers and two normalization layers.
[0014] After the remote sensing image passes through the encoding operation of the two branches, the multi-scale local encoding feature F is obtained by the ResNet branch. k L , the multi-scale global encoding feature F is obtained by the SegFormer branch k G , and then F k L and F k G Input into the feature aggregation attention module; multi-scale local coding features and multi-scale global coding features are operated by the feature aggregation attention module scale by scale to obtain the multi-scale joint feature F k U ; Then F k U Input to the decoder for decoding operation; where k = 1, 2, 3, 4 represents different feature map scales; for F1 L 、F1 G and F1 U , the feature map size is H / 4×W / 4×C1; for F2 L 、F2 G and F2 U , the feature map size is H / 8×W / 8×C2; for F3 L 、F3 G and F3 U , the feature map size is H / 16×W / 16×C3; for F4 L 、F4 G and F4 U , the feature map size is H / 32×W / 32×C4;
[0015] After the encoding operation is completed, the decoding operation begins. The decoder consists of three global-local information mining modules GLM Block numbered GLM1, GLM2 and GLM3, three learnable progressive upsampling LPUs numbered LPU1, LPU2 and LPU3, and a feature refinement residual segmentation head FRRSH. In addition, only in the training phase, an auxiliary prediction module ASH is introduced into the decoder to calculate the auxiliary prediction loss.
[0016] F4 with feature map size of H / 32×W / 32×C4 U Input into GLM3, the feature map size is H / 32×W / 32×C d Multi-scale decoding features F3 D And F2 U Pass through LPU3 together to get the feature map
[0017] Input into GLM2, the feature map size is H / 16×W / 16×C d Multi-scale decoding feature F2 D And F2 U Pass through LPU2 together to get the feature map
[0018] Input into GLM1, the feature map size is H / 8×W / 8×C d Multi-scale decoding feature F1 D And F1 U Pass through LPU1 together to get the feature map
[0019] Input into FRRSH, and finally get the cultivated land information extraction result map output i,j , whose size is similar to the input remote sensing image patch image i,j Same size; for feature maps the size is H / 32×W / 32×C d Multi-scale decoding features F3 D Perform 4 times upsampling, and the feature map size is H / 16×W / 16×C d Multi-scale decoding features Upsample by 2 times, and then add the feature map size to H / 8×W / 8×C d Multi-scale decoding features The channels are added and then input into the auxiliary prediction module ASH to obtain the auxiliary cultivated land information extraction result map output-aux i,j , whose size is similar to the input remote sensing image patch image i,j Same size;
[0020] Output the final cultivated land information extraction result map i,j And auxiliary cultivated land information extraction result map output-aux i,j And the corresponding semantic label image block label i,j Perform loss function value Loss total Calculation:
[0021] Loss total =Loss primary +0.4*Loss auxilary
[0022] Among them, Loss primary Output is the result map extracted using cultivated land information i,j And the corresponding semantic label image block label i,j Calculate the main loss function value, Lossprimary The specific calculation formula is:
[0023]
[0024] Where Z is the normalization factor, ξ(t) is the cosine annealing function that decreases monotonically with the number of training steps t, annealing_step is the total number of training steps, and p l Output of the cultivated land information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in dice is the dice coefficient loss function, L soft_ce is the soft cross entropy loss function;
[0025] Loss auxilary Output-aux is the result map of auxiliary cultivated land information extraction. i,j And the corresponding semantic label image block label i,j Calculated auxiliary loss function value; auxiliary loss function Loss auxilary The soft cross entropy loss function is used for calculation. The specific calculation formula is:
[0026]
[0027] Among them, p l 'output-aux is the auxiliary farmland information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in;
[0028] Finally, according to the loss function value Loss total , update the parameters of the multi-scale global-local information aggregation network using the gradient descent method, and then repeat the training according to steps (2.1)-(2.2) until the multi-scale global-local information aggregation network converges;
[0029] (3) Extraction of large-area cultivated land information based on central confidence;
[0030] (3.1) Assume that the overlap ratio of sliding window cropping is ρ. For a large-area remote sensing image of size M×N, a window of size H×W is used for sliding cropping. The actual moving distance of each window in the horizontal direction is (1-ρ)×W, and the actual moving distance in the vertical direction is (1-ρ)×H. All the obtained overlapping sliding window cropped image slices are stored in memory in order according to their positions in the original large-area remote sensing image.
[0031] (3.2) Perform batch prediction on the image slices cropped by overlapping sliding windows;
[0032] Extract a batch of image slices in order from the memory and input them into the trained multi-scale global-local information aggregation network, so as to output the label values 0 and 1 corresponding to the background and cultivated land in each image slice;
[0033] (3.3) First, a binary prediction map of size H×W is generated according to the label value of each image slice, and then the central area of size H(1-ρ)×W(1-ρ) is selected as the effective remapping area. Finally, a large-area cultivated land information extraction map of size M×N is obtained. Then, the label value is mapped to the color range to form a visual large-area cultivated land information extraction image.
[0034] The object of the invention of the present invention is achieved in this way:
[0035] The invention discloses a method for extracting cultivated land information from remote sensing images based on multi-scale global-local information aggregation. First, a multi-scale global-local information aggregation network is built and trained so that the network can accurately identify the background and cultivated land in the remote sensing image after convergence. Then, overlapping sliding window cropping is performed on the large-area remote sensing image. The cropped image slices are sliced in batches and input into the trained multi-scale global-local information aggregation network, so as to output the label values corresponding to the background and cultivated land in each image slice. Finally, remapping is performed according to the prediction result of each image slice to form a visualized large-area cultivated land information extraction map.
[0036] At the same time, the remote sensing image cultivated land information extraction method based on multi-scale global-local information aggregation of the present invention also has the following beneficial effects:
[0037] (1) Based on the encoder-decoder structure, the present invention combines the convolutional neural network and the self-attention network in the encoder-decoder to construct a bilateral encoder and a global-local information mining module, combines global features with local information, improves the accuracy of cultivated land information extraction, reduces the confusion with other land object categories, and realizes the intelligent extraction of cultivated land and multiple types of typical land object elements;
[0038] (2) To address the problem that cultivated land targets in remote sensing images are usually small in area, fragmented, and widely distributed, the present invention introduces a bilateral encoder and a global-local information mining module to efficiently extract global features and local information and fuse the two into a model;
[0039] (3) In order to solve the problem of farmland scale variation in remote sensing images due to the inherent image resolution differences of multi-source remote sensing images and the rich geographical terrain conditions, a multi-scale progressive upsampling structure is proposed to focus on fusing multi-scale encoder and decoder features, progressively restore the resolution of feature maps layer by layer, and provide high-precision pixel-level farmland and other ground object category extraction results in the final stage of the network;
[0040] (4) In view of the current situation that there are large differences in similar objects and category ratios of cultivated land in remote sensing images, the present invention introduces a loss function constraint based on a difficult sample mining mechanism, which drives the network to focus on difficult samples that cannot be accurately extracted due to heterogeneous confusion and low category ratios during training, thereby improving the accuracy of remote sensing cultivated land information extraction;
[0041] (5) To address the problem of missing context and obvious splicing marks in the edge areas of slices in the prediction of cultivated land extraction results in large-area remote sensing images, the present invention proposes an optimized sliding window prediction method based on central confidence, which mainly includes two improvements: overlapping sliding windows and edge neglect, thereby achieving efficient and high-precision extraction of wide-area large-area cultivated land information. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is the overall structure diagram of the multi-scale global-local information aggregation network of the present invention;
[0043] Figure 2 This is the ResNet structure diagram;
[0044] Figure 3 It is the SegFormer structure diagram;
[0045] Figure 4 It is the structure diagram of the global-local information mining module;
[0046] Figure 5 It is the structural diagram of feature refinement residual segmentation head;
[0047] Figure 6 It is the structure diagram of the auxiliary prediction module;
[0048] Figure 7 It is a flowchart of extracting large-area cultivated land information based on central confidence;
[0049] Figure 8 It is the result map of cultivated land extraction in a certain area;
[0050] Fig. 9This is the result map of cultivated land extraction in a certain area;
[0051] Fig.10 This is a comparison diagram of the cultivated land extraction results of the present invention and other methods. DETAILED DESCRIPTION
[0052] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.
[0053] Example
[0054] For the convenience of description, the relevant professional terms appearing in the specific implementation methods are first explained:
[0055] ResNet (Residual Neural Network): Residual Neural Network;
[0056] GLM Block (Global Local Mining Block): global-local information mining module;
[0057] LPU (Learnable Progressive Upsampling): Learnable progressive upsampling module;
[0058] ASH (AuxiliarySegmentation Head): auxiliary prediction module;
[0059] FRRSH (Feature Refinement Residual Segmentation Head): Feature Refinement Residual Segmentation Head;
[0060] GLCANet(Global Local Context Aggregation Network): Multi-scale global-local context aggregation network.
[0061] In this embodiment, the present invention provides a method for extracting cultivated land information from remote sensing images based on multi-scale global-local information aggregation, comprising the following steps:
[0062] (1) Construct a remote sensing image dataset;
[0063] (1.1) Download multiple remote sensing images and use semantic segmentation and annotation tools to perform polygon annotation on the background and cultivated land in the remote sensing images to obtain semantic labels;
[0064] (1.2) Set the pixel values corresponding to the background and the cultivated land to 0 and 1, thereby generating a binary semantic label image, where the pixel value of the background area is set to 0 and the pixel value of the cultivated land is set to 1;
[0065] (1.3) Each remote sensing image and the corresponding semantic label image are cropped into blocks of size H×W, where the jth remote sensing image block after cropping the i-th remote sensing image is denoted as image i,j , the corresponding j-th remote sensing image block after cropping the i-th semantic label image is label i,j ; Where i represents the number of the remote sensing image, j represents the number of the cropped remote sensing image block; image i,j and label i,j The image size is H×W;
[0066] (1.4) The remote sensing image block image i,j And the corresponding semantic label image block label i,j As a set of training data, thus forming a training data set Dataset self ;
[0067] (2) Build and train a multi-scale global-local information aggregation network;
[0068] (2.1) From the training data set Dataset self Select a set of training data image i,j and label i,j , and the remote sensing image block image i,j As input to the multi-scale global-local information aggregation network;
[0069] (2.2), such as Figure 1 As shown in , the multi-scale global-local information aggregation network starts with an encoder, which contains two branches, the ResNet branch and the SegFormer branch; Figure 2 As shown in (a), the ResNet branch contains a downsampling module and four cascaded residual block units; the downsampling module includes a 7x7 convolution layer and a maximum pooling layer; each cascaded residual block unit includes two groups of residual blocks, such as Figure 2 As shown in (b), each residual block contains two 3×3 convolutional layers, two batch normalization layers and two ReLU activation functions; Figure 3As shown in (a), the SegFormer branch consists of four encoding stages; each encoder stage contains an overlapping image patch embedding layer and several Transformer modules. The number of Transformer modules corresponding to the four stages in the SegFormer branch is [3, 4, 6, 3] respectively; Figure 3 As shown in (b), each Transformer module consists of 1 efficient self-attention layer, 1 hybrid feedforward network layer and 2 layer normalization layers;
[0070] After the remote sensing image passes through the encoding operation of the two branches, the multi-scale local encoding feature F is obtained by the ResNet branch. i L , i = 1, 2, 3, 4, the multi-scale global encoding feature F is obtained by the SegFormer branch i G , i=1,2,3,4, and then F i L , i=1,2,3,4 and F i G , i = 1, 2, 3, 4 are input into the feature aggregation attention module; the multi-scale local coding features and the multi-scale global coding features are operated by the feature aggregation attention module scale by scale to obtain the multi-scale joint feature F i U , i = 1, 2, 3, 4; then F i U , i = 1, 2, 3, 4 are input to the decoder for decoding operation; where i represents different feature map scales; for F1 L 、F1 G and F1 U , the feature map size is H / 4×W / 4×C1; for F2 L 、F2 G and F2 U , the feature map size is H / 8×W / 8×C2; for F3 L 、F3 G and F3 U , the feature map size is H / 16×W / 16×C3; for F4 L 、F4 G and F4 U , the feature map size is H / 32×W / 32×C4;
[0071] After the encoding operation is completed, the decoding operation begins. The decoder consists of three global-local information mining modules GLM Block numbered GLM1, GLM2 and GLM3, three learnable progressive upsampling LPUs numbered LPU1, LPU2 and LPU3, and a feature refinement residual segmentation head FRRSH. In addition, only in the training phase, an auxiliary prediction module ASH is introduced into the decoder to calculate the auxiliary prediction loss.
[0072] Among them, Figure 4 As shown in (a), the structure of each global-local information mining module (GLM Block) contains two regularization layers, a hybrid feedforward network layer and a global-local attention layer; the structure of the global-local attention layer is as follows Figure 4 As shown in (b), the input feature map passes through the global branch and the local branch to obtain the global context information and the local context information, and then the addition operation is performed; in the global branch, it contains a window-based multi-head self-attention layer and a global connection compression module; in the local branch, it contains three parallel convolutional layers and batch normalization layers (Batch Norm) branches, and the convolution kernel sizes on the three branches are 1×1, 3×3 and 5×5 respectively; the feature map after the global branch and the local branch are added is calculated by the 8×8 deep convolution layer, the batch normalization layer (BatchNorm) and the ReLU6 activation function to obtain the output result of the global-local attention layer;
[0073] like Figure 5 As shown in the figure, the structure of the feature refinement residual segmentation head (FRRSH) is as follows: First, the input feature map After being processed by a 3×3 convolution layer, the attention features generated by the two paths are fused through the sum operation after passing through the spatial branch and the channel branch; the fused feature map is then processed by the deep convolution layer, the batch normalization layer (BatchNorm) and the ReLU6 activation function, and is summed and fused with the residual preservation branch; then it is calculated by a 1×1 convolution layer, a batch normalization layer (BatchNorm), the ReLU6 activation function and the semantic segmentation head to obtain the final farmland information extraction result; among them, the semantic segmentation head includes a 3×3 convolution layer, a batch normalization layer (BatchNorm), a ReLU6 activation function, a 1×1 convolution layer and a 4x upsampling layer;
[0074] The feature map size is H / 32×W / 32×C4 Input into GLM3, the feature map size is H / 32×W / 32×C d Multi-scale decoding features and Pass through LPU3 together to get the feature map
[0075] Input into GLM2, the feature map size is H / 16×W / 16×C d Multi-scale decoding features and Pass through LPU2 together to get the feature map
[0076] Input into GLM1, the feature map size is H / 8×W / 8×C d Multi-scale decoding features and Pass through LPU1 together to get the feature map
[0077] Input into FRRSH, and finally get the cultivated land information extraction result image output , whose size is similar to the input remote sensing image patch image i,j The dimensions are the same, h×w×3;
[0078] In this embodiment, Figure 6 Describes the auxiliary prediction module to generate auxiliary cultivated land information extraction result map output i,j Process: The feature map size is H / 32×W / 32×C d Multi-scale decoding features Perform 4 times upsampling, and the feature map size is H / 16×W / 16×C d Multi-scale decoding features Upsample by 2 times, and then add the feature map size to H / 8×W / 8×C d Multi-scale decoding features The channels are added and then input into the auxiliary prediction module ASH to obtain the auxiliary cultivated land information extraction result map output-aux i,j , whose size is similar to the input remote sensing image patch image i,j Same size;
[0079] Output the final cultivated land information extraction result map i,j And auxiliary cultivated land information extraction result map output-aux i,j And the corresponding semantic label image block label i,j Perform loss function value Loss total Calculation:
[0080] Loss total =Loss primary +0.4*Loss auxilary
[0081] Among them, Loss primary Output is the result map extracted using cultivated land information i,j And the corresponding semantic label image block label i,j Calculate the main loss function value, Loss primary The specific calculation formula is:
[0082]
[0083]
[0084] Where Z is the normalization factor, ξ(t) is the cosine annealing function that decreases monotonically with the number of training steps t, annealing_step is the total number of training steps, and p l Output of the cultivated land information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in dice is the dice coefficient loss function, L soft_ce is the soft cross entropy loss function;
[0085] Loss auxilary Output-aux is the result map of auxiliary cultivated land information extraction. i,j And the corresponding semantic label image block label i,j Calculated auxiliary loss function value; auxiliary loss function Loss auxilary The soft cross entropy loss function is used for calculation. The specific calculation formula is:
[0086]
[0087] Among them, p l 'output-aux is the auxiliary farmland information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in;
[0088] Finally, according to the loss function value Loss total , update the parameters of the multi-scale global-local information aggregation network using the gradient descent method, and then repeat the training according to steps (2.1)-(2.2) until the multi-scale global-local information aggregation network converges;
[0089] (3) Generation of wide-area large-area cultivated land information extraction results based on central confidence;
[0090] (3.1) For large-area remote sensing images that need to be used for farmland information extraction, overlapping sliding window cropping is performed. During sliding window cropping, a certain proportion of overlapping areas is designed to retain sufficient image context information.
[0091] Assume that the overlap ratio of sliding window cropping is ρ. For a large-area remote sensing image of size M×N, a window of size H×W is used for sliding cropping. The actual moving distance of each window in the horizontal direction is (1-ρ)×W, and the actual moving distance in the vertical direction is (1-ρ)×H. All the obtained overlapping sliding window cropped image slices are stored in memory in order according to their positions in the original large-area remote sensing image.
[0092] (3.2) Perform batch prediction on the image slices cropped by overlapping sliding windows;
[0093] Extract a batch of image slices in order from the memory and input them into the trained multi-scale global-local information aggregation network, so as to output the label values 0 and 1 corresponding to the background and cultivated land in each image slice;
[0094] (3.3) Remap the processed prediction results back to the corresponding positions of the original remote sensing image to generate a complete large-area cultivated land information extraction map;
[0095] This paper proposes a strategy based on central confidence to remap the processed prediction results back to the corresponding positions of the original remote sensing image, thereby generating a complete large-area cultivated land information extraction map, such as Figure 7 As shown, specifically, the present invention ignores the low confidence prediction results in the edge area and only uses the central area of the prediction results for remapping.
[0096] Therefore, we first generate a binary prediction map of size H×W according to the label value of each image slice. Figure 7 In the figure, it is represented as area A; then the central area with a size of H(1-ρ)×W(1-ρ) is selected as the effective remapping area. Figure 7 In the figure, it is represented as area a; finally, a large-area cultivated land information extraction map with a size of M×N is obtained, and then the label value is mapped to the color range to form a visual large-area cultivated land information extraction image.
[0097] In this embodiment, if Figure 8 and Fig. 9 As shown in Figure 8 The following is a diagram showing the results of farmland extraction in a certain area in this embodiment. Fig. 9 The cultivated land extraction result diagram of this embodiment in two regions is given; Fig.10The visualization results of cultivated land extraction in a detailed area are given in Figure 1. It can be seen that the present invention has effectively improved the accuracy of cultivated land information extraction in remote sensing images. From the remote sensing images in the first column, it can be seen that the scale and morphology of cultivated land in each image vary greatly. Fig.10 The cultivated land plots in rows (c) and (d) are relatively small and fragmented, while the cultivated land plots in row (e) are much larger than those in the other rows. However, compared with other networks, GLCANet performs better in extracting cultivated land from multi-source images and can adapt to cultivated land scenes with multiple scales and diverse features. Fig.10 In the middle (a) and (d) rows, other networks misclassify vegetation categories that have similar characteristics to farmland, while GLCANet relies on efficient extraction of global context and local features to achieve accurate distinction. Fig.10 In the middle row (b), there are both farmlands where crops are being planted and farmlands after harvest, and GLCANet accurately extracts all farmlands.
[0098] In summary, the present invention aims at the multiple challenges of farmland information extraction in remote sensing images, and proposes a farmland information extraction method for remote sensing images based on multi-scale global-local information aggregation. The method uses a bilateral encoder that combines a convolutional neural network ResNet and a self-attention network SegFormer, and combines a global-local information mining module to significantly improve the extraction accuracy of farmland and other typical landforms. Specifically, in the encoder-decoder structure, the present invention uses a bilateral encoder and a global-local information mining module to combine global features with local information to improve the accuracy of farmland information extraction, reduce confusion with other landform categories, and realize intelligent extraction of farmland and multiple types of typical landform elements. In view of the problem that farmland targets in remote sensing images are usually small in area, fragmented, and widely distributed, an efficient feature extraction and fusion modeling mechanism is introduced. Through a multi-scale progressive upsampling structure, the resolution of the feature map is restored layer by layer, the scale change problem of farmland is solved, and high-precision pixel-level extraction results are ensured. In addition, the present invention also introduces a loss function based on the mechanism of difficult sample mining, which promotes the network to focus on difficult samples that are difficult to accurately extract due to heterogeneous confusion and low category ratio during the training process, thereby improving the accuracy of remote sensing cultivated land information extraction. In view of the problem of missing context and obvious splicing traces in the edge area of the slice prediction of cultivated land extraction results in large-area remote sensing images, an optimized sliding window prediction method based on central confidence is proposed. Through the two improvements of overlapping sliding windows and edge neglect, efficient and high-precision wide-area large-area cultivated land information extraction is achieved.
[0099] Although the above describes the illustrative specific embodiments of the present invention to facilitate the understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
Claims
1. A method for extracting cultivated land information from images based on multi-scale global-local information aggregation, characterized in that: The following steps are involved: (1) Construct a remote sensing image dataset; (1.1) Download multiple remote sensing images and use semantic segmentation and annotation tools to perform polygon annotation on the background and cultivated land in the remote sensing images to obtain semantic labels; (1.2) Set the pixel values corresponding to the background and the cultivated land to 0 and 1, thereby generating a binary semantic label image, where the pixel value of the background area is set to 0 and the pixel value of the cultivated land is set to 1; (1.3) Each remote sensing image and the corresponding semantic label image are cropped into blocks of size H×W, where the jth remote sensing image block after cropping the i-th remote sensing image is denoted as image i,j , the corresponding j-th remote sensing image block after cropping the i-th semantic label image is label i,j ; Where i represents the number of the remote sensing image, j represents the number of the cropped remote sensing image block; image i,j and label i,j The image size is H×W; (1.4) The remote sensing image block image i,j And the corresponding semantic label image block label i,j As a set of training data, thus forming a training data set Dataset self ; (2) Build and train a multi-scale global-local information aggregation network; (2.1) From the training data set Dataset self Select a set of training data image i,j and label i,j , and the remote sensing image block image i,j As input to the multi-scale global-local information aggregation network; (2.2) The multi-scale global-local information aggregation network starts with the encoder. The encoder contains two branches, the ResNet branch and the SegFormer branch. The ResNet branch contains one downsampling module and four cascaded residual block units. Each downsampling module includes a 7x7 convolution layer and a maximum pooling layer. Each cascaded residual block unit includes two groups of residual blocks, each of which contains two 3×3 convolution layers, two batch normalization layers and two ReLU activation functions. The SegFormer branch contains four encoding stages. Each encoder stage contains one overlapping image patch embedding layer and several Transformer modules. The number of Transformer modules corresponding to the four stages in the SegFormer branch are [3, 4, 6, 3] respectively. Each Transformer module consists of one efficient self-attention layer, two hybrid feedforward network layers and two normalization layers. After the remote sensing image passes through the encoding operation of the two branches, the multi-scale local encoding feature F is obtained by the ResNet branch. k L , the multi-scale global encoding feature F is obtained by the SegFormer branch k G , and then F k L and F k G Input into the feature aggregation attention module; multi-scale local coding features and multi-scale global coding features are operated by the feature aggregation attention module scale by scale to obtain the multi-scale joint feature F k U ; Then F k U Input to the decoder for decoding operation; where k = 1, 2, 3, 4 represents different feature map scales; for F1 L 、F1 G and F1 U , the feature map size is H / 4×W / 4×C1; for F2 L 、F2 G and F2 U , the feature map size is H / 8×W / 8×C2; for F3 L 、F3 G and F3 U , the feature map size is H / 16×W / 16×C3; for F4 L 、F4 G and F4 U , the feature map size is H / 32×W / 32×C4; After the encoding operation is completed, the decoding operation begins. The decoder consists of three global-local information mining modules GLM Block numbered GLM1, GLM2 and GLM3, three learnable progressive upsampling LPUs numbered LPU1, LPU2 and LPU3, and a feature refinement residual segmentation head FRRSH. In addition, only in the training phase, an auxiliary prediction module ASH is introduced into the decoder to calculate the auxiliary prediction loss. F4 with feature map size of H / 32×W / 32×C4 U Input into GLM3, the feature map size is H / 32×W / 32×C d Multi-scale decoding features F3 D And F2 U Pass through LPU3 together to get the feature map Input into GLM2, the feature map size is H / 16×W / 16×C d Multi-scale decoding feature F2 D And F2 U Pass through LPU2 together to get the feature map Input into GLM1, the feature map size is H / 8×W / 8×C d Multi-scale decoding feature F1 D And F1 U Pass through LPU1 together to get the feature map Input into FRRSH, and finally get the cultivated land information extraction result map output i,j , whose size is similar to the input remote sensing image patch image i,j Same size; for feature maps the size is H / 32×W / 32×C d Multi-scale decoding features F3 D Perform 4 times upsampling, and the feature map size is H / 16×W / 16×C d Multi-scale decoding feature F2 D Upsample by 2 times, and then add the feature map size to H / 8×W / 8×C d Multi-scale decoding feature F1 D The channels are added and then input into the auxiliary prediction module ASH to obtain the auxiliary cultivated land information extraction result map output-aux i,j , whose size is similar to the input remote sensing image patch image i,j Same size; Output the final cultivated land information extraction result map i,j And auxiliary cultivated land information extraction result map output-aux i,j And the corresponding semantic label image block label i,j Perform loss function value Loss total Calculation: Loss total =Loss primary +0.4*Loss auxilary Among them, Loss primary Output is the result map extracted using cultivated land information i,j And the corresponding semantic label image block label i,j Calculate the main loss function value; Loss auxilary Output-aux is the result map of auxiliary cultivated land information extraction. i,j And the corresponding semantic label image block label i,j Calculate the auxiliary loss function value; Finally, according to the loss function value Loss total , update the parameters of the multi-scale global-local information aggregation network using the gradient descent method, and then repeat the training according to steps (2.1)-(2.2) until the multi-scale global-local information aggregation network converges; (3) Extraction of large-area cultivated land information based on central confidence; (3.1) Assume that the overlap ratio of sliding window cropping is ρ. For a large-area remote sensing image of size M×N, a window of size H×W is used for sliding cropping. The actual moving distance of each window in the horizontal direction is (1-ρ)×W, and the actual moving distance in the vertical direction is (1-ρ)×H. All the obtained overlapping sliding window cropped image slices are stored in memory in order according to their positions in the original large-area remote sensing image. (3.2) Perform batch prediction on the image slices cropped by overlapping sliding windows; Extract a batch of image slices in order from the memory and input them into the trained multi-scale global-local information aggregation network, so as to output the label values 0 and 1 corresponding to the background and cultivated land in each image slice; (3.3) First, a binary prediction map of size H×W is generated according to the label value of each image slice, and then the central area of size H(1-ρ)×W(1-ρ) is selected as the effective remapping area. Finally, a large-area cultivated land information extraction map of size M×N is obtained. Then, the label value is mapped to the color range to form a visual large-area cultivated land information extraction image.
2. The method for extracting cultivated land information from images based on multi-scale global-local information aggregation according to claim 1, characterized in that: The main loss function value Loss primary The specific calculation formula is: Where Z is the normalization factor, ξ(t) is the cosine annealing function that decreases monotonically with the number of training steps t, annealing_step is the total number of training steps, and p l Output of the cultivated land information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in dice is the dice coefficient loss function, L soft_ce is the soft cross entropy loss function.
3. The method for extracting cultivated land information from images based on multi-scale global-local information aggregation according to claim 1, characterized in that: The auxiliary loss function Loss auxilary The soft cross entropy loss function is used for calculation. The specific calculation formula is: Among them, p l 'output-aux is the auxiliary farmland information extraction result map i,j The predicted probability value of the lth pixel in y l is the corresponding semantic label image block label i,j The true probability value of the lth pixel in .
Citation Information
Patent Citations
High-resolution remote sensing image cultivated land change detection device and method based on deep learning
CN113743373A
Method for identifying cultivated land area by using remote sensing vector
CN115497008A
High-standard farmland plot boundary automatic identification method based on satellite image
CN117197686A
Cited By
Gaze spectrum prediction method based on first-view-angle high-dynamic long video
CN119600501A
