Remote sensing image water body extraction method and system

By employing multi-scale feature localization and edge guidance methods, the problems of complex background interference and blurred boundaries in water body extraction from remote sensing images were solved. This enabled effective separation of water bodies from the background and accurate extraction of boundaries, thereby improving the accuracy and robustness of water body extraction.

CN121884133APending Publication Date: 2026-04-17XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIDIAN UNIV
Filing Date
2025-12-31
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing methods for extracting water bodies from remote sensing images suffer from oversegmentation and undersegmentation when dealing with complex background interference and blurred water body boundaries. They lack versatility and the models are not good at distinguishing between water body features and non-water body features.

Method used

A multi-scale feature localization and edge-guided approach is adopted. Multi-scale features are extracted through a visual attention network, and feature modulation and adaptive fusion are performed by combining water body location mask and edge information. The model is optimized by using water body segmentation loss and edge prediction loss to achieve separation of water body from background and accurate extraction of boundaries.

Benefits of technology

It improves the accuracy and robustness of water body extraction in remote sensing images, enhances the ability to handle complex backgrounds and boundaries, and ensures accurate identification and clear segmentation of water body areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121884133A_ABST
    Figure CN121884133A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of remote sensing image processing, and discloses a remote sensing image water body extraction method and system, and the method comprises the steps: extracting multi-scale features of a remote sensing image through down-sampling, extracting a water body position mask and edge information based on the multi-scale features, taking the water body position mask as guide information, and achieving the separation of water body and background features. The method comprises the following steps: firstly, separating features of a remote sensing image, then performing feature modulation on the separated features, performing boundary guidance on the modulated features by using edge information, finally performing adaptive fusion on the features after boundary guidance and multi-scale features, and extracting to obtain a water body position mask representing a water body in the remote sensing image; the system is used for implementing the method. According to the method, the water body and the background are separated through feature modulation, complex background interference is inhibited, boundary supervision is introduced in combination with boundary guidance, boundary detail expression is enhanced, precise extraction of the complex water body boundary and the small water body in the remote sensing image is achieved, the definition of the water body boundary is guaranteed, and the accuracy and robustness of a water body extraction result are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image processing technology, specifically relating to a method and system for extracting water bodies from remote sensing images. Background Technology

[0002] Water body extraction is one of the core tasks in remote sensing image analysis, and it is of great significance in water resource monitoring, ecological environment protection, and environmental change assessment.

[0003] Early methods for water extraction from remote sensing images relied primarily on manually designed features and prior knowledge. However, these methods were often optimized for specific scenarios, lacked versatility, and increased manual labor costs. In recent years, the rapid development of deep learning technology has brought revolutionary changes to the field of remote sensing image processing. Thanks to the superior feature extraction capabilities of neural networks, deep learning-based water extraction methods have made breakthrough progress, significantly outperforming traditional methods and becoming the mainstream research direction in this field.

[0004] Despite significant progress in water extraction using deep learning methods, several challenges remain in practical applications. The significant differences in water body shape within remote sensing images, coupled with susceptibility to complex background interference, lead to oversegmentation and undersegmentation in the models. Furthermore, the presence of objects with similar features to the water body in the remote sensing image blurs the extracted water body boundaries, thus impacting the performance of the water extraction task.

[0005] Chen et al. disclosed a hybrid convolutional neural network-transformer architecture for accurate lake extraction from remote sensing imagery (Chen B, Zou X, Zhang Y, et al. LEFormer: A hybrid CNN-transformer architecture for accurate lake extraction from remote sensingimagery[C] / / ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2024: 5710-5714.). This architecture improves the prediction accuracy of the mask by integrating the local features extracted by the convolutional neural network and the global features extracted by the transformer. However, because this architecture models water features and non-water features together when processing the extracted features, the complex background features interfere with the foreground water features, resulting in over-segmentation. Summary of the Invention

