A method for extracting water bodies from remote sensing images by using a dual-attention and strip-pooling improved U-Net and related devices

By improving the U-Net model with dual attention and strip pooling, the problems of spectral confusion and fragmentation of slender water bodies in water body extraction from remote sensing images are solved. This achieves adaptive enhancement of water body features and preservation of connectivity of slender water bodies, thereby improving the accuracy and robustness of water body extraction from remote sensing images.

CN121147736BActive Publication Date: 2026-07-24CHANGJIANG RIVER SCI RES INST CHANGJIANG WATER RESOURCES COMMISSION
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHANGJIANG RIVER SCI RES INST CHANGJIANG WATER RESOURCES COMMISSION
Filing Date
2025-08-14
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing water body extraction techniques for remote sensing images suffer from problems such as spectral confusion, fragmentation of slender water bodies, interference from complex backgrounds, and difficulty in balancing accuracy and efficiency. In particular, traditional methods have a high misidentification rate for water bodies, shadows, and dark vegetation, while the U-Net model has insufficient connectivity when processing slender water bodies.

Method used

The U-Net model is improved by employing dual attention and strip pooling. The dual attention mechanism enhances water feature recognition, and the strip pooling module maintains the connectivity of slender water bodies. The accuracy is improved while controlling computational complexity. This includes data augmentation, and the integration of the dual attention mechanism and the strip pooling module.

Benefits of technology

It effectively overcomes the problem of misidentification of water bodies with shadows and dark vegetation, maintains the morphological continuity of slender water bodies, improves the model's ability to distinguish spectrally confused regions, and achieves high-precision water body extraction in complex scenes, meeting real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147736B_ABST
    Figure CN121147736B_ABST
Patent Text Reader

Abstract

The application provides a remote sensing image water body extraction method and related device of a double-attention and strip-pooling improved U-Net, and the method comprises the following steps: using OpenWUSU512 remote sensing image as training data, generating a training sample set through data enhancement preprocessing; constructing an improved U-Net model integrated with a double-attention mechanism and strip-pooling, configuring training environment parameters to complete model training; inputting the preprocessed data set into the trained model for inference to obtain a water body extraction result map. The application effectively solves the misidentification problem of water bodies, shadows and dark vegetation by adaptively enhancing water body discrimination features; an efficient modeling method is proposed for slender water body targets to maintain morphological continuity and avoid fragmentation; meanwhile, the calculation complexity is optimized, the real-time requirement is met while ensuring high precision, and a precise and efficient technical solution is provided for remote sensing image water body extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and remote sensing image processing technology, specifically a method and related apparatus for water body extraction from remote sensing images using dual attention and strip pooling to improve U-Net. Background Technology

[0002] Water body extraction from remote sensing imagery is a key task in geographic information science. With the rapid development of satellite and UAV remote sensing technologies, high-resolution imagery provides a reliable data foundation for global water body dynamic monitoring. Accurate water body extraction has significant practical applications in drought and flood early warning, ecological environment assessment, and urban planning. However, due to the complexity of remote sensing imagery, water body extraction still faces significant technical challenges. Specific problems include: First, the spectral characteristics of water bodies in the visible and near-infrared bands are easily confused with ground features such as shadows, dark vegetation, and asphalt pavements, leading to a high false detection rate in traditional thresholding methods for water body extraction; second, the highly irregular shape of natural water bodies, especially slender targets such as rivers and ditches, easily results in fragmentation or blurred boundaries during extraction; furthermore, interference from complex backgrounds such as urban building clusters and mountainous terrain also reduces the reliability of water body segmentation results.

[0003] Current technologies primarily rely on traditional image processing algorithms and deep learning models for water body extraction. Traditional methods, such as exponential thresholding (e.g., NDWI, MNDWI), while computationally simple, are difficult to adapt to the characteristics of images in different regions and at different times due to their dependence on manual parameter adjustments. Furthermore, edge detection and region growing methods are sensitive to noise, resulting in poor segmentation performance when dealing with fragmented water bodies. In recent years, deep learning models with encoder-decoder structures, such as U-Net, have made significant progress in water body extraction tasks. U-Net's skip connection mechanism can effectively fuse shallow detail information with deep semantic features, thereby improving segmentation accuracy. However, standard U-Net still has certain shortcomings in remote sensing water body extraction: on the one hand, the model lacks the ability to target and filter key features, failing to effectively suppress interference from spectrally similar backgrounds; on the other hand, U-Net's square pooling operation weakens long-range spatial context information, leading to insufficient connectivity processing for slender water body targets.

