Remote sensing image water body extraction method based on multi-scale feature fusion of compressed pyramid gating unit

By combining CNN and Transformer encoder, multi-scale jump connection module and compressed pyramid gated unit, extracting and fusing multi-scale features, the problem of difficult to model global context information in the existing technology is solved, and more accurate and Robust water extraction effect.

CN119495004AActive Publication Date: 2025-02-21CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411518831.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-02-21
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

When extracting water bodies from high-resolution remote sensing images, it is difficult to effectively model global context information, resulting in blurred water boundary information, susceptible to background occlusion, and difficult to identify elongated water flows.

Method used

The encoder based on CNN and Transformer is adopted, combining the multi-scale jump connection module and the compressed pyramid gated unit, multi-scale features are extracted and fusion is performed. Through weight adjustment and channel attention mechanism, the feature representation and generalization capabilities of the model are improved.

Benefits of technology

It significantly improves the ability to extract water bodies of different shapes and sizes and distinguishes water body information from non-water body information, and enhances the model's feature capture ability and identification accuracy in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119495004A_ABST
    Figure CN119495004A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-scale feature fusion remote sensing image water body extraction method based on a compressed pyramid gating unit, and belongs to the technical field of remote sensing. The method comprises the following steps: acquiring a water body remote sensing image data set, preprocessing the data set, performing data set division on the data set, and performing data enhancement processing; a CNN hybrid Transform encoder is adopted to extract feature maps of a plurality of scales from the image; adding the feature maps of different scales into a multi-scale jump connection module, and extracting feature information of multiple scales; fusing the feature information of the plurality of scales, and performing weight multiplication on the fused feature and the feature of each scale to obtain a final multi-scale adaptive receptive field selection result feature map; and training the process by adopting cross entropy loss, and performing remote sensing image water body extraction after training is completed. According to the method, the extraction capability of water bodies with different shapes and sizes and the distinguishing capability of water body information and non-water body information can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of remote sensing technology and relates to a remote sensing image water body extraction method based on multi-scale feature fusion of a compressed pyramid gating unit. Background Art

[0002] With the continuous development of remote sensing technology and the widespread application of high-resolution remote sensing images, the extraction of water bodies from high-resolution remote sensing images has attracted widespread attention in the remote sensing community. As the most important resource for mankind, the automated extraction of water bodies is of great significance for understanding the current water resources, helping the country to rationally plan and manage water resources, helping to predict a series of disasters such as floods or droughts, and analyzing human activities. Moreover, water body recognition in remote sensing images has always been an important part of scientific progress. In recent years, semantic segmentation methods based on deep learning have been fully applied in water body extraction. However, there are still many problems that need to be solved. For example, the boundary information of water bodies is fuzzy, it is easily blocked by background such as buildings and mountain shadows, and slender water flows are prone to misdetection and missed detection. In the face of irregular size and shape, small water bodies and non-water body shadow occlusion problems, many deep learning-based methods have emerged for water body extraction. For example, PSPNet uses a pyramid pooling structure to effectively integrate multi-scale context information, but it has some shortcomings when dealing with small targets or detailed features.

[0003] In recent years, with the rapid development of convolutional neural networks (CNNs), water extraction tasks have made significant breakthroughs. The introduction of fully convolutional networks (FCNs) applied fully convolutional network structures to the field of water extraction for the first time, which has attracted the attention of many researchers who are committed to designing encoder-decoder architectures to achieve more accurate water extraction. CNN-based water extraction frameworks continue to emerge, and these methods have improved the extraction accuracy to a certain extent. However, these methods have certain limitations in the convolution operation of water bodies, and it is difficult to effectively model global context information. Due to the huge differences in the shapes and sizes of water bodies, especially some extremely irregular small water bodies, and the complexity of the surrounding environment (such as shadows from mountains or buildings), accurate inference of local context information becomes increasingly difficult. Therefore, how to overcome these challenges remains an important issue that needs to be addressed in the field of water extraction. Summary of the invention