[0006] To overcome the shortcomings of the prior art, the present invention aims to provide a method and system for water body extraction from remote sensing images. This method utilizes extracted multi-scale features to locate water bodies and separates the foreground and background using a water body location mask. Feature modulation yields more discriminative features, solving the problems of significant differences in water body shape and interference from complex backgrounds in remote sensing images. Boundary guidance is employed, utilizing extracted edge information to further focus on the edge details of the water body, improving the accuracy of water body boundaries. The present invention primarily addresses the performance bottleneck of water body extraction from remote sensing images, exhibiting high accuracy in water body extraction from remote sensing images.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for extracting water bodies from remote sensing images includes the following steps: Step 1: Process the remote sensing images using a visual attention network. Sub-sampling is used to extract multi-scale features from remote sensing images; Step 2, place the 2nd to Water body localization is performed using multi-scale features extracted from the subsampling, resulting in a water body location mask. At the same time, the second to Edge information is obtained by extracting multi-scale features from sub-sampling. ; Step 3, perform multi-scale feature processing Sub-upsampling and adaptive fusion; During the first upsampling, the water body location was masked. As guiding information, the first The multi-scale features extracted by the subsampling are separated into foreground features including water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. The boundary-guided features are then upsampled and compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and adaptive fusion with the multi-scale features extracted in the first downsampling to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. .

[0008] In step 1, the specific steps for multi-scale feature extraction of the remote sensing image are as follows: 3-channel remote sensing images The input is fed into a visual attention network, and then a 1×1 convolution is used to adjust the number of channels for the multi-scale features. The output multi-scale features are... The formula for extracting multi-scale features is as follows: in, Represents a set of remote sensing images. Indicates the image height. Indicates the image width. Represents a visual attention network. express Convolution, multi-scale features The corresponding resolutions are respectively , .

[0009] In step 2, the specific steps for locating the water body are as follows: Multiscale features Downsampling to At the same resolution, the data is then concatenated along the channel dimension, followed by a convolution operation to obtain a coarse position mask. The water body positioning process is represented as follows: in, This indicates a downsampling operation. This indicates splicing along the channel dimension. Indicates a Convolution, a convolutional block consisting of a batch normalization and a ReLU activation layer. express convolution.

[0010] In step 2, the specific steps of edge extraction are as follows: Multiscale features Upsampled to At the same resolution, the data is then stitched together along the channel dimension to fully integrate information from different levels. Finally, edge information is obtained through convolution operations and the sigmoid function. The edge extraction process is represented as: in, The sigmoid function is a non-linear mapping. This indicates an upsampling operation.

[0011] In step 3, the feature modulation process is represented as follows: The feature modulation process of foreground features is represented as follows: in, Indicates foreground features, Representation layer normalization, Indicates focus modulation. Indicates a fully connected layer. The output feature represents the foreground feature after feature modulation. The feature modulation process of background features is represented as follows: in, Indicates background features, The output features represent the background features after feature modulation. The focus modulation first uses different linear mapping functions to obtain mapping features. Gating weights and query features Mapping features Multi-level contextual features can be obtained by separating convolutions using different kernel sizes and depths, and then based on gated weights. The context features at each level are weighted and summed to obtain the aggregated features. The aggregated features are processed by 1x1 convolution. Integrate channel information and combine it with query features. The output characteristics of the focus modulation are obtained after weighted summation, as shown in the following formula: in, Representation layer normalization Output characteristics This represents a mapping operation with learnable parameters. This represents depthwise separable convolution. This represents the GeLU activation function. Indicates the first Layer context features, This represents the dot product. Indicates the first Each gating weight, This indicates the number of context feature layers extracted. express convolution, This indicates the output result of focus modulation; The output features of foreground features modulated by feature modulation and the output features of background features modulated by feature modulation are fused to obtain the feature-modulated output features. The specific formula is as follows: in, This indicates splicing along the channel dimension. express convolution, This indicates the output characteristics of the feature modulation.