[0004] To address these issues, several improvements have been proposed. For example, some studies have introduced channel attention (such as the SE module) to enhance the weight allocation of feature channels, or employed dilated convolutions to expand the receptive field. However, these approaches still have limitations: a single attention mechanism struggles to simultaneously optimize the synergistic relationship between feature channels and spatial location; while dilated convolutions can capture a wider range of contextual information, they are computationally expensive and have limited ability to model directional structures. In particular, for targets with significant directional characteristics, such as rivers and coastlines, existing methods still struggle to maintain the continuity of their morphology and the integrity of their boundaries. Summary of the Invention

[0005] To address the problems of spectral confusion, fragmentation of elongated water bodies, interference from complex backgrounds, and the difficulty in balancing accuracy and efficiency in existing remote sensing image water body extraction techniques, this invention proposes a solution based on dual attention and strip pooling to improve U-Net. This solution focuses on enhancing water body features, suppressing spectral similarity interference, maintaining the connectivity of elongated water bodies, and controlling computational complexity while improving accuracy to meet practical engineering needs. This invention effectively overcomes the problem of misidentification of water bodies with shadows, dark vegetation, and other ground features through adaptive enhancement of water body discrimination features. For elongated water body targets, an efficient modeling method is proposed to maintain their morphological continuity and avoid fragmentation during extraction. Simultaneously, the solution optimizes computational complexity, enabling it to meet real-time requirements while ensuring high accuracy.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A remote sensing image water body extraction method improved by dual attention and strip pooling U-Net includes the following steps:

[0008] Step S1, Basic Data Collection and Preprocessing: Collect and use remote sensing images from the OpenWUSU512 dataset as training data, apply data augmentation methods to the training data for preprocessing, and generate a training sample set;

[0009] Step S2, Model Construction: Construct an improved U-Net model that integrates dual attention mechanism and strip pooling;

[0010] Step S3, Model Training: For the improved U-Net model constructed in step S2, configure the training environment parameters to train the improved U-Net model;

[0011] Step S4: Water body extraction: Input the preprocessed dataset from step S1 into the improved U-Net model trained in step S3 for inference to obtain the water body extraction result map of the remote sensing image.

[0012] Furthermore, in step S1, data augmentation methods are applied to the training data for preprocessing to generate a training sample set, including:

[0013] S1.1 Data Augmentation and Illumination Adaptation: The original image is binarized to distinguish between water bodies and non-water bodies. Different illumination conditions are simulated by randomly adjusting the gamma value and brightness contrast. Contrast limit adaptive histogram equalization is adjusted to enhance local contrast and improve the model's adaptability to illumination changes.

[0014] S1.2, Enhanced Diversity and Robustness: By using ordinary blur, motion blur, and median blur to simulate the blur phenomenon in actual data acquisition, and by using horizontal flipping to handle symmetrical targets, and translation, scaling, and rotation to simulate the multi-position, multi-scale, and multi-pose changes of targets, the diversity of the dataset is increased and overfitting is alleviated.

[0015] S1.3 Data Standardization: All enhanced images are normalized using the mean and standard deviation of the ImageNet dataset to unify the data scale and are divided into training and test sets according to a preset ratio.

[0016] Furthermore, step S2 constructs an improved U-Net model integrating dual attention mechanism and strip pooling, including:

[0017] S2.1 Strip Pooling Module Design: The original Max-pooling operation of U-Net is replaced with a dual-path strip pooling module. By capturing long-distance directional context information through horizontal and vertical strip pooling operations, the connectivity of slender water bodies is enhanced, and the water body fracture and shape loss in complex backgrounds are reduced. Slender water bodies include rivers and ditches.

[0018] S2.2 Dual Attention Mechanism Integration: The original simple connection method of U-Net is replaced with a dual attention mechanism that combines spatial attention and channel attention.

[0019] Spatial attention mechanism: By generating a spatial attention map, key spatial regions in the image are automatically focused, effectively suppressing background noise and ensuring that the model can accurately capture local details of the water body; the SimAM mechanism is introduced to further improve the accuracy and robustness of feature representation.