[0004] In view of this, the object of the present invention is to provide a remote sensing image water extraction method based on multi-scale feature fusion of compressed pyramid gating units.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] A method for extracting water from remote sensing images by multi-scale feature fusion based on a compressed pyramid gating unit comprises the following steps:

[0007] S1. Obtain a water body remote sensing image dataset, divide the dataset into datasets after preprocessing, and perform data enhancement processing;

[0008] S2, using CNN hybrid Transformer encoder to extract feature maps of multiple scales from the image;

[0009] S3, adding feature maps of different scales to the multi-scale skip connection module to extract feature information of multiple scales;

[0010] S4, fusing feature information of multiple scales, and weight-multiplying the fused features with the features of each scale to obtain the final multi-scale adaptive receptive field selection result feature map;

[0011] S5. Use cross entropy loss to train the above process, and after training, it is used for water body extraction in remote sensing images.

[0012] Further, in step S1, the preprocessing of the data set includes cropping, labeling, and binarization of the labeled pixels of the labeled image;

[0013] The division of the data set includes: dividing the data set into a training set, a validation set, and a test set according to a preset ratio;

[0014] The data augmentation of the dataset includes: random resizing of the dataset, random horizontal and vertical flipping, random Gaussian noise, contrast-constrained adaptive histogram equalization, random rotation, and random cropping.

[0015] Further, in step S2, at least three CNN and Transformer networks are set in the CNN hybrid Transformer encoder, and feature maps of three scales are extracted from three stages. After passing through each stage in turn, three feature maps with resolutions of {1 / 4, 1 / 8, 1 / 16} of the original image are obtained, wherein the number of feature map channels C1 to C3 of each stage are {64, 128, 256} respectively;

[0016] Each stage includes a CNN layer and a Transformer layer. In each stage, the input features are first input into the Transformer layer to extract global features, and then input into the CNN layer to extract local features, and the extraction is performed step by step.

[0017] Each Transformer layer includes a W-MSA Block and a SW-MSA Block; the W-MSA Block includes two layer normalizations, a multi-layer perceptron and a W-MSA, and the SW-MSA Block includes two layer normalizations, a multi-layer perceptron and a SW-MSA;

[0018] Each CNN layer includes two 3X3 convolutions, and the results extracted by Transformer are passed into the convolution to further extract local features.

[0019] Further, in step S3, the multi-scale jump connection module includes a plurality of convolution kernels of different sizes, and the feature maps of each stage are respectively input into the convolutions with convolution kernels of different sizes to obtain feature maps of different scales, and the feature maps of different scales are cascaded and spliced ​​according to the channel dimension to obtain the output of the multi-scale jump connection module, which includes:

[0020] S31, the feature maps C1, C2, C3 at different levels are subjected to several parallel convolution operations:

[0021] x1=Conv kxk (C1), k = 1, 3, 5, 7

[0022] x2=Conv kxk (C2), k = 1, 3, 5, 7

[0023] x3=Conv kxk (C3), k = 1, 3, 5, 7

[0024] Conv kxk () represents convolution with kernel size k;

[0025] S32, concatenate the convolution results x1, x2, and x3 according to the channel dimension to obtain a feature map x containing multi-scale information k :

[0026] x k =Cat[x1,x2,x3]

[0027] Cat[] represents cascade concatenation by channel dimension.

[0028] Further, in step S4, the obtained feature maps x1, x2, x3 are processed with a 1x1 convolution kernel to obtain y1, y2, y3 of the same dimension size, and then y1, y2, y3 are cascaded and fused according to the channel dimension to obtain a feature map yk containing multi-scale information:

[0029] y1=Conv 1x1 (x1)

[0030] y2=Conv 1x1 (x2)

[0031] y3=Conv 1x1 (x3)

[0032] y k=Cat[y1,y2,y3]