[0012] In step 3, the specific steps of boundary guidance are as follows: The output feature of feature modulation and extracted edge information Perform element-wise multiplication, then combine with the output feature of feature modulation. The features are added together and passed through a convolutional block. Then, the features output by the convolutional block are sequentially passed through global average pooling with a kernel size of [missing value]. One-dimensional convolution and the sigmoid function are used to obtain the channel weights. The obtained weights are then multiplied element-wise with the features output by the convolutional block to obtain the features guided by the boundaries. The boundary guidance process is represented as: in, This indicates the output characteristics of the characteristic modulation. This represents the dot product. Indicates a convolution, Indicates global average pooling. Indicates the kernel size as One-dimensional convolution, This indicates the features after boundary guidance.

[0013] In step 3, the adaptive fusion adaptively adjusts the weights based on the two fused features, as specifically shown below: in, Indicates the features after boundary guidance. Indicates upsampling, Representing multi-scale features, Indicates weight, This indicates the fusion feature.

[0014] Step 4: Optimize the water body extraction results from the remote sensing image using a loss function; The loss function includes water body segmentation loss and edge prediction loss.

[0015] In step 4, the water body segmentation loss consists of cross-entropy loss and Dice loss, which guides the remote sensing image water body extraction method to extract a more accurate water body location mask. The water body location mask is then aligned with the segmentation label, as shown in the following formula: in, Represents pixels, This indicates the pixel The probability value that it belongs to a body of water. This represents the segmentation labels obtained from a public dataset. This represents the total number of pixels in the predicted image. This represents the logarithmic operation. This indicates that the smoothing term is a positive number. Represents cross-entropy loss, This indicates Dice's loss. Indicates water body separation loss; The edge prediction loss is used to guide the remote sensing image water body extraction method to extract edge information. The Dice loss is used to address the extreme imbalance between positive and negative samples in the edge supervision signal. The specific formula is as follows: in, This represents the edge labels obtained from a public dataset. This represents the edge prediction loss; The learnable parameters in the model are optimized by combining water body segmentation loss and edge prediction loss. The loss function formula is as follows: in, Indicates the weight.

[0016] A water body extraction system from remote sensing images, comprising: The encoder processes remote sensing images through a visual attention network. Sub-sampling is used to extract multi-scale features from remote sensing images; Water locator and edge extractor, to the 2nd to Water body localization is performed using multi-scale features extracted from the subsampling, resulting in a water body location mask. At the same time, the second to Edge information is obtained by extracting multi-scale features from sub-sampling. ; Decoder performs multi-scale features Sub-upsampling and adaptive fusion; During the first upsampling, the water body location was masked. As guiding information, the first The multi-scale features extracted by the subsampling are separated into foreground features including water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. The boundary-guided features are then upsampled and compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. ; The optimization module optimizes the results of water body extraction from remote sensing images using a loss function; The loss function includes water body segmentation loss and edge prediction loss.

[0017] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. In step 3 of this invention, by modulating the foreground and background features, the multi-scale features extracted by downsampling are separated into foreground features containing water and background features not containing water based on the water body location mask. The foreground and background features are then modulated and fused, thereby suppressing interference from complex backgrounds, thus improving the distinguishability between water and non-water regions and the robustness against interference from complex backgrounds. 2. Step 3 of this invention employs boundary guidance, introducing boundary supervision signals during the training process to mine boundary information as guidance information, which is then fused with the output features after feature modulation. This enhances the details of water body boundaries, thereby improving the attention to complex water body boundaries and segmentation accuracy.

[0018] 3. The present invention first locates water bodies by multi-scale features in step 2 to obtain water body location masks, and then combines the water body segmentation loss function in step 4 to align the water body location masks and segmentation labels layer by layer, thereby optimizing the results of water body extraction in remote sensing images and further improving the accuracy of water body region extraction in complex scenes.

[0019] 4. In step 4 of this invention, the difference between the probability map of the water body and the segmentation label is calculated using water body segmentation loss, thereby providing global semantic supervision and ensuring that the water body region can be accurately identified; the difference between edge information and edge label is calculated using edge prediction loss, which strengthens the extraction of boundary information between water bodies and non-water bodies; the combination of water body segmentation loss and edge prediction loss improves the boundary accuracy of water body extraction and the overall consistency of the water body region.