[0020] Channel attention mechanism: By weighting different channels of the feature map, the model’s attention to key feature channels in water body extraction is strengthened, thereby improving the accuracy of water body recognition.

[0021] Furthermore, the training environment parameters configured in step S3 are as follows:

[0022] Computing platform: Built on NVIDIA RTX A800 GPU and PyTorch 1.11.0 framework, with compatible dependency libraries configured;

[0023] Hyperparameter optimization: Employing grid search, random search, or Bayesian optimization techniques to optimize...

[0024] Adjust the learning rate, batch size, training epochs, optimizer, and loss function to improve model training performance.

[0025] A remote sensing image water extraction device based on dual attention and strip pooling improved U-Net includes:

[0026] The basic data collection and preprocessing module is used to collect and use remote sensing images from the OpenWUSU512 dataset as training data, apply data augmentation methods to the training data for preprocessing, and generate a training sample set.

[0027] The model building module is used to build an improved U-Net model that integrates dual attention mechanism and strip pooling;

[0028] The model training module is used to configure training environment parameters for training the improved U-Net model.

[0029] The water extraction module is used to input the dataset preprocessed by the basic data collection and preprocessing module into the trained improved U-Net model for inference, and obtain the water extraction result map of the remote sensing image.

[0030] Furthermore, the basic data collection and preprocessing module applies data augmentation methods to preprocess the training data to generate a training sample set, including:

[0031] S1.1 Data Augmentation and Illumination Adaptation: The original image is binarized to distinguish between water bodies and non-water bodies, and gamma values ​​and brightness contrast are randomly adjusted to simulate different illumination conditions. Contrast limit adaptive histogram equalization is adjusted to enhance local contrast and improve the model's adaptability to illumination changes.

[0032] S1.2, Enhanced Diversity and Robustness: By using ordinary blur, motion blur, and median blur to simulate the blur phenomenon in actual data acquisition, and by using horizontal flipping to handle symmetrical targets, and translation, scaling, and rotation to simulate the multi-position, multi-scale, and multi-pose changes of targets, the diversity of the dataset is increased and overfitting is alleviated.

[0033] S1.3 Data Standardization: All enhanced images are normalized using the mean and standard deviation of the ImageNet dataset to unify the data scale and are divided into training and test sets according to a preset ratio.

[0034] Furthermore, the model building module constructs an improved U-Net model integrating dual attention mechanism and strip pooling, including:

[0035] S2.1 Strip Pooling Module Design: The original Max-pooling operation of U-Net is replaced with a dual-path strip pooling module. By capturing long-distance directional context information through horizontal and vertical strip pooling operations, the connectivity of slender water bodies is enhanced, and the water body fracture and shape loss in complex backgrounds are reduced. Slender water bodies include rivers and ditches.

[0036] S2.2 Dual Attention Mechanism Integration: The original simple connection method of U-Net is replaced with a dual attention mechanism that combines spatial attention and channel attention.

[0037] Spatial attention mechanism: By generating a spatial attention map, key spatial regions in the image are automatically focused, effectively suppressing background noise and ensuring that the model can accurately capture local details of the water body; the SimAM mechanism is introduced to further improve the accuracy and robustness of feature representation.

[0038] Channel attention mechanism: By weighting different channels of the feature map, the model’s attention to key feature channels in water body extraction is strengthened, thereby improving the accuracy of water body recognition.

[0039] Furthermore, the training environment parameters configured for the model training module are as follows:

[0040] Computing platform: Built on NVIDIA RTX A800 GPU and PyTorch 1.11.0 framework, with compatible dependency libraries configured;

[0041] Hyperparameter optimization: Employing grid search, random search, or Bayesian optimization techniques to optimize...

[0042] Adjust the learning rate, batch size, training epochs, optimizer, and loss function to improve model training performance.

[0043] A remote sensing image water extraction system with dual attention and strip pooling improved U-Net includes: a computer-readable storage medium and a processor;

[0044] The computer-readable storage medium is used to store executable instructions;

[0045] The processor is used to read executable instructions stored in the computer-readable storage medium and execute the remote sensing image water extraction method of the dual attention and strip pooling improved U-Net.