[0033] The feature map yk is input into the compressed pyramid gated unit module. After three serial large kernel selection convolutions, three features z1, z2, and z3 of three adaptive receptive fields are obtained respectively, and they are concatenated to obtain the feature map F c :

[0034] z1=Conv 3×3 (y k )

[0035] z2=Conv 5×5 (z1)

[0036] z3=Conv 7×7 (z2)

[0037] F c =Cat[z1,z2,z3]

[0038] Then, F c It is reconstructed into matrix F through 1x1 convolution transpose and reshape operation. H ∈R H×1 and the matrix F W ∈R 1×W :

[0039] F H =Conv 1×1 (reshape(Conv 1×1 (F C )))

[0040] F W =Conv 1×1 (reshape(Conv 1×1 (F C )))

[0041] In F H With F W Perform matrix multiplication between them and reshape them to obtain the eigenvector F L ∈R 1×L , L=H×W:

[0042] F L = reshape(F H ⊙F W )

[0043] Then use 1×1 convolution and reshape operation to map the feature map F c Mapped to matrix F A ∈R C×L :

[0044] F A= reshape(Conv 1×1 (F C ))

[0045] F L and F A Perform matrix multiplication between them and then reshape them to obtain the channel attention weight vector A map ∈R C ×1×1 :

[0046] A map = reshape(F L ⊙F A )

[0047] Perform 1×1 convolution between inputs, layer normalization, and apply sigmoid activation function to get weight W:

[0048] W = δ(Conv 1×1 (LN(A map )))

[0049] W and fusion feature x k Multiply element by element to get the final multi-scale adaptive receptive field selection result feature map F out :

[0050]

[0051] In the above process, reshape represents the reshaping operation, δ represents the sigmoid activation function, LN represents layer normalization, and ⊙ represents matrix multiplication. Represents element-wise multiplication.

[0052] Further, in step S5, the AdamW optimizer and the poly learning rate adjustment strategy are used, and the cross entropy loss function is used to calculate the loss between the predicted image and the true image, where the cross entropy loss calculation formula is as follows:

[0053]

[0054] Where N represents the total number of pixels in the image, and y i ∈{0,1} represents the true label of pixel i, represents the probability that pixel i belongs to category 1.

[0055] The beneficial effects of the present invention are:

[0056] The present invention adopts an encoder that extracts global and local context information by combining CNN and Transformer methods. The multi-scale jump connection module can effectively capture features of different scales and improve the segmentation results through context information. The multi-level feature fusion module and the compressed pyramid gating unit effectively improve the ability to extract water bodies of different shapes and sizes and the ability to distinguish water body information from non-water body information. The compressed pyramid gating unit significantly improves the feature representation ability and generalization ability of the model through technical means such as multi-scale information fusion, adaptive receptive field selection, channel attention mechanism, weight adjustment and feature optimization. This design helps the model better capture key features in complex scenarios and improve the accuracy of recognition or classification.

[0057] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0059] Figure 1 It is a schematic diagram of the overall architecture of the remote sensing image water body extraction method of the present invention;

[0060] Figure 2 Schematic diagram of the structure of the multi-scale skip connection module of the present invention;

[0061] Figure 3 It is a schematic diagram of the structure of the compression pyramid gating unit of the present invention. DETAILED DESCRIPTION

[0062] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0063] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0064] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0065] See also Figure 1 to Figure 3 It is a remote sensing image water extraction method based on multi-scale feature fusion of compressed pyramid gating units, which solves the problems of irregular water shapes and sizes and occlusion of non-water areas in current water extraction methods.

[0066] Example

[0067] This embodiment provides a remote sensing image water body extraction method based on multi-scale feature fusion of compressed pyramid gating units. Figure 1 As shown, the result includes the following steps:

[0068] S1. Obtain a water body remote sensing image dataset, divide the dataset into datasets after preprocessing, and perform data enhancement processing;

[0069] S2, using CNN hybrid Transformer encoder to extract feature maps of multiple scales from the image;