[0020] In summary, the water body extraction method for remote sensing images proposed in this invention utilizes foreground and background feature modulation to effectively separate water bodies from the background and suppress interference from complex backgrounds; it also incorporates boundary guidance to introduce boundary supervision, enhancing the expression of boundary details. Thus, it achieves accurate extraction of complex water body boundaries and small water bodies in remote sensing images, ensuring the clarity of water body boundaries and significantly improving the accuracy and robustness of the water body extraction results. Attached Figure Description

[0021] Figure 1 This is a flowchart of the water extraction steps of the present invention.

[0022] Figure 2 This is a flowchart of the feature modulation steps of the present invention.

[0023] Figure 3 This is a flowchart of the boundary guidance steps of the present invention. Figure 4 The images show the water extraction results of different methods on the GID dataset.

[0024] Figure 5 The images show the water extraction results of different methods on the LoveDA dataset. Detailed Implementation

[0025] The present invention will now be described in detail with reference to the accompanying drawings.

[0026] This invention proposes a method for extracting water bodies from remote sensing images. For example... Figure 1 As shown, a strategy of first locating and then refining is adopted. By combining water body localization, edge extraction, feature modulation, boundary guidance, and adaptive fusion, the performance of water body extraction in remote sensing images is optimized. This invention is achieved through the following steps: Step 1: The remote sensing image is downsampled four times using a visual attention network to extract multi-scale features of the remote sensing image; Step 2: Use the multi-scale features extracted from the 2nd to 4th downsampling to locate the water body and obtain the water body location mask. Simultaneously, edge extraction is performed on the multi-scale features extracted from the 2nd to 4th downsampling to obtain edge information. ; Step 3: Perform upsampling and adaptive fusion on the multi-scale features three times; During the first upsampling, the water body location was masked. As guiding information, the multi-scale features extracted in the fourth downsampling are separated into foreground features containing water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. Next, the boundary-guided features are upsampled and adaptively fused with the multi-scale features extracted in the third downsampling iteration to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; During the second upsampling, the fused features will be... As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and adaptive fusion with the multi-scale features extracted in the second downsampling to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; During the third upsampling, the fused features will be... As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and adaptive fusion with the multi-scale features extracted in the first downsampling to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. ; Step 4: Optimize the water body extraction results from the remote sensing image using a loss function; The loss function includes water body segmentation loss and edge prediction loss.

[0027] In step 1, the specific steps for multi-scale feature extraction of the remote sensing image are as follows: 3-channel remote sensing images The input is fed into a visual attention network, and then a 1×1 convolution is used to adjust the number of channels for the multi-scale features. The output multi-scale features are... The formula for extracting multi-scale features is as follows: in, Represents a set of remote sensing images. Indicates the image height. Indicates the image width. Represents a visual attention network. express Convolution, multi-scale features The corresponding resolutions are respectively , , , The number of channels is 128.

[0028] Step 2: To obtain the water body location mask and edge information, select multi-scale features with rich content information and reasonable spatial resolution. Water body localization and edge extraction are performed. The water body localization requires strong semantic information. The specific steps are as follows: Multiscale features Downsampling to At the same resolution, the data is then concatenated along the channel dimension, followed by a convolution operation to obtain a coarse position mask. The water body positioning process is represented as follows: in, This indicates a downsampling operation. Indicates an upsampling operation. This indicates splicing along the channel dimension. Indicates a Convolution, a convolutional block consisting of a batch normalization and a ReLU activation layer. express convolution.

[0029] The edge extraction requires richer spatial information, and the specific steps are as follows: Multiscale features and Upsampled to At the same resolution, the data is then stitched together along the channel dimension to fully integrate information from different levels. Finally, edge information is obtained through convolution operations and the sigmoid function. The edge extraction process is represented as: in, The sigmoid function is a non-linear mapping.