[0046] A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned dual-attention and strip pooling improved U-Net method for water extraction from remote sensing images.

[0047] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0048] 1. Improve the accuracy of spectral confusion discrimination: The dual attention mechanism is constructed by integrating channel weighting and spatial SimAM modules to achieve adaptive enhancement of key spectral features of water bodies, while dynamically suppressing interference regions, effectively improving the model's ability to discriminate spectral confusion regions;

[0049] 2. Ensure the connectivity of slender water bodies: Introduce a strip pooling module to replace the traditional pooling operation, and use the horizontal and vertical dual-path structure to effectively capture long-distance directional contextual information, thereby enhancing the model's ability to express the continuity of slender water body structures;

[0050] 3. Enhanced robustness in complex scenarios: While maintaining the lightweight architecture of U-Net, the modular embedded design enhances the anti-interference ability against multi-cloud, cloud shadow and urban background through multi-scale feature fusion, and the overall extraction accuracy (OA) reaches 92.3% in complex scenarios. Attached Figure Description

[0051] Figure 1 This is a comparison chart of data preprocessing results in an embodiment of the present invention;

[0052] Figure 2 This is a model diagram of Strip Pooling according to an embodiment of the present invention.

[0053] Figure 3 This is a diagram of the dual attention mechanism in an embodiment of the present invention.

[0054] Figure 4 This is a DSP-UNet model diagram of an embodiment of the present invention.

[0055] Figure 5 This is a comparison chart of the accuracy of multiple models in the embodiments of the present invention.

[0056] Figure 6 This is a water space distribution prediction map according to an embodiment of the present invention.

[0057] Figure 7 This is a flowchart of a remote sensing image water body extraction method based on dual attention and strip pooling, according to an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] Please see Figure 7 This invention provides a method for water body extraction from remote sensing images based on dual attention and strip pooling (DSP-UNet), comprising the following steps:

[0060] Step S1: Basic Data Collection and Preprocessing

[0061] Using the OpenWUSU512 dataset (which contains representative remote sensing imagery), an augmented dataset adapted for model training is generated through the following sub-steps, which will then serve as input data for subsequent model training and evaluation:

[0062] S1.1 Data Augmentation and Illumination Adaptation: The original image is binarized (to distinguish between water bodies and non-water bodies), and the model's adaptability to illumination changes is improved by randomly adjusting the gamma value, brightness contrast (to simulate different illumination conditions), and contrast-limited adaptive histogram equalization (to enhance local contrast).

[0063] S1.2 Enhanced Diversity and Robustness: By using ordinary blur, motion blur, median blur (simulating actual blur phenomena in data acquisition), as well as horizontal flip (handling symmetrical targets), translation, scaling, and rotation (simulating multi-position, multi-scale, and multi-pose changes of targets), the diversity of the dataset is increased and overfitting is mitigated.

[0064] S1.3 Data Standardization: All enhanced images are normalized using the mean and standard deviation of the ImageNet dataset to unify the data scale and are divided into training and test sets according to a preset ratio (8:2);

[0065] Comparison of data preprocessing results is shown in the figure below. Figure 1 As shown, a represents the original image, b represents the original label, and c represents the binarized label. For the dataset processing, binarization was used for the multi-class classification task, merging categories with labels of 8 and 9 into 1, and other categories into 0, further simplifying the model's training objective. The preprocessing results are shown below. Figure 1 As shown. Through the above-described multiple data augmentation techniques, the embodiments of the present invention can effectively improve the model's performance in complex and variable scenarios.

[0066] Step S2: Model Building

[0067] Based on the U-Net network structure, the DSP-UNet model is constructed through the following sub-steps, providing a learnable network framework for subsequent training:

[0068] S2.1 Strip Pooling Module Design: The original Max-pooling operation of U-Net is replaced with a dual-path strip pooling module. Through horizontal and vertical strip pooling operations, long-distance directional context information is captured, which focuses on enhancing the connectivity of slender water bodies (such as rivers and ditches) and reducing water body fracture and shape loss in complex backgrounds. Figure 2 This is a diagram of the Strip Pooling model.