[0070] S3, adding feature maps of different scales to the multi-scale skip connection module to extract feature information of multiple scales;

[0071] S4, fusing feature information of multiple scales, and weight-multiplying the fused features with the features of each scale to obtain the final multi-scale adaptive receptive field selection result feature map;

[0072] S5. Use cross entropy loss to train the above process, and after training, it is used for water body extraction in remote sensing images.

[0073] In step S1 of this embodiment, the preprocessing of the data set includes cropping, labeling, and converting the label pixels of the labeled image to 0 or 1. This embodiment adopts an overlapping method for cropping, and uses a sliding window with a stride of 128 to crop the image into a size of 256×256.

[0074] The preprocessed dataset is constructed into training set, validation set and test set in the ratio of 8:1:1, and data enhancement is used to process the images during the training process. The data enhancement includes random resizing, random horizontal flipping and vertical flipping, random Gaussian noise, limited contrast adaptive histogram equalization, random rotation and random cropping methods. The random resizing ratio is 0.5-2.0. Random horizontal flipping, vertical flipping, random Gaussian noise, limited contrast adaptive histogram equalization and random rotation are processed with a probability of 50%. The random rotation angle is in the range of (-180,180). Finally, the processed images are randomly cropped with a crop size of 256×256.

[0075] Specifically, the original 5000×5000 image of the Kaggle water dataset was cropped to 256×256 using a sliding window with a stride of 128. The dataset was divided into three sub-datasets, namely the training set, the validation set, and the test set. The pixel value of the water area in the label image in the dataset was set to 1, and the other pixels were set to 0.

[0076] In step S2 of the present embodiment, the convolutional neural network (CNN) and the Transformer module are combined to perform preliminary extraction of the feature map. Although CNN has good local feature extraction capabilities and has brought a qualitative breakthrough to the water body extraction task. However, the ability to control global modeling is still lacking. With the emergence of Transformer, this problem has been improved. Transformer can effectively capture global context information with its unique self-attention mechanism, overcoming the limitations of CNN in dealing with long-distance dependencies. This is particularly important for water body extraction tasks, because the shape and boundaries of the water body may be complex and intertwined with the surrounding environment, and local features are not enough to accurately identify them. What is even more exciting is that the mechanism of mixing CNN in Transformer can enable the model to capture details and understand global relationships, thereby improving task performance, and the model can more effectively integrate information of different scales, which is very critical for water body extraction tasks, and can strengthen the recognition of water body boundary information and improve the accuracy and robustness of the model.

[0077] Specifically, at least three CNN and Transformer networks are set in the CNN hybrid Transformer encoder in this embodiment, and feature maps of three scales are extracted from three stages, each stage including a CNN layer and a Transformer layer;

[0078] At each stage, the input features are first fed into the Transformer layer to extract global features, and then fed into the CNN layer to extract local features. Then the extraction is performed step by step;

[0079] Each Transformer Block includes a W-MSA Block and a SW-MSA Block; the W-MSABlock includes two layer normalizations, a multi-layer perceptron and a W-MSA, and the SW-MSA Block includes two layer normalizations, a multi-layer perceptron and a SW-MSA;

[0080] Each CNN layer includes two 3X3 convolutions, and the results extracted by Transformer are passed into these two convolutions to further extract local features.

[0081] In the above process, the image block is input into the CNN hybrid Transformer encoder. After passing through each stage in turn, three feature maps with resolutions of {1 / 4, 1 / 8, 1 / 16} of the original image are obtained, where the number of feature map channels C1 to C3 in each stage is {64, 128, 256} respectively.

[0082] In step S3 of the present embodiment, a multi-scale jump connection module is used to extract features of different scales. In the field of water body extraction, the extraction of small water bodies and the interference of background noise have always been troublesome problems in this field. Accurately identifying small water bodies and effectively reducing the interference of background noise can greatly improve the accuracy of the model's water body segmentation and the robustness of the model. The application of multi-scale feature extraction allows the model to focus on features of different scales and sizes at the same time, which indicates that small water bodies are expected to be effectively identified at a smaller scale, thereby improving the model recognition rate. The multi-scale mechanism can also obtain background information at different levels, thereby enhancing the model's ability to distinguish between water bodies and non-water body areas.