[0030] like Figure 2 As shown, step 3, in order to suppress the interference of noisy background noise on the accurate segmentation of the water body and obtain more discriminative features, achieves the separation of water body and background features through feature modulation, thereby enhancing the discriminative ability of the features. The feature modulation process is expressed as follows: The feature modulation process of foreground features is represented as follows: in, Indicates foreground features, Representation layer normalization, Indicates focus modulation. Indicates a fully connected layer. The output feature represents the foreground feature after feature modulation. The feature modulation process of background features is represented as follows: in, Indicates background features, The output features represent the background features after feature modulation. The focus modulation first uses different linear mapping functions to obtain mapping features. Gating weights and query features Mapping features Multi-level contextual features can be obtained by separating convolutions using different kernel sizes and depths, and then based on gated weights. The context features at each level are weighted and summed to obtain the aggregated features. The aggregated features are processed by 1x1 convolution. Integrate channel information and combine it with query features. The output characteristics of the focus modulation are obtained after weighted summation, as shown in the following formula: in, Representation layer normalization Output characteristics This represents a mapping operation with learnable parameters. This represents depthwise separable convolution. This represents the GeLU activation function. Indicates the first Layer context features, This represents the dot product. Indicates the first Each gating weight, This indicates the number of context feature layers extracted. express convolution, This indicates the output result of focus modulation; To obtain comprehensive feature information, the output features of foreground features modulated by feature modulation and the output features of background features modulated by feature modulation are fused to obtain the feature-modulated output features. The specific formula is as follows: in, This indicates splicing along the channel dimension. express convolution, This indicates the output characteristics of the feature modulation.

[0031] like Figure 3 As shown, the specific steps of boundary guidance in step 3 are as follows: The output feature of feature modulation and extracted edge information Perform element-wise multiplication, then combine with the output feature of feature modulation. The features are added together and passed through a convolutional block. Then, the features output by the convolutional block are sequentially passed through global average pooling with a kernel size of [missing value]. One-dimensional convolution and the sigmoid function are used to obtain the channel weights. The obtained weights are then multiplied element-wise with the features output by the convolutional block to obtain the features guided by the boundaries. The boundary guidance process is represented as: in, This indicates the output characteristics of the characteristic modulation. This represents the dot product. Indicates a convolution, Indicates global average pooling. This represents a one-dimensional convolution with a kernel size of 5. This indicates the features after boundary guidance.

[0032] Step 3: To better integrate the features from the encoding and decoding layers, adaptive fusion is employed. The weights are adaptively adjusted based on the two integrated features, as detailed below: in, Indicates the features after boundary guidance. Indicates upsampling, Representing multi-scale features, Indicates weight, This indicates the fusion feature.

[0033] Step 4: To guide the learning process, the proposed loss function consists of water body segmentation loss and edge prediction loss. The water body segmentation loss is composed of cross-entropy loss and Dice loss, used to guide the method to extract more accurate water body location masks and segmentation results. The water body location mask is aligned with the segmentation label, as shown in the following formula: in, Represents pixels, This indicates the pixel The probability value that it belongs to a body of water. This represents the segmentation labels obtained from a public dataset. This represents the total number of pixels in the predicted image. This represents the logarithmic operation. This indicates that the smoothing term is positive to prevent the denominator from being zero. Represents cross-entropy loss, This indicates Dice's loss. Indicates water body separation loss; The edge prediction loss is used to guide the remote sensing image water body extraction method to learn fine segmentation of water body edges and extract edge information. The Dice loss is used to address the extreme imbalance between positive and negative samples in the edge supervision signal. The specific formula is as follows: in, This represents the edge labels obtained from a public dataset. This represents the edge prediction loss; The learnable parameters in the model are optimized by combining water body segmentation loss and edge prediction loss. The loss function formula is as follows: in, Indicates the weight.

