Remote sensing image surface water body extraction method, device and system, and storage medium
By introducing the RSWE-Net network into the remote sensing image, combining cross-scale adaptive feature integration, multi-level small-target water accuracy optimization and context semantic attention decoding module, the problem of poor generalization ability when extracting surface water bodies in high-resolution images is solved, and higher extraction accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202411770154.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The generalization ability of surface water extraction methods in traditional remote sensing images is poor, resulting in serious salt and pepper noise in high-resolution images, and the extraction results are not accurate enough.
The remote sensing surface water extraction network RSWE-Net is used, which includes a cross-scale adaptive feature integration encoding module, a multi-level small-target water body accuracy optimization module and a context semantic attention decoding module. Through the combination of these modules, different scale features are dynamically integrated to improve the extraction accuracy.
It significantly improves the accuracy of surface water extraction in remote sensing images, reduces salt and pepper noise, and can more accurately capture water features of different scales and complexities.
Smart Images

Figure CN119723332A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method and device, a system and a storage medium for extracting surface water bodies from remote sensing images. Background Art
[0002] With the improvement of people's living standards, environmental protection has received increasing attention in recent years, and more and more people have begun to realize its importance. The spatial distribution and area of surface water, as an important indicator of the state of the natural environment, not only reflects the characteristics of the natural environment, but is also affected to a certain extent by global climate change, which is largely due to the increase in human daily activities. As a key component of the hydrological cycle, the accurate extraction of surface water is of great significance to many fields, including water change detection, water resources protection, global climate change research, and emergency response to flood disasters.
[0003] Traditional water segmentation methods mainly rely on thresholding the water index. However, when these methods are applied to high-resolution remote sensing images, the spectral variability increases due to the increase in spatial details in the image, resulting in a decrease in the generalization ability of traditional methods. Although machine learning methods can avoid the errors caused by threshold selection to a certain extent, most methods still rely only on low-level features such as color, shape, and texture of surface water bodies to complete the segmentation process, resulting in severe salt and pepper noise in the extraction results. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for extracting surface water from remote sensing images, so as to improve the accuracy of water extraction.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] A method for extracting surface water from a remote sensing image, comprising:
[0007] Step S1, obtaining a remote sensing surface water data set;
[0008] Step S2, constructing a remote sensing surface water extraction network RSWE-Net according to the remote sensing surface water dataset; wherein the remote sensing surface water extraction network RSWE-Net includes: a cross-scale adaptive feature integration encoding module; a multi-level small target water body precision optimization module; and a contextual semantic attention decoding module;
[0009] Step S3, dividing the remote sensing surface water data set to obtain a training set and a test set;
[0010] Step S4, training the remote sensing surface water extraction network RSWE-Net according to the training set;
[0011] Step S5: input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water in the remote sensing image.
[0012] Preferably, the cross-scale adaptive feature integration coding module includes: a hybrid multi-path pooling convolution sub-module, which extracts a cross-scale adaptive feature map by combining a pooling residual mechanism with ordinary convolution in parallel.
[0013] Preferably, the multi-level small target water body precision optimization module includes: a pooled convolution normalized activation submodule, which combines the horizontal and vertical extraction mechanisms and different types of hole convolutions in parallel to extract multi-level small target water body feature maps with different receptive fields.
[0014] Preferably, the contextual semantic attention decoding module learns and synthesizes different feature information through four different branches consisting of maximum pooling, average pooling, hole convolution and ordinary convolution, and simultaneously splices the shallow feature map with the contextual semantic feature map in the channel dimension.
[0015] The present invention also provides a remote sensing image surface water extraction device, comprising:
[0016] An acquisition module is used to acquire remote sensing surface water datasets;
[0017] A construction module is used to construct a remote sensing surface water extraction network RSWE-Net based on a remote sensing surface water dataset; wherein the remote sensing surface water extraction network RSWE-Net includes: a cross-scale adaptive feature integration encoding module; a multi-level small target water accuracy optimization module; a contextual semantic attention decoding module;
[0018] A partitioning module is used to partition the remote sensing surface water dataset into training and testing sets;
[0019] The training module is used to train the remote sensing surface water extraction network RSWE-Net according to the training set;
[0020] The extraction module is used to input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water bodies in remote sensing images.
[0021] An embodiment of the present invention also provides a remote sensing image surface water body extraction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a remote sensing image surface water body extraction method when executed by the processor.
[0022] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is run, the method for extracting surface water bodies from remote sensing images is executed.
[0023] The present invention adopts a remote sensing surface water extraction network RSWE-Net, which includes: a cross-scale adaptive feature integration coding module, a multi-level small target water body precision optimization module, and a contextual semantic attention decoding module. The cross-scale adaptive feature integration coding module in RSWE-Net can dynamically adjust and fuse feature maps from different scales in an adaptive manner, which helps to capture the detailed information of surface water bodies at different resolutions, such as small-area lakes, rivers, and large-scale water contours, thereby significantly enhancing the model's comprehensive representation ability for water body features; the multi-level small target water body precision optimization module can perform refined feature extraction for small target water bodies of different scales and complexities by constructing a multi-level network structure, so that the module can capture the fine features of small water bodies such as streams and puddles, thereby significantly improving the detection accuracy of these small targets; the contextual semantic attention decoding module can dynamically focus on the key semantic information in the input remote sensing image by introducing the attention mechanism, so that the model can more accurately understand the semantic relationship between water bodies and other land objects in the decoding stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0025] Figure 1 This is a flow chart of a method for extracting surface water from remote sensing images according to an embodiment of the present invention;
[0026] Figure 2 Schematic diagram of RSWE-Net structure;
[0027] Figure 3 This is the data processing flow chart of RSWE-Net;
[0028] Figure 4 This is a schematic diagram of the HMPCB structure on the A1 branch;
[0029] Figure 5 This is a schematic diagram of the structure of the multi-level small target water body precision optimization module;
[0030] Figure 6 Schematic diagram of the PCNAB structure of the pooling convolution normalization activation submodule. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0033] Embodiment 1:
[0034] like Figure 1 As shown, an embodiment of the present invention provides a method for extracting surface water bodies from remote sensing images, comprising:
[0035] Step S1, obtaining a remote sensing surface water data set;
[0036] Step S2, constructing a remote sensing surface water extraction network RSWE-Net based on the remote sensing surface water dataset;
[0037] Step S3, dividing the remote sensing surface water data set to obtain a training set and a test set;
[0038] Step S4, training the remote sensing surface water extraction network RSWE-Net according to the training set;
[0039] Step S5: input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water in the remote sensing image.
[0040] As an implementation method of an embodiment of the present invention, in step S1, first, each picture in the remote sensing image is adjusted to a uniform size to obtain a remote sensing surface water classification data set; secondly, each picture in the remote sensing surface water classification data set is annotated with surface water bodies to generate a remote sensing surface water segmentation data set; then, the above-mentioned remote sensing surface water segmentation data set is converted into a remote sensing surface water semantic segmentation data set, and the RGB color label of each picture in the remote sensing surface water semantic segmentation data set is converted into a corresponding remote sensing surface water single-channel digital label; finally, the single-channel digital label of the remote sensing surface water is accurately matched with the remote sensing surface water classification data set, and each remote sensing image in the remote sensing surface water classification data set is made to correspond to its unique and corresponding single-channel digital label, thereby forming a remote sensing surface water data set.
[0041] In the experiment of the present invention, a GF-6 remote sensing image of a certain area in Anhui Province is used. By using a Python script, the size of 3000 images in the GF-6 remote sensing image is adjusted to 512×512 pixels to obtain a remote sensing surface water classification data set. Labelme is used to manually annotate each image in the remote sensing surface water classification data set to obtain a remote sensing surface water segmentation data set, and the remote sensing surface water segmentation data set is converted into a remote sensing surface water semantic segmentation data set through the "labelme2voc" script, and the 3000 RGB color labels in the semantic segmentation data set are converted into corresponding remote sensing surface water single-channel digital labels. The final remote sensing surface water data set consists of 3000 remote sensing surface water images and their corresponding 3000 single-channel digital labels, ensuring that each remote sensing surface water image in the data set corresponds to its unique and accurately matched single-channel digital label.
[0042] As an implementation of the embodiment of the present invention, in step S2, Figure 2 , 3 As shown in the figure, the remote sensing surface water body extraction network RSWE-Net (Remote sensing Surface Water body Extraction Network) uses RSWE-Net to extract surface water bodies from remote sensing images. The process is divided into three steps: extracting and integrating cross-scale features of remote sensing surface water body images; extracting features of multi-level small-target remote sensing surface water bodies; extracting contextual semantic features of remote sensing surface water body images. The three main steps correspond to the three modules of the RSWE-Net network model: cross-scale adaptive feature integration encoding module; multi-level small-target water body accuracy optimization module; contextual semantic attention decoding module.
[0043] Further, step S2 specifically includes:
[0044] Step 2.1 Extract cross-scale features of remote sensing surface water images and integrate
[0045] The task of extracting and integrating cross-scale features of remote sensing surface water images is completed by the cross-scale adaptive feature integration coding module of RSWE-Net.
[0046] The operation and construction process of the cross-scale adaptive feature integration coding module is as follows:
[0047] Step 2.1.1: Input the remote sensing surface water image into the cross-scale adaptive feature integration coding module.
[0048] Step 2.1.2: Use a convolution kernel of size 3×3 to perform a convolution operation on the remote sensing surface water image, and then perform batch normalization (i.e. Figure 2The BN operation in the above example (the full name of BN is BatchNorm) and the activation function processing (i.e. Figure 2 The ReLU operation in is used to obtain the shallow feature map F1 of the first water body.
[0049] Step 2.1.3: Use a 3×3 convolution kernel to perform a convolution operation on F1 to obtain the second shallow water feature map F2, and input F2 into the three branches including A1, A2 and A3 (see Figure 2 ).
[0050] Step 2.1.4: A hybrid multi-path pooling convolutional block (HMPCB) is designed and introduced in the A1 branch. On the A1 branch, HMPCB is used to extract cross-scale features of F2. The overall structure of HMPCB on the A1 branch is shown in the figure. Figure 4 As shown:
[0051] F2 is input into HMPCB. First, global average pooling (i.e. Figure 4 The Global Avg Pool operation in Figure 4 The Global Max Pool operation in ) and the convolution kernel of size 3×3 perform pooling and convolution operations on F2 respectively; then, the three results are concatenated in the channel dimension (i.e. Figure 4 Concat operation in the third water body) to obtain the shallow feature map F2_1 of the third water body; then use the convolution kernel of size 3×3 and void ratio 3 to perform convolution operation on F2_1; then use the Sigmoid activation function to obtain the weight ω of each channel; finally, the weight ω is element-wise multiplied with F2 (i.e. Figure 4 The M operation in ( ) is performed to obtain the first cross-scale adaptive feature map F3.
[0052] The process of processing F2 with HMPCB to obtain F3 is shown in equations (1), (2) and (3):
[0053] F2_1=Concat(GAP(F2),GMP(F2),Conv3(F2)) (1)
[0054] ω=S(Conv3_3(F2_1)) (2)
[0055] F3=ω⊙F2 (3)
[0056] In the above formula, Concat() represents the concatenation operation on the channel dimension; GAP() represents the Global Avg Pool operation; GMP() represents the Global Max Pool operation; Conv3() represents the convolution operation of a convolution kernel of size 3×3; Conv3_3() represents the convolution operation of a convolution kernel of size 3×3 and a void rate of 3; S represents the Sigmoid activation function; ⊙ represents the element-by-element product.
[0057] Among them, dilation rate: ordinary convolution operation is to calculate the pixel value of the corresponding position of the output feature map by multiplying the convolution kernel with each pixel point of the input feature map and summing them. The dilation convolution inserts additional intervals (or "holes") in the convolution kernel. These intervals can increase the effective size of the convolution kernel without increasing the number of parameters. The size of this interval is called the "dilation rate" (DilationRate), which is usually expressed as an integer, which determines the size of the interval in the convolution kernel.
[0058] Concat channel dimension concatenation: refers to concatenating two or more features with the same spatial dimensions (height and width) on the channel dimension to generate a new feature map. This new feature map has the same spatial dimensions as the input feature map, but the number of channels is the sum of the number of channels of all input feature maps.
[0059] Step 2.1.4: After concatenating F3 and F2 in the channel dimension, they are input into HMPCB and processed in the same way as HMPCB on branch A1 to obtain the second cross-scale adaptive feature map F4.
[0060] Step 2.1.5: Input F4 into the A3 branch, concatenate F4 and F2 in the channel dimension, and then perform a convolution operation of size 3×3 to obtain the third cross-scale adaptive feature map F5.
[0061] Step 2.1.6: After concatenating F2, F3, F4 and F5 in the channel dimension, a convolution operation of size 3×3 is performed to obtain the fourth cross-scale adaptive feature map F6.
[0062] Step 2.2 Extract the characteristics of multi-level small-target remote sensing surface water bodies
[0063] The task of extracting the characteristics of multi-level small-target remote sensing surface water bodies is completed by the multi-level small-target water body precision optimization module of RSWE-Net. The multi-level small-target water body precision optimization module consists of five parallel branches (B1, B2, B3 and B4). Among them, the overall structure of the multi-level small-target water body precision optimization module is as follows Figure 5 As shown:
[0064] The operation and construction process of the multi-level small target water body precision optimization module is as follows:
[0065] Step 2.2.1: Input F6 into the B1 branch, and use the convolution kernel of size 1×1 and the convolution kernel of size 3×3 to perform convolution operation on F6 to obtain the first multi-level small target water body feature map F6_1.
[0066] Step 2.2.2: Input F6 into the B2 branch, and then use the pooling convolution normalization activation submodule PCNAB (Pooling Convolution Normalization Activation Block) to process F6. The overall structure of PCNAB is as follows: Figure 6 As shown:
[0067] In PCNAB, first, horizontal average pooling (i.e. Figure 6 X_Avg Pool operation in ) and vertical average pooling (i.e. Figure 6 The Y_Avg Pool operation in the above example performs a pooling operation on F6 to obtain the vertical and horizontal outputs; then the vertical and horizontal outputs are fused in the channel dimension (i.e. Figure 6 Concat operation in ); then use a convolution kernel of size 3×3 to perform a convolution operation on the fused result, and then perform a batch normalization operation (i.e. Figure 6 The BN operation in ( ) is used to obtain the weight γ of each channel, and then the element-by-element product is performed with F6 to obtain the second multi-level small target water body feature map F6_2. Then, a 3×3 convolution kernel is used to perform a convolution operation on F6_2, and it is activated by the Sigmoid function. Finally, it is fused with F6_2 in the channel dimension to obtain the seventh multi-level small target water body feature map F7.
[0068] The process of using PCNAB to process F6 to obtain F7 is shown in the following equations (4), (5) and (6):
[0069] γ=BN(Conv3(Concat(XAP(F6),YAP(F6)))) (4)
[0070] F6_3=F6⊙γ (5)
[0071] F7=Concat(F6,S(Conv3(F6_3))) (6)
[0072] Among them, Concat() represents the concatenation operation on the channel dimension; XAP() represents the X_Avg Pool operation; YMP() represents the Y_Avg Pool operation; Conv3() represents the convolution operation of a convolution kernel of size 3×3; BN() represents the batch normalization operation; S represents the Sigmoid activation function; ⊙ represents the element-by-element product.
[0073] Step 2.2.3: Input F6 into the B3 branch, and perform convolution operations on F6 using a convolution kernel of size 1×1, a convolution kernel of size 5×5, and a dilated convolution of size 3×3 with a dilation rate of 5 to obtain the third multi-level small target water body feature map F6_3. F7 and F6_3 are fused in the channel dimension to obtain the fourth multi-level small target water body feature map F6_4.
[0074] Step 2.2.4: Input F6 into the B4 branch, and use the convolution kernel of size 1×1, the convolution kernel of size 9×9, and the dilated convolution of size 3×3 and dilated rate 9 to perform convolution operation on F6 to obtain the fifth multi-level small target water body feature map F6_5, and then fuse F7 and F6_5 in the channel dimension to obtain the sixth multi-level small target water body feature map F6_6.
[0075] Step 2.2.5: F6_1, F6_4 and F6_6 are fused in the channel dimension, and then activated using the Sigmoid activation function to obtain the eighth multi-level small target water body feature map F8.
[0076] Step 2.3 Extracting contextual semantic features of remote sensing surface water images
[0077] The task of extracting contextual semantic features of remote sensing surface water images is completed by the contextual semantic attention decoding module of RSWE-Net.
[0078] The operation and construction process of the contextual semantic attention decoding module is as follows:
[0079] Step 2.3.1: Input F8 into the contextual semantic attention decoding module, use bilinear interpolation to adjust the size of F7, and obtain the first contextual semantic feature map F9.
[0080] Step 2.3.2: Use a convolution kernel of size 1×1 to perform a convolution operation on F9 to obtain the second contextual semantic feature map F10, and then input F10 into the four branches C1, C2, C3 and C4.
[0081] Step 2.3.3: Input F10 into C1 and perform the maximum pooling operation on F10 (i.e. Figure 2The MaxPool operation shown in ) and a convolution operation using a convolution kernel of size 1×1 are performed to obtain the third contextual semantic feature map F10_1.
[0082] Step 2.3.4: Input F10 into C2, first perform a convolution operation on F10 using a convolution kernel of size 1×1, and then perform a further convolution operation using a dilated convolution kernel of size 1×1 and a dilation rate of 3 to obtain the fourth contextual semantic feature map F10_2.
[0083] Step 2.3.5: Input F10 into C3, first perform a convolution operation on F10 using a convolution kernel of size 1×1, and then perform a further convolution operation using a dilated convolution kernel of size 1×1 and a dilation rate of 5 to obtain the fifth contextual semantic feature map F10_3.
[0084] Step 2.3.6: Input F10 into C4 and perform average pooling operation on F10 (i.e. Figure 2 A convolution operation is performed using a convolution kernel of size 1×1 to obtain the sixth contextual semantic feature map F10_4.
[0085] Step 2.3.7: First perform bilinear interpolation on F10_1, F10_2, F10_3, and F10_4, and then fuse them with F2 in the channel dimension to obtain the seventh contextual semantic feature map F11.
[0086] Step 2.3.8: Use a convolution of size 1×1 to perform a convolution operation on F11, adjust the number of channels of F11, and obtain a semantic segmentation image of the surface water body, in which the white part represents the surface water body and the black part represents the background.
[0087] In the experiment of the present invention, the size of the remote sensing surface water body image is 512×512 pixels and 3 channels, and it is input into the cross-scale adaptive feature integration coding module, and the remote sensing surface water body image is convolved with a convolution kernel of size 3×3, and then normalized and ReLU activation function processed to obtain the first water body shallow layer feature map F1, and the size of F1 is 256×256 pixels and 64 channels. The convolution kernel of size 3×3 is used to convolve F1 to obtain the second water body shallow layer feature map F2, and the size of F2 is 128×128 pixels and 128 channels. F2 is input into three branches including A1, A2 and A3. On the A1 branch, the first cross-scale adaptive feature map F3 is obtained after HMPCB processing. The size of F3 is 128×128 pixels and 128 channels. F3 is input into the A2 branch, and F3 and F2 are spliced in the channel dimension, and then input into HMPCB. The same processing method as HMPCB on the A1 branch is used to obtain the second cross-scale adaptive feature map F4. The size of F4 is 128×128 pixels and 128 channels. F4 is input into the A3 branch, and F4 and F2 are spliced in the channel dimension, and then a convolution operation of size 3×3 is performed to obtain the third cross-scale adaptive feature map F5. The size of F5 is 128×128 pixels and 128 channels. After concatenating F2, F3, F4 and F5 in the channel dimension, a convolution operation of size 3×3 is performed to obtain the fourth cross-scale adaptive feature map F6, which has a size of 128×128 pixels and 128 channels.
[0088] F6 is input into the B1 branch of the multi-level small target water body precision optimization module, and a convolution operation is performed on F6 using a convolution kernel of size 1×1 and a convolution kernel of size 3×3 to obtain the first multi-level small target water body feature map F6_1, with a size of 128×128 pixels and 128 channels. F6 is input into the B2 branch, and then the pooling convolution normalization activation submodule PCNAB is used to process F6 to obtain the seventh multi-level small target water body feature map F7, with a size of 128×128 pixels and 128 channels. Input F6 into the B3 branch, and use the convolution kernel of size 1×1, the convolution kernel of size 5×5, and the dilated convolution of size 3×3 and dilated rate 5 to perform convolution operation on F6, and obtain the third multi-level small target water body feature map F6_3, the size of F6_3 is 128×128 pixels and 128 channels, and fuse F7 and F6_3 in the channel dimension to obtain the fourth multi-level small target water body feature map F6_4, the size of F6_4 is 128×128 pixels and 128 channels; Input F6 into the B4 branch, and use the convolution kernel of size 1×1, the convolution kernel of size 9×9, and the dilated convolution of size 3×3 and dilated rate 9 to convolve F6 to obtain the fifth multi-level small target water body feature map F6_5, the size of F6_5 is 128×128 pixels, 128 channels, and then fuse F7 and F6_5 in the channel dimension to obtain the sixth multi-level small target water body feature map F6_6, the size of F6_6 is 128×128 pixels, 128 channels. F6_1, F6_4, and F6_6 are fused in the channel dimension, and then activated by the Sigmoid activation function to obtain the eighth multi-level small target water body feature map F8, the size of F8 is 128×128 pixels, 128 channels.
[0089] F8 is input into the contextual semantic attention decoding module. First, the size of F8 is adjusted by bilinear interpolation to obtain the first contextual semantic feature map F9, which has a size of 256×256 pixels and 64 channels. Then, a convolution operation is performed on F9 with a convolution kernel of size 1×1 to obtain the second contextual semantic feature map F10, which has a size of 256×256 pixels and 64 channels. Then, F10 is input into four branches, namely C1, C2, C3 and C4. Input F10 into C1, perform a maximum pooling operation on F10 and a convolution operation using a convolution kernel of size 1×1 to obtain a third context semantic feature map F10_1, where the size of F10_1 is 256×256 pixels and 64 channels; Input F10 into C2, first perform a convolution operation on F10 using a convolution kernel of size 1×1, and then perform a further convolution operation using a dilated convolution kernel of size 1×1 and a dilation rate of 3 to obtain a fourth context semantic feature map F10_2, where the size of F10_2 is 256×256 pixels and 64 channels; Input F10 into C3, first use the convolution operation of the convolution kernel of size 1×1 on F10, and then use the dilated convolution kernel of size 1×1 and dilation rate 5 to perform further convolution operation, and obtain the fifth context semantic feature map F10_3, the size of F10_3 is 256×256 pixels and 64 channels; input F10 into C4, perform average pooling operation on F10 and convolution operation with the convolution kernel of size 1×1, and obtain the sixth context semantic feature map F10_4, the size of F10_4 is 256×256 pixels and 64 channels. After bilinear interpolation operation on F10_1, F10_2, F10_3 and F10_4, they are fused with F2 in channel dimension to obtain the seventh context semantic feature map F11, the size of F11 is 512×512 pixels and 32 channels. A convolution operation is performed on F11 with a size of 1×1, and the number of channels of F11 is adjusted to obtain a semantic segmentation image of the surface water body. The size of the semantic segmentation image of the surface water body is 512×512 pixels and 1 channel.
[0090] As an implementation method of an embodiment of the present invention, in step S3, the remote sensing surface water data set is divided into a training set, a validation set and a test set according to a certain ratio, and the training set, the validation set and the test set are mutually exclusive data. The training set accounts for 70% of the total data set, that is, 2100 remote sensing surface water body images. The validation set and the test set each account for 15% of the total data set, that is, 450 remote sensing surface water body images respectively.
[0091] As an implementation method of an embodiment of the present invention, step S4 is specifically as follows: first initialize all neural network parameters, set model-related hyperparameters, such as: training rounds, batch size, optimizer selection, learning rate, and total number of iterations. After initializing the parameters, the training set and validation set data are divided into multiple batches, and each batch of training set data is input into the remote sensing surface water extraction network RSWE-Net for training to obtain the training loss value loss of the batch. After a round of training is completed for all batches of data in the entire training set, the validation set is input into the remote sensing surface water extraction network RSWE-Net according to the batch to obtain the corresponding batch loss value batch_loss. The loss value of the validation set is mainly used to monitor whether overfitting occurs and adjust the training strategy, such as terminating the training in advance or adjusting the learning rate. During training and verification, the remote sensing surface water extraction network RSWE-Net will automatically learn and adjust the parameters according to each loss and batch_loss situation. When the training process is carried out for one or more rounds until the batch_loss value converges, the training of the remote sensing surface water extraction network RSWE-Net is completed.
[0092] As an implementation method of an embodiment of the present invention, in step S5, the test set is input into the trained RSWE-Net, and the surface water body extraction result is output, that is, the surface water body semantic segmentation image, which removes background interference and only retains the water body.
[0093] In the cross-scale adaptive feature integration coding module of RSWE-Net, a hybrid multi-path pooling convolution submodule HMPCB is designed in the embodiment of the present invention. HMPCB uses global average pooling, global maximum pooling and hole convolution kernel to calculate the weights of each channel of the input image, and then multiplies the weights by the shallow feature map element by element to obtain a cross-scale adaptive feature map. HMPCB is connected in parallel with ordinary convolution to jointly extract and integrate feature maps with feature information of different scales.
[0094] In the multi-level small target water body precision optimization module of RSWE-Net, the embodiment of the present invention designs four parallel branches, namely B1, B2, B3 and B4. A pooling convolution normalization activation submodule PCNAB is designed in the multi-level small target water body precision optimization module. PCNAB extracts features from the horizontal and vertical directions, and then performs normalization and activation function processing to obtain a multi-level small target water body feature map. PCNAB increases the nonlinear ability of the model. Then, PCNAB is combined with ordinary convolution, hole convolution and activation function to extract features of small target water bodies in remote sensing images, which solves the problem that the detailed information of extremely small areas of water bodies is not clear enough, making extraction difficult, and improves the accuracy of water body detection.
[0095] In the contextual semantic attention decoding module of RSWE-Net, the embodiment of the present invention designs four branches consisting of maximum pooling, average pooling, dilated convolution and ordinary convolution. The extraction results of the four branches are designed to be fused in the channel dimension, and then fused in the channel dimension with the shallow feature map in the cross-scale adaptive feature integration coding module to obtain the contextual semantic feature map.
[0096] The embodiments of the present invention can integrate feature maps of feature information of different scales, solve the problem that the features of water bodies of different scales on remote sensing images are greatly different; the detection accuracy of small target water bodies is higher, which solves the problem that the detailed information of water bodies in extremely small areas is not clear enough due to the continuous improvement of the resolution of remote sensing images, making extraction difficult; the semantic information attention ability is strong, which reduces the influence of the complex correlation between the water bodies in the remote sensing images and the surrounding environment, and focuses on the extraction of contextual semantic information of surface water bodies in remote sensing images during the extraction process.
[0097] Embodiment 2:
[0098] The embodiment of the present invention further provides a remote sensing image surface water extraction device, comprising:
[0099] An acquisition module is used to acquire remote sensing surface water datasets;
[0100] A construction module is used to construct a remote sensing surface water extraction network RSWE-Net based on a remote sensing surface water dataset; wherein the remote sensing surface water extraction network RSWE-Net includes: a cross-scale adaptive feature integration encoding module; a multi-level small target water accuracy optimization module; a contextual semantic attention decoding module;
[0101] A partitioning module is used to partition the remote sensing surface water dataset into training and testing sets;
[0102] The training module is used to train the remote sensing surface water extraction network RSWE-Net according to the training set;
[0103] The extraction module is used to input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water bodies in remote sensing images.
[0104] Embodiment 3:
[0105] An embodiment of the present invention also provides a remote sensing image surface water body extraction system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a remote sensing image surface water body extraction method when executed by the processor.
[0106] Embodiment 4:
[0107] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is run, the method for extracting surface water bodies from remote sensing images is executed.
[0108] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for extracting surface water from remote sensing images, characterized in that: include: Step S1, obtaining a remote sensing surface water data set; Step S2, constructing a remote sensing surface water extraction network RSWE-Net according to the remote sensing surface water dataset; wherein the remote sensing surface water extraction network RSWE-Net includes: a cross-scale adaptive feature integration encoding module; a multi-level small target water body precision optimization module; and a contextual semantic attention decoding module; Step S3, dividing the remote sensing surface water data set to obtain a training set and a test set; Step S4, training the remote sensing surface water extraction network RSWE-Net according to the training set; Step S5: input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water in the remote sensing image.
2. The method for extracting surface water from remote sensing images according to claim 1, characterized in that: The cross-scale adaptive feature integration coding module includes: a hybrid multi-path pooling convolution sub-module, which extracts cross-scale adaptive feature maps by combining the pooling residual mechanism with ordinary convolution in parallel.
3. The method for extracting surface water from remote sensing images according to claim 2, characterized in that: The multi-level small target water body precision optimization module includes: pooled convolution normalized activation submodule. The pooled convolution normalized activation submodule combines the horizontal and vertical extraction mechanisms with different types of hole convolutions in parallel to extract multi-level small target water body feature maps with different receptive fields.
4. The method for extracting surface water from remote sensing images according to claim 3, characterized in that: The contextual semantic attention decoding module learns and synthesizes different feature information through four different branches consisting of maximum pooling, average pooling, void convolution and ordinary convolution, and concatenates the shallow feature map with the contextual semantic feature map in the channel dimension.
5. A remote sensing image surface water extraction device, characterized in that: include: An acquisition module is used to acquire remote sensing surface water datasets; A construction module is used to construct a remote sensing surface water extraction network RSWE-Net based on a remote sensing surface water dataset; wherein the remote sensing surface water extraction network RSWE-Net includes: a cross-scale adaptive feature integration encoding module; a multi-level small target water accuracy optimization module; a contextual semantic attention decoding module; A partitioning module is used to partition the remote sensing surface water dataset into training and testing sets; The training module is used to train the remote sensing surface water extraction network RSWE-Net according to the training set; The extraction module is used to input the test set into the trained remote sensing surface water extraction network RSWE-Net to extract surface water bodies in remote sensing images.
6. A remote sensing image surface water extraction system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the method for extracting surface water bodies from remote sensing images as described in any one of claims 1 to 4 is executed.
7. A storage medium, characterized in that: The storage medium stores a computer program, which executes the method for extracting surface water bodies from remote sensing images as claimed in any one of claims 1 to 4 when running.
Citation Information
Patent Citations
Multi-scale feature supported remote sensing image water body information accurate segmentation method
CN110781775A
Remote sensing image fishpond extraction method based on row-column self-attention full convolutional neural network
CN111860351A
Hyperspectral remote sensing image classification method based on self-attention context network
WO2022073452A1
Cited By
Surface water body intelligent identification sample library construction method based on remote sensing image
CN120673180A
A method for constructing a sample library of intelligent recognition of surface water bodies based on remote sensing images
CN120673180B