[0083] Specifically, if Figure 2As shown in the figure, the multi-scale jump connection module is specifically as follows: the feature map of each stage is input into the convolution with the convolution kernel size of 1x1, 3x3, 5x5, and 7x7 respectively to obtain feature maps of four different scales. The obtained feature maps of four different scales are cascaded and spliced ​​together according to the channel dimension to obtain the final output of the module. In order to capture multi-scale information, the feature maps C1, C2, and C3 of the three different levels obtained by the above operation are first subjected to four parallel convolution operations, where the size of each convolution kernel is 1, 3, 5, and 7 respectively. Then the results x1, x2, and x3 are cascaded and fused according to the channel dimension to obtain a feature map x with rich multi-scale information. k The entire multi-scale skip connection module can be expressed as:

[0084] x1=Conv kxk (C1), k = 1, 3, 5, 7

[0085] x2=Conv kxk (C2), k = 1, 3, 5, 7

[0086] x3=Conv kxk (C3), k = 1, 3, 5, 7

[0087] x k =Cat[x1,x2,x3]

[0088] Among them, Conv kxk () represents convolution with kernel k, and Cat[] represents cascade concatenation according to channel dimension.

[0089] In step S4 of this embodiment, the feature information of the three different scales obtained in step S3 is fused and multiplied by the weights generated by the three scale features through the compression pyramid gating unit.

[0090] Dynamically adjusting weights according to the relevance of input features is a unique feature of the attention mechanism, which enables the model to automatically enhance features related to water bodies when focusing on small water bodies or excluding non-water body features, thereby improving the model's ability to extract small water bodies and suppress background noise.

[0091] For x1, x2, x3 obtained in step S3, considering the different sizes, a 1x1 convolution kernel is selected to process them to obtain y1, y2, y3 of the same dimension size, and then y1, y2, y3 are cascaded and fused according to the channel dimension to obtain a feature map yk with rich multi-scale information.

[0092] y1=Conv 1x1 (x1)

[0093] y2=Conv 1x1 (x2)

[0094] y3=Conv 1x1 (x3)

[0095] y k =Cat[y1,y2,y3]

[0096] Then in the compression pyramid gated unit module, as Figure 3 As shown, the feature map yk undergoes three serial large kernel selection convolutions to obtain three features z1, z2, and z3 of three adaptive receptive fields, and then they are concatenated together to obtain the feature map F c .

[0097] z1=Conv 3×3 (y k )

[0098] z2=Conv 5×5 (z1)

[0099] z3=Conv 7×7 (z2)

[0100] F c =Cat[z1,z2,z3]

[0101] Afterwards, F c First, it is reconstructed into a matrix F through a 1x1 convolution transpose and reshape operation. H ∈R H×1 , and the matrix F is obtained in the same way W ∈R 1×W , and then a similar operation is performed, using 1×1 convolution and reshaping operations to transform the feature map F c Mapped to matrix F A ∈R C×L (L=H×W), then, at F H With F W Perform matrix multiplication between them and reshape them to obtain the eigenvector F L ∈R 1 ×L (L=H×W). Finally, F L and F A Perform matrix multiplication between them and then reshape them to obtain the channel attention weight vector A map ∈R C×1×1 Then, a 1×1 convolution and layer normalization are performed between the inputs, and a sigmoid activation function is applied to obtain the weight W. W is combined with the fusion feature x obtained in step S3. k Multiply element by element to get the final multi-scale adaptive receptive field selection result feature map F out .

[0102] FH =Conv 1×1 (reshape(Conv 1×1 (F C )))

[0103] F W =Conv 1×1 (reshape(Conv 1×1 (F C )))