[0034] The present invention also provides a water body extraction system for remote sensing images, comprising: The encoder performs four downsampling operations on the remote sensing image through a visual attention network to extract multi-scale features of the remote sensing image. The water body locator and edge extractor use the multi-scale features extracted from the 2nd to 4th downsampling to locate the water body and obtain the water body location mask. Simultaneously, edge extraction is performed on the multi-scale features extracted from the 2nd to 4th downsampling to obtain edge information. ; The decoder performs three upsampling operations and adaptive fusion on multi-scale features. During the first upsampling, the water body location was masked. As guiding information, the multi-scale features extracted in the fourth downsampling are separated into foreground features containing water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. Next, the boundary-guided features are upsampled and adaptively fused with the multi-scale features extracted in the third downsampling iteration to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; During the second upsampling, the fused features will be... As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; During the third upsampling, the fused features will be... As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and adaptive fusion with the multi-scale features extracted in the first downsampling to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. ; The optimization module optimizes the results of water body extraction from remote sensing images using a loss function; The loss function includes water body segmentation loss and edge prediction loss.

[0035] Experimental Analysis To verify the effectiveness of the method described in this invention for water body extraction in remote sensing images, two datasets were used for experiments. The relevant information for these datasets is as follows: (1) Gaofen Image Dataset (GID): This dataset has the advantages of wide coverage, wide distribution, and high spatial resolution, making it suitable for large-scale remote sensing image analysis tasks. It contains 150 complete land cover images with pixel-level annotations, including five categories, with each image having a resolution of 6800×7200.

[0036] (2) Land-Cover Domain Adaptive (LoveDA): This dataset contains 5987 high-resolution images, including 2713 images of urban scenes and 3274 images of rural scenes. It contains seven categories, and each image has a resolution of 1024×1024.

[0037] The original remote sensing images and corresponding labels for each dataset were cropped to 512x512 pixels, and images consisting entirely of water or background were removed. The remaining data were then divided into training, validation, and test sets in a 7:2:1 ratio. This experiment used a visual attention network pre-trained on the ImageNet-1K dataset as the backbone network for feature extraction. The entire network was trained using the AdamW optimizer, with initial learning rate and weight decay parameters set to [values ​​to be inserted here]. The learning rate was set to 0.01, and cosine annealing was used to adjust the learning rate. The batch size and loss adjustment coefficient were set to 8 and 0.5, respectively. All code was written in Python 3.10 and implemented using the PyTorch framework. Experiments were conducted on an AMD EPYC 7742 64-Core CPU and an NVIDIA GeForce RTX 4090 GPU.

[0038] To verify the effectiveness of this invention in water body extraction from remote sensing images, comparative experiments were conducted with nine existing methods. These included classic segmentation networks UNet, DeepLabv3+, natural image segmentation networks TransUNet and Swin-Unet, water body segmentation networks MECNet and LEFormer, and remote sensing image segmentation networks UNetFormer, CMTFNet, and CGGLNet. The performance of these methods was evaluated using the following metrics: Overall accuracy (OA), Intersection over Union (IoU), Precision (P), Recall (R), and F1 score (F1). Their definitions are as follows: (1) OA (Overall accuracy): The proportion of pixels that are correctly classified out of all pixels.

[0039] (2) IoU (Intersection over Union): The ratio of the intersection and union of the predicted water body region and the actual water body region in the label.

[0040] (3) P (Precision): The proportion of the predicted results that are correctly classified as water bodies.

[0041] (4) R (Recall): The proportion of pixels in the real label that are predicted to be water.

[0042] (5) F1 (F1 score): represents the harmonic mean of precision and recall.

[0043] These indicators are important standards for evaluating the effectiveness of water extraction; the higher the value, the better the effect.

[0044] Table 1 Different segmentation methods on different datasets Experiments were conducted on the GID and LoveDA datasets, and the specific results are shown in Table 1. The following conclusions were drawn: On the GID dataset, our method achieved the best results across all metrics, reaching 92.68%, 98.15%, 96.62%, 95.79%, and 96.20% in IoU, OA, P, R, and F1, respectively. Compared to the water extraction networks MECNet and LEFormer, it improved IoU by 4.75% and 4.62%, respectively. Figure 4The visualization segmentation results show that when the water bodies are unevenly distributed, have different regular shapes, and are of different sizes, the method proposed in this invention can always accurately capture these water bodies, and it also performs well in the presence of noisy backgrounds and interference from similar ground features.