[0069] S2.2 Dual Attention Mechanism Integration: The original simple connection method of U-Net is replaced with a dual attention mechanism that combines spatial attention and channel attention (e.g., Figure 3 (as shown)

[0070] Figure 3 The structural principles of spatial attention and channel attention mechanisms are demonstrated. Both mechanisms enhance feature maps from two dimensions, spatial and channel, respectively, to improve the model's ability to perceive key regions and discriminative features.

[0071] Spatial attention mechanism ( Figure 3 As shown in (A), long-distance dependencies between pixels at different locations are captured by constructing self-attention relationships in the spatial dimension. The input feature map first generates feature maps B, C, and D through three parallel branches, where B and C are used to calculate the correlation between spatial locations. A spatial attention map S is obtained through matrix multiplication and softmax operation, representing the response degree of each location to other locations. Subsequently, the features of branch D are weighted using this attention map, and finally residual connections are made with the original features to enhance the representation ability of key spatial regions and effectively suppress background interference.

[0072] Channel attention mechanism ( Figure 3 As shown in (B), this module models the relationships between features from the channel dimension to achieve adaptive selection of semantic information. First, it reshapes the input feature map, calculates the correlation matrix X between different channels and performs softmax normalization to obtain the attention distribution between channels. This attention map is then used to weight the feature channels, highlighting the feature responses most sensitive to the task. Finally, it is fused with the original feature map to enhance the discriminative power at the channel dimension.

[0073] Step S3: Training environment configuration and hyperparameter optimization:

[0074] For the DSP-UNet model constructed in step S2, configure the following training environment parameters to efficiently utilize the training set from step S1 for parameter optimization:

[0075] Computing platform: Built on NVIDIA RTX A800 GPU (80GB) and PyTorch 1.11.0 framework, with compatible dependency libraries configured;

[0076] Hyperparameter optimization: Employ techniques such as grid search, random search, or Bayesian optimization to optimize the learning rate (e.g., 1e-4), batch size (e.g., 16), number of training epochs (e.g., 100 epochs), optimizer (e.g., Adam), and loss function (e.g., a combination of cross-entropy loss and Dice loss) to improve model training performance.

[0077] Step S4: Model accuracy evaluation and performance verification:

[0078] The preprocessed dataset from step S1 is input into the DSP-UNet model trained in step S3 for inference, ultimately obtaining the water body extraction result map from the remote sensing image. Based on this result, a multi-level evaluation system is used to comprehensively evaluate the model performance. The evaluation results are used for model optimization feedback or to guide practical applications.

[0079] S4.1 Quantitative Indicator Evaluation: Cross-Union Ratio (CUIR) Precision, Recall, F1 score, Overall Precision Average crossover ratio The model is evaluated based on key indicators such as water boundary segmentation accuracy, binary classification performance between water and non-water bodies, and robustness in complex scenarios (with a focus on false positive and false negative rates in areas such as shadows and turbid water).

[0080] The formulas for some evaluation indicators are as follows:

[0081] (1);

[0082] (2);

[0083] (3);

[0084] (4);

[0085] (5);

[0086] (6);

[0087] S4.2 Ablation Experiment: A control experiment was designed to systematically remove or replace the dual attention module and strip pooling module in the model. By comparing quantitative indicators, the independent contributions and synergistic effects of each core improved module on the final water extraction accuracy and robustness were verified, clarifying their necessity. Specifically, the base model DSP-UNet1 uses the standard U-Net architecture as the baseline framework. In the DSP-UNet2 model, gated convolutional units were first introduced to enhance the network's feature selection ability, while a dual attention mechanism was embedded to optimize the fusion of spatial and channel-dimensional contextual information. The final DSP-UNet3 model improved the architecture based on DSP-UNet2, using a strip pooling module to replace the traditional pooling layer. By constructing long-range dependencies in the horizontal and vertical dimensions, the receptive field is expanded, capturing global contextual features in the image. This progressive experimental design clearly demonstrates the independent contributions of each innovative module: the gating mechanism improves the discriminativeness of feature representation, the dual attention mechanism enhances the localization accuracy of key features, and the strip pooling operation improves the model's ability to model long-distance spatial relationships.

[0088] S4.3 Comparison of Water Extraction Results from Remote Sensing Images: The water extraction results of this invention (DSP-UNet) are compared with those of mainstream deep learning models (such as the original U-Net, DeepLabV3+, etc.) through visualization and quantitative indicators. The analysis focuses on the performance differences in complex urban water bodies, small rivers, and nearshore waters, visually demonstrating the advantages of this method in extraction accuracy (especially boundary clarity and completeness) and anti-interference capabilities (such as suppressing shadow misjudgments and missing turbid water bodies).

[0089] Figure 4 This is a diagram of the DSP-UNet model. Table 1 shows the ablation experiment results. From a class-level perspective, DSP-UNet3 achieved F1 and IoU scores of 0.961 and 0.925 respectively, representing improvements of 2.2 and 4.0 percentage points compared to the base model DSP-UNet1, validating its significant advantage in segmenting complex water bodies. In contrast, while DSP-UNet2 performed slightly worse, its F1 score improved to 0.949, indicating that the introduction of a dual attention mechanism and the further integration of the lightweight SimAM into the spatial attention module resulted in a significant accuracy improvement.

[0090] In terms of global performance, DSP-UNet3 achieved a MIoU of 0.956 and an OA of 0.989, both significantly outperforming DSP-UNet1 (MIoU of 0.933 and OA of 0.983), indicating improvements in both overall semantic consistency and pixel classification accuracy. Notably, DSP-UNet2 also achieved a MIoU of 0.944 and an OA of 0.986, demonstrating that this intermediate version already possesses strong global performance.

[0091] In terms of balancing precision and recall, DSP-UNet3 achieves a good balance between Precision (0.955) and Recall (0.967), resulting in an optimal F1 score. In comparison, DSP-UNet1 is more recall-oriented (Recall 0.948, Precision 0.930), while DSP-UNet2 exhibits stronger precision (Precision 0.969), but with a slight decrease in recall (0.930). DSP-UNet3 strikes a balance between the two, taking into account both false negatives and false positives.

[0092] Figure 5 It is a comparison of the accuracy of multiple models. Figure 6 This is a predicted map of the spatial distribution of water bodies. Comparative results show that traditional models such as U-Net and SegNet perform reasonably well in the main water body areas, but are prone to edge breakage and shape distortion when dealing with areas with drastic shoreline undulations or narrow channels. Models with complex structures such as DeepLabv3+ and HR-Net show improvements in spatial detail preservation, but still exhibit some false detections, especially in areas with shadows or building reflections, where non-water bodies are easily misidentified as water bodies. PSP-Net and PID-Net, with their strong contextual modeling capabilities, can somewhat restore the connectivity of long, narrow water bodies, but are slightly weaker than DSP-UNet in terms of recognition accuracy and boundary clarity.

[0093] This invention compares the performance of eight mainstream segmentation models in water body identification tasks with its own model. Experimental results show that the DSP-UNet model achieves significant advantages in all metrics, with an MIoU of 0.9617, which is 2.35 percentage points higher than the second-best model, PSP-Net. Specifically, in terms of category-level metrics, DSP-UNet's F1 score of 0.9659 and IoU of 0.9341 surpass the benchmark model U-Net by 2.68% and 4.89%, respectively, indicating that DSP-UNet has a clear advantage in segmenting complex water body boundaries.

[0094] Table 1 shows that the model performance continuously improves with the gradual introduction of modules, indicating that each component has a significant gain effect in the water body extraction task. From a category-level perspective, DSP-UNet3 achieved F1 and IoU scores of 0.961 and 0.925 respectively, representing improvements of 2.2% and 4.0% compared to the base model DSP-UNet1, validating its significant advantages in complex water body segmentation. Although the performance of DSP-UNet2 is slightly less than ideal, its F1 score has improved to 0.949, indicating a significant improvement in model performance after the introduction of the initial modules.

[0095] Table 1 Comparison of ablation experiments

[0096] In terms of global performance, DSP-UNet3 achieved a MIoU of 0.956 and an OA of 0.989, both significantly higher than DSP-UNet1's MIoU and OA (0.933 and 0.983, respectively). This indicates improvements in both overall semantic consistency and pixel classification accuracy. Notably, DSP-UNet2 achieved a MIoU of 0.944 and an OA of 0.986, demonstrating strong global performance in this intermediate version. Regarding the balance between precision and recall, DSP-UNet3 achieved the optimal F1 score with a P-value of 0.955 and an R-value of 0.967. In contrast, DSP-UNet1 leaned more towards recall (R-value 0.948, P-value 0.930), while DSP-UNet2 exhibited stronger precision (P-value 0.969) but slightly lower recall (0.930). DSP-UNet3 achieved a good balance between these two aspects, effectively controlling both false negatives and false negatives.

[0097] This invention proposes a novel water body extraction model, DSP-UNet, which has three key advantages: First, the model introduces a dual attention mechanism, which enhances key spectral features and suppresses interference regions through parallel channel weighting and spatial mask generation. The SimAM module is integrated into the spatial attention, effectively solving the spectral confusion problem. Second, the model replaces the traditional max pooling with a strip pooling module, utilizing a horizontal and vertical dual-path structure to capture long-range directional contextual information, improving the connectivity of slender water body targets with lower parameter costs. Finally, the modular embedded design ensures that the model maintains the lightweight architecture of U-Net while significantly enhancing its robustness to cloudy, shadowed, and complex urban backgrounds, meeting the dual requirements of real-time performance and accuracy for remote sensing operational systems.

[0098] Another embodiment of the present invention provides a remote sensing image water body extraction system with dual attention and strip pooling improved U-Net, comprising: a computer-readable storage medium and a processor;

[0099] The computer-readable storage medium is used to store executable instructions;

[0100] The processor is used to read executable instructions stored in the computer-readable storage medium and execute the remote sensing image water extraction method of the dual attention and strip pooling improved U-Net.

[0101] Another embodiment of the present invention provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned dual-attention and strip pooling improved U-Net remote sensing image water extraction method.

[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for water body extraction from remote sensing images using dual attention and strip pooling to improve U-Net, characterized in that, Includes the following steps: Step S1, Basic Data Collection and Preprocessing: Collect and use remote sensing images from the OpenWUSU512 dataset as training data, apply data augmentation methods to the training data for preprocessing, and generate a training sample set; Step S2, Model Construction: Construct an improved U-Net model that integrates dual attention mechanism and strip pooling; Step S3, Model Training: For the improved U-Net model constructed in step S2, configure the training environment parameters to train the improved U-Net model; Step S4: Water extraction: Input the preprocessed dataset from step S1 into the improved U-Net model trained in step S3 for inference to obtain the water extraction result map of the remote sensing image. Step S2 constructs an improved U-Net model integrating dual attention mechanism and strip pooling, including: S2.1 Strip Pooling Module Design: The original Max-pooling operation of U-Net is replaced with a dual-path strip pooling module. By capturing long-distance directional context information through horizontal and vertical strip pooling operations, the connectivity of slender water bodies is enhanced, and the water body fracture and shape loss in complex backgrounds are reduced. Slender water bodies include rivers and ditches. S2.2 Dual Attention Mechanism Integration: The original simple connection method of U-Net is replaced with a dual attention mechanism that combines spatial attention and channel attention. Spatial attention mechanism: By generating a spatial attention map, the model automatically focuses on key spatial regions in the image, effectively suppressing background noise and enhancing the model's ability to perceive local details of the water body; at the same time, the SimAM mechanism is introduced to further improve the accuracy and robustness of feature representation. Channel attention mechanism: By weighting different channels of the feature map, the model’s attention to key feature channels in water body extraction is strengthened, thereby improving the accuracy of water body recognition.

2. The method for water body extraction from remote sensing images using dual attention and strip pooling improved U-Net as described in claim 1, characterized in that: Step S1 involves applying data augmentation methods to preprocess the training data to generate a training sample set, including: S1.1 Data Augmentation and Illumination Adaptation: The original image is binarized to distinguish between water bodies and non-water bodies. Different illumination conditions are simulated by randomly adjusting the gamma value and brightness contrast. Contrast limit adaptive histogram equalization is adjusted to enhance local contrast and improve the model's adaptability to illumination changes. S1.2, Enhanced Diversity and Robustness: By using ordinary blur, motion blur, and median blur to simulate the blur phenomenon in actual data acquisition, and by using horizontal flipping to handle symmetrical targets, and translation, scaling, and rotation to simulate the multi-position, multi-scale, and multi-pose changes of targets, the diversity of the dataset is increased and overfitting is alleviated. S1.3 Data Standardization: All enhanced images are normalized using the mean and standard deviation of the ImageNet dataset to unify the data scale and are divided into training and test sets according to a preset ratio.

3. The method for water body extraction from remote sensing images using dual attention and strip pooling improved U-Net as described in claim 1, characterized in that: The training environment parameters configured in step S3 are as follows: Computing platform: Built on NVIDIA RTX A800 GPU and PyTorch 1.11.0 framework, with compatible dependency libraries configured; Hyperparameter optimization: Employ grid search, random search, or Bayesian optimization techniques to optimize the learning rate, batch size, training epochs, optimizer, and loss function to improve model training performance.

4. A remote sensing image water extraction device based on dual attention and strip pooling improved U-Net, characterized in that, include: The basic data collection and preprocessing module is used to collect and use remote sensing images from the OpenWUSU512 dataset as training data, apply data augmentation methods to the training data for preprocessing, and generate a training sample set. The model building module is used to build an improved U-Net model that integrates dual attention mechanism and strip pooling; The model training module is used to configure training environment parameters for training the improved U-Net model. The water extraction module is used to input the dataset preprocessed by the basic data collection and preprocessing module into the trained improved U-Net model for inference to obtain the water extraction result map of the remote sensing image. The model building module constructs an improved U-Net model that integrates dual attention mechanism and strip pooling, including: S2.1 Strip Pooling Module Design: The original Max-pooling operation of U-Net is replaced with a dual-path strip pooling module. By capturing long-distance directional context information through horizontal and vertical strip pooling operations, the connectivity of slender water bodies is enhanced, and the water body fracture and shape loss in complex backgrounds are reduced. Slender water bodies include rivers and ditches. S2.2 Dual Attention Mechanism Integration: The original simple connection method of U-Net is replaced with a dual attention mechanism that combines spatial attention and channel attention. Spatial attention mechanism: By generating a spatial attention map, key spatial regions in the image are automatically focused, effectively suppressing background noise and ensuring that the model can accurately capture local details of the water body; the SimAM mechanism is introduced to further improve the accuracy and robustness of feature representation. Channel attention mechanism: By weighting different channels of the feature map, the model’s attention to key feature channels in water body extraction is strengthened, thereby improving the accuracy of water body recognition.

5. The remote sensing image water extraction device with dual attention and strip pooling improved U-Net as described in claim 4, characterized in that: The basic data collection and preprocessing module applies data augmentation methods to preprocess the training data to generate a training sample set, including: S1.1 Data Augmentation and Illumination Adaptation: The original image is binarized to distinguish between water bodies and non-water bodies, and gamma values ​​and brightness contrast are randomly adjusted to simulate different illumination conditions. Contrast limit adaptive histogram equalization is adjusted to enhance local contrast and improve the model's adaptability to illumination changes. S1.2, Enhanced Diversity and Robustness: By using ordinary blur, motion blur, and median blur to simulate the blur phenomenon in actual data acquisition, and by using horizontal flipping to handle symmetrical targets, and translation, scaling, and rotation to simulate the multi-position, multi-scale, and multi-pose changes of targets, the diversity of the dataset is increased and overfitting is alleviated. S1.3 Data Standardization: All enhanced images are normalized using the mean and standard deviation of the ImageNet dataset to unify the data scale and are divided into training and test sets according to a preset ratio.

6. The remote sensing image water extraction device with dual attention and strip pooling improved U-Net as described in claim 4, characterized in that: The training environment parameters configured for the model training module are as follows: Computing platform: Built on NVIDIA RTX A800 GPU and PyTorch 1.11.0 framework, with compatible dependency libraries configured; Hyperparameter optimization: Employ grid search, random search, or Bayesian optimization techniques to optimize the learning rate, batch size, training epochs, optimizer, and loss function to improve model training performance.

7. A remote sensing image water extraction system improved by dual attention and strip pooling U-Net, comprising: Computer-readable storage media and processors; The computer-readable storage medium is used to store executable instructions; The processor is used to read executable instructions stored in the computer-readable storage medium and execute the remote sensing image water extraction method of dual attention and strip pooling improved U-Net according to any one of claims 1-3.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the remote sensing image water extraction method of dual attention and strip pooling improved U-Net according to any one of claims 1-3.

Citation Information

Patent Citations

  • CA3166088A1

  • CN119785168A