[0104] F L = reshape(F H ⊙F W )

[0105] F A = reshape(Conv 1×1 (F C ))

[0106] A map = reshape(F L ⊙F A )

[0107] W = δ(Conv 1×1 (LN(A map )))

[0108]

[0109] Where reshape represents the reshaping operation, δ represents the sigmoid activation function, LN represents layer normalization, and ⊙ represents matrix multiplication. Represents element-wise multiplication.

[0110] In step S5 of this embodiment, the AdamW optimizer and the poly learning rate adjustment strategy are used, the cross entropy loss function is used to calculate the loss between the predicted image and the true image, and the loss is reduced by back propagation;

[0111] Specifically, batch training is adopted, and the batch size is 16. The present invention uses the AdamW optimizer and the Poly learning rate adjustment strategy, the learning rate is set to 0.0006, and the weight decay is 0.00025.

[0112] The loss calculation method is specifically as follows: the final prediction graph obtained in S4 is used to calculate the cross entropy loss with the real graph. The cross entropy loss calculation formula is as follows:

[0113]

[0114] Where N represents the total number of pixels in the image, and y i ∈{0, 1} represents the true label of pixel i, represents the probability that pixel i belongs to category 1.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A method for extracting water from remote sensing images based on multi-scale feature fusion of compressed pyramid gating units, characterized in that: It includes the following steps: S1. Obtain a water body remote sensing image dataset, divide the dataset into datasets after preprocessing, and perform data enhancement processing; S2, using CNN hybrid Transformer encoder to extract feature maps of multiple scales from the image; S3, adding feature maps of different scales to the multi-scale skip connection module to extract feature information of multiple scales; S4, fusing feature information of multiple scales, and weight-multiplying the fused features with the features of each scale to obtain the final multi-scale adaptive receptive field selection result feature map; S5. Use cross entropy loss to train the above process, and after training, it is used for water body extraction in remote sensing images.

2. The method for extracting water from remote sensing images by multi-scale feature fusion based on a compressed pyramid gating unit according to claim 1, characterized in that: In step S1, the preprocessing of the data set includes cropping, labeling, and binarization of the labeled pixels of the labeled image; The division of the data set includes: dividing the data set into a training set, a validation set, and a test set according to a preset ratio; The data augmentation of the dataset includes: random resizing of the dataset, random horizontal and vertical flipping, random Gaussian noise, contrast-constrained adaptive histogram equalization, random rotation, and random cropping.

3. The method for extracting water from remote sensing images based on multi-scale feature fusion of a compressed pyramid gating unit according to claim 1, characterized in that: In step S2, at least three CNN and Transformer networks are set in the CNN hybrid Transformer encoder to extract feature maps of three scales from three stages. After passing through each stage in turn, three feature maps with resolutions of {1 / 4, 1 / 8, 1 / 16} of the original image are obtained, wherein the number of feature map channels C1 to C3 of each stage are {64, 128, 256} respectively; Each stage includes a CNN layer and a Transformer layer. In each stage, the input features are first input into the Transformer layer to extract global features, and then input into the CNN layer to extract local features, and the extraction is performed step by step. Each Transformer layer includes a W-MSA Block and a SW-MSA Block; the W-MSA Block includes two layer normalizations, a multi-layer perceptron and a W-MSA, and the SW-MSA Block includes two layer normalizations, a multi-layer perceptron and a SW-MSA; Each CNN layer includes two 3X3 convolutions, and the results extracted by Transformer are passed into the convolution to further extract local features.