[0045] On the LoveDA dataset, our proposed method (Ours) achieved state-of-the-art performance across all five evaluation metrics. Compared to the suboptimal method CGGLNet, it improved IoU by 2.87%, OA by 0.79%, P by 2.39%, R by 1.14%, and F1 by 1.76%. Figure 5 The visualization results show that the method proposed in this invention has more complete segmentation results and can accurately identify the water body edge compared with other methods.

Claims

1. A method for extracting water bodies from remote sensing images, characterized in that, Includes the following steps: Step 1: Process the remote sensing images using a visual attention network. Sub-sampling is used to extract multi-scale features from remote sensing images; Step 2, place the 2nd to Water body localization is performed using multi-scale features extracted from the subsampling, resulting in a water body location mask. At the same time, the second to Edge information is obtained by extracting multi-scale features from sub-sampling. ; Step 3, perform multi-scale feature processing Sub-upsampling and adaptive fusion; During the first upsampling, the water body location was masked. As guiding information, the first The multi-scale features extracted by the subsampling are separated into foreground features including water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. The boundary-guided features are then upsampled and compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and adaptive fusion with the multi-scale features extracted in the first downsampling to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. .

2. The method according to claim 1, characterized in that, In step 1, the specific steps for multi-scale feature extraction of the remote sensing image are as follows: 3-channel remote sensing images The input is fed into a visual attention network, and then a 1×1 convolution is used to adjust the number of channels for the multi-scale features. The output multi-scale features are... The formula for extracting multi-scale features is as follows: in, Represents a set of remote sensing images. Indicates the image height. Indicates the image width. Represents a visual attention network. express Convolution, multi-scale features The corresponding resolutions are respectively , .

3. The method according to claim 1, characterized in that, In step 2, the specific steps for locating the water body are as follows: Multiscale features Downsampling to At the same resolution, the data is then concatenated along the channel dimension, followed by a convolution operation to obtain a coarse position mask. The water body positioning process is represented as follows: in, This indicates a downsampling operation. This indicates splicing along the channel dimension. Indicates that it is composed of one Convolution, a convolutional block consisting of a batch normalization and a ReLU activation layer. express convolution.

4. The method according to claim 1, characterized in that, In step 2, the specific steps of edge extraction are as follows: Multiscale features Upsampled to At the same resolution, the data is then stitched together along the channel dimension to fully integrate information from different levels. Finally, edge information is obtained through convolution operations and the sigmoid function. The edge extraction process is represented as: in, The sigmoid function is a non-linear mapping. This indicates an upsampling operation.

5. The method according to claim 1, characterized in that, In step 3, the feature modulation process is represented as follows: The feature modulation process of foreground features is represented as follows: in, Indicates foreground features, Representation layer normalization, Indicates focus modulation. Indicates a fully connected layer. The output feature represents the foreground feature after feature modulation. The feature modulation process of background features is represented as follows: in, Indicates background features, The output features represent the background features after feature modulation. The focus modulation first uses different linear mapping functions to obtain mapping features. Gating weights and query features Mapping features By using different kernel sizes and depths, multi-level contextual features can be obtained after convolution, and then based on gated weights... The context features at each level are weighted and summed to obtain the aggregated features. The aggregated features are processed by 1x1 convolution. Integrate channel information and combine it with query features. The output characteristics of the focus modulation are obtained after weighted summation, as shown in the following formula: in, Representation layer normalization Output characteristics This represents a mapping operation with learnable parameters. This represents depthwise separable convolution. This represents the GeLU activation function. Indicates the first Layer context features, This represents the dot product. Indicates the first Each gating weight, This indicates the number of context feature layers extracted. express convolution, This indicates the output result of focus modulation; The output features of foreground features modulated by feature modulation and the output features of background features modulated by feature modulation are fused to obtain the feature-modulated output features. The specific formula is as follows: in, This indicates splicing along the channel dimension. express convolution, This indicates the output characteristics of the feature modulation.

