SAR water body extraction method and system based on improved U-HRNet
By improving the U-HRNet model and combining the attention mechanism and lightweight structure, the problems of texture feature representation and interference in SAR image water extraction are solved, achieving high-precision, anti-interference, and strong generalization ability water extraction, which is suitable for various water types and complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MOGANSHAN DIXIN LABORATORY
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-23
AI Technical Summary
Existing SAR image water extraction methods are difficult to fully characterize the spatial texture features of water bodies in large areas and are affected by interference from clouds, haze and other factors. Automatic threshold segmentation methods are easily affected by human factors, and deep learning methods have insufficient performance under complex terrain and coherent speckle noise.
An improved U-HRNet model is adopted, combining the encoder-decoder architecture of U-Net and HRNet, and introducing an attention mechanism module. Deep semantic information and shallow water features are fused through the feature output of multi-layer branches. Refined Lee filtering is used to suppress speckle noise, and a lightweight structure is adopted to reduce the risk of overfitting. It is suitable for different wavebands and sensors.
It achieves high-precision, anti-interference, and strong generalization ability in water body extraction, is applicable to various water body types, has high computational efficiency, and is suitable for flood emergency monitoring and long-term dynamic monitoring.
Smart Images

Figure CN122265868A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for extracting water area from SAR images, and more particularly to a SAR water area extraction method based on an improved U-HRNet. Background Technology
[0002] With the rapid development of remote sensing technology, massive amounts of satellite data are now available for dynamic monitoring of water resources. Optical imagery has long been the most commonly used data for water body extraction. Traditional optical remote sensing water body identification methods can be divided into thresholding methods based on image spectral feature extraction and classifier methods based on machine learning. In thresholding methods based on image spectral feature extraction, researchers have proposed various water body indices for water body identification to improve extraction accuracy, including the Normalized Difference Water Index (NDWI), the Improved Normalized Difference Water Index (MNDWI), the New Comprehensive Water Index (NCWI), and the Novel Water Index (NWI). However, this method relies entirely on spectral information and requires at least one or more near-infrared or short-wave infrared bands, thus limiting its applicability to other sensors. Classifier methods based on machine learning focus on combining unsupervised or supervised classification to mine spatial features such as image edges and shapes. Although this method performs well in water body extraction, it is difficult to fully characterize the spatial texture features of water bodies in large-scale applications, and there is still considerable room for improvement in extraction accuracy.
[0003] Compared to optical remote sensing data, Synthetic Aperture Radar (SAR) possesses all-weather, all-time imaging capabilities. Its active microwaves can penetrate clouds and haze, effectively solving the problem of cloud interference and providing continuous, high-quality data resources for long-term dynamic monitoring of water bodies and flood identification. Furthermore, SAR sensors can clearly acquire surface information at night, making them valuable in hydrological applications such as flood mapping, wetland monitoring, coastline extraction, river and lake segmentation, and surface water identification. Thresholding methods, utilizing the significantly low backscattering coefficient of water bodies in SAR data, have become one of the most widely used methods for water body extraction. Currently, commonly used automatic thresholding methods include the OTSU method and the entropy method; however, threshold setting is easily affected by subjective human factors and exhibits significant temporal and spatial variability.
[0004] In recent years, leveraging the powerful feature mining capabilities of deep neural networks, deep learning-based methods have achieved superior performance in water classification tasks and have also yielded significant results in water segmentation tasks using SAR imagery. However, the complex topographic information and ubiquitous coherent speckle noise in SAR imagery remain key challenges hindering water segmentation tasks. Summary of the Invention
[0005] This invention proposes a SAR water body extraction method based on an improved U-HRNet. This method can complete the task accurately, completely and efficiently in water body monitoring. It has strong generalization ability and robustness, and has good extraction ability and anti-interference ability for various water body types such as lakes, narrow rivers, reservoirs and paddy fields.
[0006] To address the aforementioned technical problems, this invention provides a SAR water body extraction method based on an improved U-HRNet, comprising the following steps: S1. Acquire SAR images and perform preprocessing to obtain a backscattering coefficient map; S2. Crop the preprocessed backscattering coefficient map to a uniform size, and label the water bodies in the cropped image to construct a training dataset. S3. Construct an improved U-HRNet model. This model retains the encoder-decoder architecture of U-Net and the high-resolution characteristics of HRNet. Attention mechanism modules are introduced into the features output by the multi-level branches of the U-HRNet model to fuse the enhanced features with the corresponding high-level features, so as to integrate deep semantic information and shallow water feature information. S4. Train the improved U-HRNet model constructed in step S3 using the training dataset obtained in step S2, evaluate the model, and determine the optimal parameter model based on the evaluation results. S5. Water body extraction is performed on the SAR image to be extracted using the trained improved U-HRNet model to obtain the water body extraction results.
[0007] Preferably, in step S1, the SAR image includes one or more of C-band, X-band, or L-band. C-band offers a better balance in penetration, spatial resolution, and sensitivity to water bodies, making C-band SAR imagery preferred for model training. The preprocessing includes thermal noise removal, radiometric calibration, speckle filtering, and terrain correction. The speckle filtering employs the Refined Lee algorithm to suppress speckle noise while preserving edge information of ground features. Terrain correction uses a range-Doppler imaging geometric model to eliminate or correct geometric errors in the SAR image, thereby improving image quality.
[0008] Preferably, in step S2, constructing the training dataset further includes: introducing public datasets or existing labeled data, which, together with self-built labeled data, constitute the training dataset, and dividing it into a training set and a test set according to a preset ratio. More preferably, the preprocessed backscattering coefficient maps are batch-cropped to a size of... Small-sized images of each pixel were cropped, and water bodies in the cropped images were labeled to obtain the first set of images and their corresponding label files. Three additional images from the S1S2-Water dataset and their corresponding label files were then cropped into image patches of the same pixel size to form the second set of images and their corresponding label files. Finally, the first and second sets of images and their corresponding label files were merged to generate the training dataset. The training dataset was randomly divided into training and testing sets in a 7:3 ratio, with the training set used for model training and the testing set used for model validation.
[0009] Preferably, the improved U-HRNet model described in step S3 retains the main network structure of U-HRNet, and except for the initial and final stages, uses high-resolution modules with dual-resolution branches as the basic building blocks, including the following processing: (1) The backbone feature extraction network adopts the lightweight U-HRNet-W18-Small to reduce the number of parameters and computational overhead; (2) In the features output by the branches of stage 2, stage 3 and stage 4 of the U-HRNet model, a coordinate attention mechanism module is introduced respectively; (3) The enhanced features of stage 2, stage 3 and stage 4 are respectively fused with the corresponding high-level features of stage 8, stage 7 and stage 6, that is, stage 2 is fused with stage 8, stage 3 with stage 7, and stage 4 with stage 6.
[0010] Preferably, the coordinate attention mechanism applies global pooling operations in both vertical and horizontal dimensions to encode the features of each channel, capturing spatial location dependencies. Its specific expression is: (1), (2), In the formula, H and W are the height and width of the feature map, respectively; h and w are the height and width of the current input feature map, respectively. This is a feature map with height h at channel c; Let i be the feature map with width w at the c-th channel; i is the index of a column in the range [0, W], and j is the index of a row in the range [0, H].
[0011] Preferably, in step S4, an optimizer is used in conjunction with a dynamic learning rate adjustment strategy to train the model and obtain the optimal parameter model; the optimizer is a stochastic gradient descent optimizer with a momentum set to 0.9 and a weight decay set to 1e-4; the dynamic learning rate adjustment strategy is an adaptive learning rate strategy, in which the learning rate is automatically adjusted within a preset range.
[0012] More preferably, SGD is selected as the optimizer, and the learning rate is automatically adjusted between 1e-5 and 1e-3.
[0013] Preferably, in step S4, the evaluation of model performance includes: comparative analysis with other segmentation models, and verification of generalization ability on SAR images of different bands, different sensors, or different resolutions. Specifically, this includes comparative analysis with models such as U-Net, DeepLabV3+, PSPNet, and the original U-HRNet; while the verification of generalization ability is performed using a dataset with a different band than the training band, such as C-band images used for training, while X-band is used to verify generalization ability.
[0014] Preferably, the operation of comparing and analyzing with other segmentation models is as follows: the water extraction results obtained from the test are compared and analyzed with one or more existing segmentation models, including qualitative analysis and quantitative analysis; The qualitative analysis includes: intuitively comparing the extraction results in one or more scenarios, such as lakes, rivers, reservoirs, streams, paddy fields, and urban water bodies; The evaluation metrics for the quantitative analysis include one or more of the following: intersection-over-union ratio, pixel accuracy, precision, training time, extraction time, model parameters, and floating-point computation.
[0015] Preferably, the model is tested on X-band, L-band, or other band SAR imagery, and quantitatively evaluated based on one or more of the following: crossover ratio (CRO), pixel accuracy, precision, model parameters, and floating-point computation (FLOPs). More preferably, the model is tested using the X-band KOMPSAT-5 SAR water dataset to verify its generalization ability, and quantitatively evaluated based on mIoU, mPA, mPrecision, model parameters, and floating-point computation (FLOPs).
[0016] Another aspect of the present invention provides a SAR image water body extraction system based on an improved U-HRNet, comprising: The data acquisition module is used to perform the acquisition and preprocessing of SAR images as described in step S1. The data processing module is used to perform the cropping and annotation described in step S2 to construct the training dataset; The model building module is used to perform the construction of the improved U-HRNet model as described in step S3; The model training module is used to perform the model training described in step S4 to obtain the optimal parameter model; The water extraction module is used to perform water extraction on the SAR image to be extracted as described in step S5.
[0017] The beneficial effects of this invention are as follows: 1. High extraction accuracy and good detail preservation. By introducing a coordinate attention mechanism, spatial location information is encoded from both vertical and horizontal directions, enhancing the attention to details such as the shape, structure, and texture of the water body; the attention-enhanced features are fused with high-level semantic features to achieve complementary details and semantics, resulting in clearer boundaries and unbroken slender water bodies.
[0018] 2. Strong anti-interference ability and good robustness. Refined Lee filtering is used to suppress speckle noise, preserving edge information while denoising; multi-resolution branching structure maintains high-resolution features and avoids loss of details; attention mechanism helps the model focus on the water area and suppress background interference.
[0019] 3. Strong generalization ability and wide applicability across bands. Employing a lightweight structure reduces the risk of overfitting and enhances generalization ability; the model focuses on learning general features such as shape, structure, and texture, rather than pixel values specific to a particular band. It maintains high accuracy when trained in the C-band and tested in the X-band.
[0020] 4. High computational efficiency, suitable for practical applications. The backbone network adopts the lightweight U-HRNet-W18-Small, with fewer parameters and lower computational overhead; the dual-resolution branch design avoids the computational waste of traditional methods' "degradation before upgrading"; training time is short and extraction time is minimal, achieving a good balance between accuracy and efficiency. Furthermore, it is applicable to SAR imagery, unaffected by clouds, rain, or day / night cycles, and can be used in scenarios such as flood emergency monitoring and long-term dynamic monitoring. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the overall process in this application; Figure 2 This is a structural diagram of the improved U-HRNet model in this application; Figure 3 This is a structural diagram of the coordinate attention mechanism in this application; Figure 4 This is an image showing the extraction results of a C-band Sentinel-1 SAR comparison experiment in the embodiments of this application; Figure 5 This is an image of the results extracted from the X-band KOMPSAT-5 SAR lake water comparison experiment in the embodiments of this application; Figure 6 This is an image extracted from a comparison experiment of a narrow river using X-band KOMPSAT-5 SAR in an embodiment of this application. Figure 7 This is an image of the results extracted from the X-band KOMPSAT-5 SAR reservoir comparison experiment in the embodiments of this application; Figure 8 This is an image of the results extracted from the X-band KOMPSAT-5 SAR paddy field comparison experiment in the embodiments of this application; Figure 9 This is an image extracted from the X-band KOMPSAT-5 SAR urban water body comparison experiment in the embodiments of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0023] like Figure 1 As shown, a SAR water body extraction method based on an improved U-HRNet includes the following steps: S1. Acquire SAR images and perform preprocessing to obtain a backscattering coefficient map; S2. Crop the preprocessed backscattering coefficient map to a uniform size, and label the water bodies in the cropped image to construct a training dataset. S3. Construct an improved U-HRNet model. This model retains the encoder-decoder architecture of U-Net and the high-resolution characteristics of HRNet. Attention mechanism modules are introduced into the features output by the multi-level branches of the U-HRNet model to fuse the enhanced features with the corresponding high-level features, so as to integrate deep semantic information and shallow water feature information. S4. Train the improved U-HRNet model constructed in step S3 using the training dataset obtained in step S2, evaluate the model, and determine the optimal parameter model based on the evaluation results. S5. Water body extraction is performed on the SAR image to be extracted using the trained improved U-HRNet model to obtain the water body extraction results.
[0024] The preprocessing in step S1 includes steps such as thermal noise removal, radiometric calibration, speckle filtering, terrain correction, and dB conversion. Specifically: 1. Thermal noise removal. Thermal noise is the background noise inherent in synthetic aperture radar (SAR) satellite systems. Thermal noise suppression can reduce noise in the texture between sub-strips and reduce image discontinuities between different sub-strips in multi-strip imaging modes.
[0025] 2. Radiometric calibration. Sentinel-1 Level 1 imagery is typically uncalibrated and exhibits significant radiometric bias. The purpose of radiometric calibration is to convert the image's intensity values into backscattering coefficients (i.e., σ0 values).
[0026] 3. Speckle Filtering. The filtering method employed is Refined Lee filtering, which applies an adaptive window at each pixel location, dynamically adjusting its size and shape based on local image features. By analyzing the statistical characteristics (such as mean and variance) of pixels in the neighborhood, it determines whether a pixel is noise and processes it accordingly.
[0027] 4. Terrain Correction. By combining the distance-Doppler imaging geometric model and the digital elevation model, the images are accurately registered and resampled to achieve geocoding and generate standard products that conform to the map projection coordinate system.
[0028] 5. dB Conversion. When using logarithmic transformation to convert image pixel grayscale values into radar backscattering coefficients, the backscattering coefficient conversion formula expressed in decibels is shown in equation (3): In the formula, DN is the gray value of the image pixel, and dB is the backscattering coefficient expressed in decibels.
[0029] In step S2, the preprocessed images are batch-cropped into smaller images of 512×512 pixels, and the water bodies are labeled. Additionally, three scenes from the S1S2-Water dataset and their corresponding label files are cut into image patches of the same pixel size, ultimately generating a dataset of 3177 images. The training and test sets are randomly divided in a 7:3 ratio, with 2223 images used for training and 954 images used for validation.
[0030] In step S3, an improved U-HRNet model is constructed, retaining the encoder-decoder architecture of U-Net and the high-resolution characteristics of HRNet. Simultaneously, a coordinate attention module is introduced to integrate deep information with information such as the shape, structure, texture, and tone of shallow water, thereby improving the efficiency and accuracy of water extraction. Specifically, this includes: S31: As Figure 2 As shown, the model retains the encoder-decoder architecture of U-Net and the high-resolution characteristics of HRNet. After the lowest resolution stage, the model introduces multiple upsampling stages, progressively upsampling features and fusing them with features from the previous stage to enhance the semantic representation capability of high-resolution features. Furthermore, the model introduces a new stage containing 1 / 32 and 1 / 64 resolution branches of the input image to further improve semantic information richness without requiring additional high-resolution branches.
[0031] In the feature representation module, the structure is largely continued from HRNetV2, with the multi-resolution features derived from the low-resolution branches in stages 5 to 9. Due to the addition of a 1 / 64 resolution branch, the number of input channels for the convolutional layers in the feature representation module is doubled compared to HRNetV2. To control computational cost while integrating multi-scale information, keeping it comparable to the feature module of HRNetV2, the model first pools these multi-resolution features along the channel dimension (kernel size of 2), then concatenates them along the channel dimension, and uses this concatenation as input to the feature representation module.
[0032] S32: In the model, the backbone feature extraction network adopts the lightweight U-HRNet-W18-Small. Compared with versions with more channels (such as U-HRNet-W32 or W48), this network significantly reduces the number of parameters and computational overhead while maintaining the advantages of multi-resolution parallel structure, thereby significantly improving computational efficiency. It is suitable for applications with high real-time requirements and limited resources. This feature is particularly important in tasks such as water body extraction and flood monitoring, because efficient computing power can support the rapid processing of large-scale remote sensing images and real-time monitoring of dynamic changes.
[0033] S33: As Figure 2 As shown, a coordinate attention mechanism module is introduced into the features output by the branches of stage 2, stage 3, and stage 4 of the model to enhance the expressive power of spatial information. This mechanism not only adaptively weights pixels at different locations, making the network pay more attention to important water areas, but also captures the dependencies between features in the channel dimension, effectively evaluating the importance of water features in each channel. Based on this, these enhanced features are fused with the high-level features of stage 8, stage 7, and stage 6 to further improve the accuracy of boundary details and the precision of water extraction.
[0034] S34: The aforementioned coordinate attention mechanism, while compressing channel information, encodes the spatial positional dependencies in the horizontal and vertical directions, simultaneously considering the relationship between the water body target's location and the channel's importance. Embedding it into the U-HRNet backbone network significantly improves the extraction accuracy of water bodies of different scales and shapes while maintaining its lightweight and real-time advantages. It is particularly effective at handling boundary details in complex backgrounds, making it suitable for high-precision water body extraction and flood monitoring applications. Figure 3 As shown, coordinate attention decomposes global pooling in two dimensions, applying global pooling operations in the vertical (H,1) and horizontal (1,W) directions respectively, and uniquely encodes the features of each channel. The specific expression is as follows: (1), (2), In the formula, H and W are the height and width of the feature map, respectively; h and w are the height and width of the current input feature map, respectively. This is a feature map with height h at channel c; Let i be the feature map with width w at the c-th channel; i is the index of a column in the range [0, W], and j is the index of a row in the range [0, H].
[0035] The two feature maps are further combined, and then a 1×1 convolution is applied to transform them, as shown in the expression: (4), In the formula, F1 represents the convolution transformation function, and square brackets indicate the combination operation. is a non-linear activation function, and f is an intermediate feature. and These are two separate tensors. They are respectively... and Transforming it into a tensor with the same number of channels yields... and The expression is: In the formula, and These are the attention weights in the vertical and horizontal directions, respectively; and These are vertical and horizontal convolutions, respectively; and These are the intermediate feature maps, one vertical and one horizontal, respectively. The final output expression of the attention module is: In the formula, , These are the input and output feature maps at the c-th channel, respectively. , These are the vertical and horizontal attention weights at channel c, respectively.
[0036] In step S4, the hardware for model training consisted of: an i9-13900K 3.00 GHz processor, 64GB of RAM, an NVIDIA GeForce RTX 4090 graphics processor with 24GB of VRAM, a Windows 11 64-bit operating system, Python 3.9 programming language, and PyTorch 2.4 deep learning framework. Through multiple comparative experiments on the dataset, the optimal training parameter configuration for the model was determined: 100 training epochs, a batch size of 4, stochastic gradient descent (SGD) as the optimizer, a momentum coefficient of 0.9, and a weight decay coefficient of 1e-4. An adaptive learning rate strategy was also introduced, dynamically adjusting the learning rate between 1e-5 and 1e-3. Under these parameter settings, the model exhibited good convergence during iterative training, and the training results remained stable at a high performance level.
[0037] In the model evaluation step, the improved U-HRNet model was used to extract water from another image, yielding the water extraction results. Next, the water extraction results were compared and analyzed with U-Net, DeepLabV3+, PSPNet, and the original U-HRNet, including both qualitative and quantitative aspects. Qualitatively, analysis was conducted on multiple scenes, including lakes, rivers, reservoirs, and streams. Quantitatively, evaluation metrics included mean intersection-over-union ratio (mIoU), mean pixel precision (mPA), mean accuracy (mPrecision), training time, and extraction time.
[0038] Figure 4The image presents C-band Sentinel-1 imagery data and examples of water body extraction results from various methods. In the figure, (a) represents a lake; (b) and (e) represent urban rivers; (c) represents a long, narrow river; (d) represents a complex regional water system; (f) represents a mountain reservoir; and (g) represents a stream in farmland. As shown in the figure, compared with other mainstream semantic segmentation models, the improved U-HRNet model proposed in this invention achieves the best extraction results in various complex water body scenarios, especially in challenging scenarios such as long, narrow rivers, complex water systems, and urban water bodies, exhibiting more complete connectivity, clearer boundaries, and fewer false positives. In (a) the lake, the U-Net model's extraction is too coarse, with incomplete extraction of details in the center of the water body, resulting in a poor overall result and failure to fully identify the water body's extent. The DeepLabV3+ and PSPNet models exhibit some omissions in water extraction, while the method described in this patent provides smoother extraction results compared to the original U-HRNet model, overcoming irregularities and correctly extracting water areas in scattered small bodies of water, narrow rivers, and regions with small objects in the water, resulting in the best visual effect. In urban rivers (b) and (e), the U-Net and DeepLabV3+ models are most severely affected by building shadows, exhibiting numerous errors in edge extraction. The PSPNet model fails to effectively extract bridges and central islands, performing poorly, while the method described in this patent effectively distinguishes small objects such as boats, bridges, and islands, and is least affected by urban building shadows and high reflectivity. In the narrow river (c), the DeepLabV3+ and PSPNet models perform poorly in water extraction, with discontinuous and incomplete extracted river information, while the method described in this patent extracts water bodies better, ensuring water continuity, and is least affected by non-aquatic environments. In (d) the complex water system, the overall performance of each model is consistent, but there are also minor shortcomings. For example, the water extraction results of the U-Net and U-HRNet models have some small holes, the PSPNet model has the smoothest extraction results, but it failed to distinguish the small shoals formed by the drying of water bodies, and the DeepLabV3+ model has an incomplete edge extraction. The method in this patent is better than other models at capturing the features of narrow water bodies of different scales in complex environments. It is not easily disturbed in complex scenes, can accurately extract large-scale water bodies, and can also identify isolated water bodies. It is also less sensitive to water noise. In (f) the mountain reservoir scene, the U-Net and PSPNet models have one false positive and one false negative. The U-HRNet model has poor continuity between the reservoir and the narrow valley, while the method in this patent is least affected by the shadow of the mountain and other dark surfaces, and has the best water continuity. In the water extraction scenario at farmland (g), the method in this patent can enhance the focus on global information and strengthen the dependencies between water pixels, so it is minimally affected by farmland shadows, which demonstrates the effectiveness of the improved method proposed in this patent.
[0039] As shown in Table 1, this application uses a variety of deep learning accuracy evaluation metrics to objectively evaluate the water extraction results of different models. As can be seen from the table, the improved U-HRNet model in this application has a significant improvement in accuracy, and the increased time cost is not much, achieving a good balance between accuracy and efficiency.
[0040] Table 1 Performance indicators of different models on C-band images In the test of the model's generalization ability, the X-band KOMPSAT-5 SAR water body dataset was selected to verify the model's generalization ability, and quantitative evaluation was carried out from mIoU, mPA, mPrecision, model parameters, and floating-point operations (FLOPs). Figures 5-9 This document presents X-band KOMPSAT-5 SAR image data, corresponding labels, and examples of water body extraction results from various methods, including common water body types such as lakes, narrow rivers, reservoirs, paddy fields, and urban water bodies.
[0041] Specifically, in Figure 5 The paper visually demonstrates the significant advantages of the method of this invention in extracting lake water bodies from X-band SAR images. It shows smooth and continuous lake edges without obvious jagged edges or breaks, no voids or misjudgments within the lake, complete filling of the water area, effective differentiation of water bodies from surrounding land and vegetation, low misjudgment rate, and accurate extraction of irregular lake edges and small tributaries. Figure 6 In narrow, elongated river scenes, the elongated shape demands extremely high levels of detail preservation and continuity from the model, making it a significant challenge for evaluating the performance of water extraction algorithms. The method of this invention extracts water bodies where the river remains completely connected from beginning to end, without obvious breaks or gaps, accurately reconstructing the river's meandering course with strong continuity; it accurately maintains the width of the narrow river channel, without excessive compression or expansion, resulting in better width preservation; the riverbanks have smooth and clear boundaries, clearly distinguishing them from the land; and the inner and outer boundaries at river bends are accurately extracted without adhesion or deformation. This fully verifies the superiority and robustness of the method of this invention in handling narrow, elongated water bodies. Similarly, in… Figure 7 The invention demonstrates that the method of the present invention extracts a clearer reservoir outline, has a better recognition effect on water body details, can effectively overcome the influence of mountain shadows, and can extract water body information more accurately from complex backgrounds. Figure 8 The method of this invention captures complete paddy field features, resulting in clearer paddy field outlines with a high degree of overlap with real labels. Figure 9 The invention demonstrates that even in densely built-up urban environments with complex backgrounds, the method can still accurately extract water bodies with few false positives and strong anti-interference capabilities.
[0042] Figures 5 to 9 The generalization ability and robustness of the proposed method on X-band SAR imagery were fully verified. Regardless of different water body types, scales, or background complexities, the improved U-HRNet model exhibited stable and excellent extraction performance, significantly outperforming existing mainstream segmentation models such as U-Net, PSPNet, DeepLabV3+, HRNet, and the original U-HRNet. This demonstrates that the proposed method, by introducing a coordinate attention mechanism and fusing multi-scale features, effectively improves the model's ability to capture water body details and distinguish complex backgrounds, possessing good practical value and promising prospects for wider application.
[0043] As shown in Table 2, this application uses various deep learning accuracy evaluation metrics to objectively evaluate the water extraction results of different models on X-band images. As can be seen from the table, the improved U-HRNet model in this application has brought effective improvement in accuracy while ensuring memory usage.
[0044] Table 2 Performance indicators of different models on X-band images Therefore, the model demonstrates strong accuracy and robustness in water extraction from SAR images. That is, by using the trained improved U-HRNet model to extract water from the SAR images to be extracted, the water extraction results can be obtained.
[0045] On the other hand, based on this extraction method, the present invention also discloses a SAR image water body extraction system based on an improved U-HRNet, comprising: a data acquisition module for acquiring SAR images and performing preprocessing as described in step S1; a data processing module for cropping and labeling as described in step S2 to construct a training dataset; a model building module for constructing an improved U-HRNet model as described in step S3; a model training module for training the model as described in step S4 to obtain an optimal parameter model; and a water body extraction module for extracting water bodies from the SAR image to be extracted as described in step S5.
[0046] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A SAR water body extraction method based on an improved U-HRNet, characterized in that: Includes the following steps: S1. Acquire SAR images and perform preprocessing to obtain a backscattering coefficient map; S2. Crop the preprocessed backscattering coefficient map to a uniform size, and label the water bodies in the cropped image to construct a training dataset. S3. Construct an improved U-HRNet model. This model retains the encoder-decoder architecture of U-Net and the high-resolution characteristics of HRNet. Attention mechanism modules are introduced into the features output by the multi-level branches of the U-HRNet model to fuse the enhanced features with the corresponding high-level features, so as to integrate deep semantic information and shallow water feature information. S4. Train the improved U-HRNet model constructed in step S3 using the training dataset obtained in step S2, evaluate the model, and determine the optimal parameter model based on the evaluation results. S5. Water body extraction is performed on the SAR image to be extracted using the trained improved U-HRNet model to obtain the water body extraction results.
2. The SAR water extraction method based on improved U-HRNet according to claim 1, characterized in that: In step S1, the SAR image includes one or more of C-band, X-band, or L-band; The preprocessing includes thermal noise removal, radiometric calibration, speckle filtering, and terrain correction steps.
3. The SAR water extraction method based on improved U-HRNet according to claim 1, characterized in that: In step S2, the construction of the training dataset further includes: introducing public datasets or existing labeled data, which together with the self-built labeled data constitute the training dataset, and dividing it into training set and test set according to a preset ratio.
4. The SAR water extraction method based on improved U-HRNet according to claim 1, characterized in that: The improved U-HRNet model described in step S3 retains the main network structure of U-HRNet. Except for the initial and final stages, it uses high-resolution modules with dual-resolution branches as the basic building blocks, including the following processing: (1) The backbone feature extraction network adopts a lightweight structure to reduce the number of parameters and computational overhead; (2) In the features output by the branches of stage 2, stage 3 and stage 4 of the U-HRNet model, a coordinate attention mechanism module is introduced respectively; (3) The enhanced features of stages 2, 3 and 4 are fused with the corresponding high-level features of stages 8, 7 and 6, respectively.
5. The SAR water extraction method based on improved U-HRNet according to claim 4, characterized in that: The coordinate attention mechanism applies global pooling operations in both vertical and horizontal dimensions to encode the features of each channel and capture spatial location dependencies.
6. The SAR water extraction method based on improved U-HRNet according to claim 1, characterized in that: In step S4, an optimizer is used in conjunction with a dynamic learning rate adjustment strategy to train the model and obtain the optimal parameter model; the optimizer is a stochastic gradient descent optimizer with a momentum set to 0.9 and a weight decay set to 1e-4. The dynamic learning rate adjustment strategy is an adaptive learning rate strategy, in which the learning rate is automatically adjusted within a preset range.
7. The SAR water extraction method based on improved U-HRNet according to claim 1, characterized in that: In step S4, the evaluation of model performance includes: comparative analysis with other segmentation models, and verification of generalization ability on SAR images of different bands, different sensors or different resolutions.
8. The SAR water extraction method based on improved U-HRNet according to claim 7, characterized in that: The operation of comparative analysis with other segmentation models is as follows: the water extraction results obtained from the test are compared and analyzed with one or more existing segmentation models, including qualitative analysis and quantitative analysis; The qualitative analysis includes: intuitively comparing the extraction results in one or more scenarios, such as lakes, rivers, reservoirs, streams, paddy fields, and urban water bodies; The evaluation metrics for the quantitative analysis include one or more of the following: intersection-over-union ratio, pixel accuracy, precision, training time, extraction time, model parameters, and floating-point computation.
9. A SAR water extraction method based on an improved U-HRNet according to claim 7, characterized in that: The generalization capability verification includes: testing on SAR images in X-band, L-band or other bands, and quantitatively evaluating them from one or more of the following: crossover ratio, pixel accuracy, precision, model parameters and floating-point computation.
10. A SAR water extraction system based on an improved U-HRNet, utilizing the extraction method according to any one of claims 1-9, characterized in that: include: The data acquisition module is used to perform the acquisition and preprocessing of SAR images as described in step S1. The data processing module is used to perform the cropping and annotation described in step S2 to construct the training dataset; The model building module is used to perform the construction of the improved U-HRNet model as described in step S3; The model training module is used to perform the model training described in step S4 to obtain the optimal parameter model; The water extraction module is used to perform water extraction on the SAR image to be extracted as described in step S5.