4. The method for extracting water from remote sensing images by multi-scale feature fusion based on a compressed pyramid gating unit according to claim 1, characterized in that: In step S3, the multi-scale jump connection module includes several convolution kernels of different sizes. The feature maps of each stage are respectively input into the convolutions with convolution kernels of different sizes to obtain feature maps of different scales. The feature maps of different scales are cascaded and spliced ​​according to the channel dimension to obtain the output of the multi-scale jump connection module, which includes: S31, the feature maps C1, C2, C3 at different levels are subjected to several parallel convolution operations: x1=Conv kxk (C1),k=1,3,5,7 x2=Conv kxk (C2),k=1,3,5,7 x3=Conv kxk (C3),k=1,3,5,7 Conv kxk () represents convolution with kernel size k; S32, concatenate the convolution results x1, x2, and x3 according to the channel dimension to obtain a feature map x containing multi-scale information k : x k =Cat[x1,x2,x3] Cat[] represents cascade concatenation by channel dimension.

5. The method for extracting water from remote sensing images by multi-scale feature fusion based on a compressed pyramid gating unit according to claim 4, characterized in that: In step S4, the obtained feature maps x1, x2, x3 are processed with a 1x1 convolution kernel to obtain y1, y2, y3 of the same dimension size, and then y1, y2, y3 are cascaded and fused according to the channel dimension to obtain a feature map y containing multi-scale information k : y1=Conv 1x1 (x1) y2=Conv 1x1 (x2) y3=Conv 1x1 (x3) <h2 style=";text-align:left;direction:ltr">y<h2 style=";text-align:left;direction:ltr"> k <h2 style=";text-align:left;direction:ltr"> =Cat[y1,y2,y3] The feature map y k The input is sent to the compressed pyramid gated unit module. After three serial large-core selection convolutions, three features z1, z2, and z3 of three adaptive receptive fields are obtained respectively, and they are concatenated to obtain the feature map F. c : z1=Conv 3×3 (and k ) z2=Conv 5×5 (z1) z3=Conv 7×7 (z2) F c =Cat[z1,z2,z3] Then, F c It is reconstructed into matrix F through 1x1 convolution transpose and reshape operation. H ∈R H×1 and the matrix F W ∈R 1×W : F H =Conv 1×1 (reshape(Conv 1×1 (F C ))) F W =Conv 1×1 (reshape(Conv 1×1 (F C ))) In F H With F W Perform matrix multiplication between them and reshape them to obtain the eigenvector F L ∈R 1×L , L=H×W: F L =reshape(F H ⊙F W ) Then use 1×1 convolution and reshape operation to map the feature map F c Mapped to matrix F A ∈R C×L : F A =reshape(Conv 1×1 (F C )) F L and F A Perform matrix multiplication between them and then reshape them to obtain the channel attention weight vector A map ∈R C×1×1 : A map =reshape(F L ⊙F A ) Perform 1×1 convolution between inputs, layer normalization, and apply sigmoid activation function to get weight W: W=δ(Conv 1×1 (LN(A map ))) W and fusion feature x k Multiply element by element to get the final multi-scale adaptive receptive field selection result feature map F out : In the above process, reshape represents the reshaping operation, δ represents the sigmoid activation function, LN represents layer normalization, and ⊙ represents matrix multiplication. Represents element-wise multiplication.

6. The method for extracting water from remote sensing images by multi-scale feature fusion based on a compressed pyramid gating unit according to claim 5, characterized in that: In step S5, the AdamW optimizer and the poly learning rate adjustment strategy are used to calculate the loss between the predicted image and the true image using the cross entropy loss function, where the cross entropy loss calculation formula is as follows: Where N represents the total number of pixels in the image, y i ∈{0,1} represents the true label of pixel i, represents the probability that pixel i belongs to category 1.

Citation Information

Patent Citations

  • Remote sensing image semantic segmentation method based on pyramid pooling multistage feature fusion network

    CN112418176A

  • Remote sensing image road extraction method and device based on convolutional network

    CN116543304A

  • Transform-based remote sensing image building extraction method

    CN117351363A

  • High-resolution remote sensing scene classification method based on gated mixed attention

    CN117830869A

  • Remote sensing image water body extraction method based on multistage feature fusion

    CN118334332A

Cited By

  • Method and device for predicting state of charge of automobile battery

    CN120030317A