6. The method according to claim 1, characterized in that, In step 3, the specific steps of boundary guidance are as follows: The output feature of feature modulation and extracted edge information Perform element-wise multiplication, then combine with the output feature of feature modulation. The features are added together and passed through a convolutional block. Then, the features output by the convolutional block are sequentially passed through global average pooling with a kernel size of [missing value]. One-dimensional convolution and the sigmoid function are used to obtain the channel weights. The obtained weights are then multiplied element-wise with the features output by the convolutional block to obtain the features guided by the boundaries. The boundary guidance process is represented as: in, This indicates the output characteristics of the characteristic modulation. This represents the dot product. Indicates that it is composed of one convolution, Indicates global average pooling. Indicates the kernel size as One-dimensional convolution, This indicates the features after boundary guidance.

7. The method according to claim 1, characterized in that, In step 3, the adaptive fusion adaptively adjusts the weights based on the two fused features, as specifically shown below: in, Indicates the features after boundary guidance. Indicates upsampling, Representing multi-scale features, Indicates weight, This indicates the fusion feature.

8. The method according to claim 1, characterized in that, It also includes the following steps: Step 4: Optimize the water body extraction results from the remote sensing image using a loss function; The loss function includes water body segmentation loss and edge prediction loss.

9. The method according to claim 8, characterized in that, In step 4, the water body segmentation loss consists of cross-entropy loss and Dice loss, which are used to guide the remote sensing image water body extraction method to extract a more accurate water body location mask. The water body location mask is then aligned with the segmentation label, as shown in the following formula: in, Represents pixels, This indicates the pixel The probability value that it belongs to a body of water. This represents the segmentation labels obtained from a public dataset. This represents the total number of pixels in the predicted image. This represents the logarithmic operation. This indicates that the smoothing term is a positive number. Represents cross-entropy loss, This indicates Dice's loss. Indicates water body separation loss; The edge prediction loss is used to guide the remote sensing image water body extraction method to extract edge information. The Dice loss is used to address the extreme imbalance between positive and negative samples in the edge supervision signal. The specific formula is as follows: in, This represents the edge labels obtained from a public dataset. This represents the edge prediction loss; The learnable parameters in the model are optimized by combining water body segmentation loss and edge prediction loss. The loss function formula is as follows: in, Indicates the weight.

10. A remote sensing image water body extraction system based on the method of any one of claims 1-9, characterized in that, include: The encoder processes remote sensing images through a visual attention network. Sub-sampling is used to extract multi-scale features from remote sensing images; Water locator and edge extractor, to the 2nd to Water body localization is performed using multi-scale features extracted from the subsampling, resulting in a water body location mask. At the same time, the second to Edge information is obtained by extracting multi-scale features from sub-sampling. ; Decoder performs multi-scale features Sub-upsampling and adaptive fusion; During the first upsampling, the water body location was masked. As guiding information, the first The multi-scale features extracted by the subsampling are separated into foreground features including water bodies and background features not containing water bodies, thus achieving the separation of water body and background features. Then, feature modulation is performed on the foreground and background features, and finally, edge information is used as the basis for the separation. The modulated features are then subjected to boundary guidance to focus on details at the water body edges. The boundary-guided features are then upsampled and compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask. ; No. During the next upsampling, the fused features will be As input, feature modulation is performed, and then based on edge information... The modulated features are then subjected to boundary guidance, followed by upsampling of the boundary-guided features, and then compared with the first... The multi-scale features extracted by the next downsampling are adaptively fused to obtain the fused features. , will integrate features The input is fed into the Sigmoid function to obtain a probability map of pixels belonging to water bodies. Finally, the probability map is binarized to obtain the water body location mask representing the water body in the remote sensing image. ; The optimization module optimizes the results of water body extraction from remote sensing images using a loss function; The loss function includes water body segmentation loss and edge prediction loss.