An edge-guided high-resolution remote sensing image complex scene water body extraction method

CN121982589BActive Publication Date: 2026-10-30ANHUI UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610122710.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-10-30
Estimated Expiration
2046-01-29

AI Technical Summary

Technical Problem

[0008]本发明的目的在于提供一种边缘引导的高分辨率遥感影像复杂场景水体提取方法,以解决现有方法在高分辨率遥感影像复杂场景水体提取中存在的边界定位精度不足、特征表达能力弱、融合策略粗粒度等技术问题,实现对半干涸水体、植被覆盖水体、细窄河道、阴影水体、浑浊泥水等复杂场景水体的准确提取

Benefits of technology

[0024]1、本发明公开了一种边缘引导的高分辨率遥感影像复杂场景水体提取方法,针对当前高分辨率遥感影像水体提取中存在的边界定位精度不足、复杂场景识别困难等问题,通过边缘引导推理模块(EWFI)和像素共享特征融合模块(PSFF)的协同作用,有效提升了复杂场景下水体提取的准确性和鲁棒性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121982589B_ABST
    Figure CN121982589B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of remote sensing geology application, and particularly relates to an edge-guided high-resolution remote sensing image complex scene water body extraction method, steps of which are as follows: S1, high-resolution unmanned aerial vehicle image input; S2, CNN-Transformer hybrid architecture multi-scale feature extraction; S3, edge-guided reasoning module three-path feature enhancement; S4, pixel shared feature fusion module pixel-level adaptive fusion; S5, complex scene water body segmentation result output. The application effectively solves the water body extraction problem of complex scenes such as semi-dry water body, vegetation covered water body, thin and narrow river, shadow water body, muddy water and the like in high-resolution unmanned aerial vehicle images, significantly improves boundary positioning accuracy and feature recognition capability, and provides an effective technical solution for water resource monitoring, flood disaster assessment and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing geoscience application technology, specifically relating to an edge-guided method for extracting water bodies from complex scenes in high-resolution remote sensing images. Background Technology

[0002] Surface water bodies are an important component of the Earth's ecosystem, playing a vital role in ecological stability and the sustainable development of human society. Accurate identification and monitoring of the distribution and spatiotemporal changes of surface water bodies are crucial in areas such as flood control, water resource management, and environmental protection. Remote sensing technology, due to its ability to acquire surface information over large areas without being limited by ground conditions, has become an important means of water body identification and monitoring.

[0003] Traditional water body extraction methods mainly include spectral index-based techniques and image classification-based techniques. Spectral index methods, such as the Normalized Difference Water Index (NDWI) and the Modified Normalized Difference Water Index (MNDWI), extract water bodies by calculating different bands in remote sensing images and combining this with threshold segmentation. These methods are computationally efficient and have achieved good results on low- and medium-resolution satellite imagery. However, in high-resolution remote sensing imagery, traditional spectral index methods face significant challenges: on the one hand, they rely on a few key bands and fail to fully utilize the spatial detail information of high-resolution imagery; on the other hand, in complex scenes, the spectral characteristics of water bodies and non-water bodies (such as building shadows, moist soil, and dark impermeable surfaces) are highly similar, leading to insufficient water body extraction accuracy. Image classification-based methods distinguish between water bodies and non-water bodies through machine learning or deep learning models. Although they can achieve high accuracy over a wide range, they have limitations such as relying on large amounts of manually labeled data, high computational complexity, and slow processing speed, making them unsuitable for real-time monitoring and emergency response scenarios.

[0004] With the development of deep learning technology, semantic segmentation models based on convolutional neural networks (CNNs) have gradually become the mainstream method for water body extraction. FCN was the first to introduce CNNs into the field of semantic segmentation, achieving pixel-level dense prediction; U-Net effectively fused features at different levels through an encoder-decoder architecture and skip connection mechanism; the DeepLab series introduced dilated convolution and dilated spatial pyramid pooling modules to expand the receptive field and enhance multi-scale feature extraction capabilities. These CNN-based methods have made significant progress in water body extraction from remote sensing images, but limitations remain: the locality of convolution operations leads to a limited receptive field, making it difficult to establish long-range dependencies in water body regions, and easily resulting in fragmented segmentation when dealing with water bodies with complex boundaries. In recent years, the Transformer architecture has brought new breakthroughs to semantic segmentation with its global modeling capabilities through self-attention mechanisms, but its secondary computational complexity leads to a surge in memory consumption when processing high-resolution images, and it lacks the ability to finely depict local boundary details.

[0005] The rapid development of UAV remote sensing technology has brought new opportunities for water body information acquisition. Compared with satellite remote sensing, UAV remote sensing has significant advantages such as high spatial resolution (up to centimeter level), flexible flight, and relatively low cost, making it particularly suitable for fine-grained monitoring and emergency response in small areas. However, while ultra-high spatial resolution brings rich details of the Earth's surface, it also presents new technical challenges for water body extraction. At centimeter-level resolution, water body extraction in complex scenes faces two core challenges: First, the complexity of boundaries—ultra-high resolution amplifies the irregular geometric shapes of water body boundaries, and complex situations such as alternating water and land, vegetation obstruction, and shadow interference lead to insufficient boundary positioning accuracy; Second, the difficulty of feature recognition—water bodies in complex scenes such as semi-dried water bodies, vegetated water bodies, narrow river channels, and turbid muddy water have weak feature expressions and high similarity to surrounding features (moist soil, shaded areas, low vegetation), making it difficult for traditional discrimination methods to effectively distinguish them.

[0006] Existing methods have systemic limitations in addressing these challenges. First, existing deep learning models primarily rely on pixel-level features, failing to fully utilize edge information—a crucial geometric prior for distinguishing water bodies from the background—leading to insufficient localization accuracy in complex boundary conditions. Second, existing feature fusion strategies often employ simple channel concatenation or element-wise addition, using uniform fusion weights to process the entire feature map, ignoring the heterogeneity of different spatial locations within the feature map corresponding to different types of land cover features. For complex water bodies, the central region requires enhanced deep semantic features to ensure category discrimination, while the boundary region requires enhanced shallow geometric features to guarantee localization accuracy; uniform fusion weights cannot meet these differentiated needs. Third, specialized research on water body extraction from complex scenes in high-resolution remote sensing imagery is relatively scarce. Existing datasets are insufficient in terms of spatial resolution, scene diversity, and coverage of complex scene types, making it difficult to support systematic research and fine-grained validation of methods.

[0007] Therefore, how to accurately extract water bodies from complex scenes in high-resolution remote sensing images, especially how to effectively utilize edge geometric priors to enhance boundary localization capabilities and how to establish a pixel-level adaptive fusion mechanism to address the problems of weak feature representation and high similarity of ground objects, has become a key technical challenge that urgently needs to be solved in the field of water body extraction. Summary of the Invention

[0008] The purpose of this invention is to provide an edge-guided method for extracting water bodies in complex scenes from high-resolution remote sensing images, in order to solve the technical problems of insufficient boundary positioning accuracy, weak feature expression ability, and coarse-grained fusion strategy in existing methods for extracting water bodies in complex scenes from high-resolution remote sensing images, and to achieve accurate extraction of water bodies in complex scenes such as semi-dried water bodies, vegetated water bodies, narrow channels, shadowed water bodies, and turbid muddy water.

[0009] To achieve the above-mentioned technical objectives and effects, the present invention is implemented through the following technical solution:

[0010] This invention provides a method for extracting water bodies in complex scenes from high-resolution remote sensing images using edge guidance, comprising the following steps:

[0011] S1, High-resolution UAV image input;

[0012] S2, CNN-Transformer hybrid architecture for multi-scale feature extraction;

[0013] S3, Enhanced three-path features of the edge-guided reasoning module;

[0014] S4, Pixel-level adaptive fusion of pixel-shared feature fusion module;

[0015] S5. Output of water segmentation results for complex scenes.

[0016] Further, in step S1, high-resolution UAV RGB images with a spatial resolution of centimeters are acquired; the images are finely annotated manually to generate pixel-level water body labels; and the cropped image-label pairs are randomly divided into training set, validation set and test set in a ratio of 8:1:1.

[0017] Furthermore, the high-resolution drone RGB imagery covers a wide range of complex water body types, including semi-dry water, vegetated water, narrow channels, shadowed areas, and murky water.

[0018] Furthermore, after generating pixel-level water body labels, the water body category is assigned a value of 1 and the background category is assigned a value of 0; the complete image is cropped into a sliding window of 1024×1024 pixels, and a 30% overlap is set to ensure the integrity of the boundary area information, and image blocks with more than 80% of the area being invalid information are removed.

[0019] Further, in step S2, the encoder uses a lightweight ResNet-18 to extract multi-scale features from the input image, generating four feature maps {F0, F1, F2, F3} at different resolutions through four downsampling stages, with 64, 128, 256, and 512 feature channels, respectively; the decoder uses a Transformer decoder to restore spatial resolution step by step, with 8 heads and a feedforward network expansion factor of 4, and models global context information through a self-attention mechanism; skip connections are set at each level of the decoder to pass the feature maps of the corresponding levels of the encoder to the decoder.

[0020] Further, in step S3, the edge-guided inference module receives the skip connection feature F_skip and the prediction result P_pred, and uses the Laplacian operator to extract the edge feature F_edge; the feature is enhanced through three inference paths: the background exclusion path identifies low-confidence potential water areas through (1-Sigmoid(P_pred)), the boundary-driven path refines the boundary localization using Laplacian(Sigmoid(P_pred)), and the high-frequency feature path multiplies F_skip and F_edge to enhance the edge response; the outputs of the three paths are concatenated in the channel dimension and integrated by 3×3 convolution, and feature enhancement is completed through spatial attention optimization and residual connection combined with the CBAM mechanism.

[0021] Further, in step S4, the pixel-shared feature fusion module adopts a symmetrical dual-branch architecture to process the deep semantic features F_deep of the decoder and the shallow geometric features F_skip of the skip connection respectively; both branches use grouped convolution for feature transformation, with the number of groups set to 8, and preliminary fusion is achieved by element-wise addition to obtain F_fused; a cascaded dual attention mechanism is introduced: spatial attention is generated by 7×7 convolution after Concat(AvgPool(F_fused), MaxPool(F_fused)), and channel attention is generated by an adaptive convolution kernel strategy to generate channel weights, with the convolution kernel size k adaptively determined according to the channel dimension; finally, feature enhancement is achieved through pixel-wise element-wise multiplication and residual connections.

[0022] Furthermore, in step S5, the image to be extracted is input into the trained network model. After the encoder extracts multi-scale features from the image, the EWFI module and PSFF module work together at each level of the decoder to enhance feature expression and adaptive fusion. The decoder finally outputs a binarized water body segmentation result. For large-format images, a sliding window strategy is used for cropping, with a 30% overlap. After prediction, the complete water body extraction result is generated by stitching.

[0023] The beneficial effects of this invention are:

[0024] 1. This invention discloses an edge-guided method for extracting water bodies in complex scenes from high-resolution remote sensing images. Addressing the problems of insufficient boundary positioning accuracy and difficulty in recognizing complex scenes in current high-resolution remote sensing image water body extraction, this invention effectively improves the accuracy and robustness of water body extraction in complex scenes through the synergistic effect of the edge-guided inference module (EWFI) and the pixel-shared feature fusion module (PSFF).

[0025] 2. The method of this invention systematically enhances the feature representation capability and boundary localization accuracy of water bodies in complex scenes by introducing prior information on edge geometry and designing three complementary inference paths: background exclusion, boundary-driven, and high-frequency features. Simultaneously, it employs a pixel-level adaptive fusion mechanism, breaking through the coarse-grained mode of unified fusion weights in traditional methods. This mechanism independently calculates the fusion weight for each pixel in the feature map, effectively addressing the problems of weak feature representation of water bodies and high similarity to surrounding land features in complex scenes.

[0026] 3. In practical applications, this invention demonstrates stable and excellent performance in typical complex scenarios such as semi-dried water bodies, vegetated water bodies, narrow river channels, shaded water bodies, and turbid muddy water. It not only significantly improves the accuracy of water body extraction but also realizes intelligent and refined water body extraction in complex scenarios from high-resolution remote sensing images, providing an effective technical solution for fields such as refined water resource monitoring, flood disaster emergency assessment, and ecological environmental protection.

[0027] Of course, any product implementing this invention does not necessarily need to achieve all of the above advantages at the same time. Attached Figure Description

[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 This is an overall flowchart of the method of the present invention;

[0030] Figure 2 This is a schematic diagram of the overall architecture of the UWFormer network of this invention;

[0031] Figure 3 This is a schematic diagram of the Edge-Guided Inference Module (EWFI) of the present invention;

[0032] Figure 4 This is a schematic diagram of the pixel-shared feature fusion module (PSFF) of the present invention;

[0033] Figure 5 This is a comparison chart of the results of this invention with other methods on the JMW dataset;

[0034] Figure 6 This is a comparison chart of the results of this invention with other methods on the FloodNet dataset;

[0035] Figure 7 This is a comparison of the ablation experimental results of this invention on (a) the JMW dataset and (b) the FloodNet dataset. Detailed Implementation

[0036] 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, and 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.

[0037] A method for extracting water bodies in complex scenes from high-resolution remote sensing images with edge guidance, comprising the following steps:

[0038] Step 1: Training Data Acquisition and Preprocessing

[0039] 1) Acquire high-resolution UAV RGB images with spatial resolution at the centimeter level, covering various complex water body types such as semi-dry water, vegetation cover, narrow river channels, shadow interference, and turbid muddy water;

[0040] 2) Perform detailed manual annotation on the images to generate pixel-level water body labels, where the water body category is assigned a value of 1 and the background category is assigned a value of 0;

[0041] 3) The complete image is cropped using a sliding window at 1024×1024 pixels, with a 30% overlap to ensure the integrity of the boundary area information, and image blocks with more than 80% of the area being invalid information are removed.

[0042] 4) The cropped image-label pairs are randomly divided into training set, validation set and test set in a ratio of 8:1:1 to ensure that the distribution of water body types in complex scenes is balanced in each subset.

[0043] Step 2: Design of the backbone network based on the CNN-Transformer hybrid architecture

[0044] Encoder design: A lightweight ResNet-18 is used as the encoder to extract multi-scale features from the input 1024×1024 pixel RGB image, generating four feature maps {F0, F1, F2, F3} with different resolutions. F0 preserves high-resolution spatial details, while F3 contains high-level semantic information.

[0045] Decoder design: A Transformer decoder is used to restore spatial resolution step by step, and global context information is modeled through a self-attention mechanism to capture long-range dependencies in the water body region;

[0046] Skip connection design: Skip connections are set at each level of the decoder to pass the feature map of the corresponding level of the encoder to the decoder for subsequent feature fusion and edge-guided inference.

[0047] Step 3: Design of the Edge-Guided Reasoning Module

[0048] Based on edge geometric prior information, an edge-guided inference module (EWFI) is designed to enhance the feature representation capability and boundary localization accuracy of water bodies in complex scenarios.

[0049] This module receives the skip connection features and prediction results of the current level, and first uses the Laplacian operator to extract edge features.

[0050] Subsequently, features are enhanced through three complementary inference paths: the background exclusion path identifies potential water areas with low confidence, targeting spectral gradient scenes such as semi-dried water bodies; the boundary-driven path uses gradient information to refine boundary localization, targeting vegetation cover and narrow waterways; and the high-frequency feature path directly enhances edge response, targeting shadows and turbid muddy water.

[0051] The outputs of the three paths are concatenated along the channel dimension and then integrated via convolution. Finally, feature enhancement is achieved through a dual attention mechanism that combines spatial attention optimization and residual connections.

[0052] Step 4: Design of the Pixel-Shared Feature Fusion Module

[0053] Design a pixel-shared feature fusion module (PSFF) to achieve pixel-level adaptive fusion of deep semantic features and shallow geometric features.

[0054] This module adopts a symmetrical dual-branch architecture to process the deep semantic features of the decoder and the shallow geometric features of the skip connections respectively. Both branches use grouped convolution to transform the features and then achieve preliminary fusion by adding them element by element.

[0055] Subsequently, a cascaded dual attention mechanism is introduced to independently calculate the fusion weights for each pixel position: spatial attention captures the overall feature distribution and local saliency of the pixel neighborhood; channel attention uses an adaptive convolution kernel strategy to learn cross-channel feature dependencies.

[0056] Finally, pixel-level feature enhancement and residual connection are used to output the fused features, so that the central region, boundary region and background region of the water body can all obtain differentiated fusion strategies.

[0057] Step 5: Network Training and Optimization

[0058] To ensure that the network can effectively learn the feature representation and boundary localization capabilities of water bodies in complex scenarios, a targeted training strategy is designed.

[0059] A combined loss function is used to balance pixel-level classification accuracy and boundary precision: binary cross-entropy loss ensures that the network can correctly distinguish between water and non-water pixels, while Dice loss effectively improves boundary precision and alleviates class imbalance by measuring the overlap between the predicted results and the true labels. The synergistic effect of the two makes the model focus on both overall classification performance and boundary details.

[0060] An adaptive optimizer is used with appropriate learning rates and batch sizes. During training, diverse data augmentation strategies (random flipping, brightness adjustment, etc.) are employed to simulate different shooting conditions and lighting environments, improving the model's adaptability to real-world scenes. A dynamic learning rate adjustment mechanism is introduced: when validation set performance stagnates, the learning rate is reduced, allowing for more refined parameter optimization in the later stages of training and preventing premature convergence to local optima.

[0061] During the testing phase, a test-time enhancement strategy is used to further improve the stability and robustness of predictions by averaging multiple predictions, enabling the model to maintain good performance even when facing complex, unseen scenarios.

[0062] Step Six: Water Extraction and Result Output in Complex Scenes

[0063] The high-resolution UAV images to be extracted are input into the trained network model to complete the end-to-end inference process from images to water body segmentation results.

[0064] The images are first processed by a lightweight encoder to extract multi-scale features, preserving a complete feature hierarchy from high-resolution spatial details to high-level semantic information, providing rich feature inputs for subsequent edge-guided inference and pixel-level fusion. While the decoder progressively restores the spatial resolution, it models global contextual information through a self-attention mechanism, enabling the model to understand the overall contour and spatial distribution of the water body.

[0065] At each level of the decoder, the EWFI and PSFF modules work together: the EWFI module utilizes edge prior information to enhance the feature representation of water bodies in complex scenes from three perspectives: "region recovery - boundary refinement - structure enhancement," providing high-quality enhanced feature input to the PSFF module; the PSFF module receives these enhanced features and calculates differentiated fusion weights for different spatial locations through a pixel-level adaptive fusion mechanism, ensuring that the center, boundary, and background of the water body are properly positioned. The synergistic effect of the two modules constructs a complete link from feature enhancement to feature fusion, realizing progressive feature recovery from coarse-grained semantics to fine-grained boundaries.

[0066] The decoder ultimately outputs binarized water body segmentation results. For large-format images, a sliding window strategy is used for cropping, and an appropriate overlap is set to ensure the integrity of boundary area information. After prediction, the images are stitched together to generate complete water body extraction results, achieving high-precision water body monitoring over a large area.

[0067] The specific embodiments of the present invention are as follows:

[0068] Example

[0069] This embodiment provides a method for extracting water bodies from complex scenes in high-resolution remote sensing images using edge guidance, such as... Figure 1 As shown, it includes the following steps:

[0070] Step S1: Input of high-resolution UAV images

[0071] High-resolution UAV RGB imagery with centimeter-level spatial resolution was acquired, covering various complex water body types including semi-dry water, vegetation cover, narrow river channels, shadow interference, and turbid muddy water. The imagery was meticulously manually annotated to generate pixel-level water body labels, with a value of 1 for water body categories and 0 for background categories. The complete imagery was then cropped into 1024×1024 pixel sliding windows with a 30% overlap to ensure the integrity of boundary region information, removing image patches with more than 80% invalid information. The cropped image-label pairs were randomly divided into training, validation, and test sets in an 8:1:1 ratio.

[0072] Step S2: Multi-scale feature extraction using a CNN-Transformer hybrid architecture

[0073] A lightweight ResNet-18 encoder is used to extract multi-scale features from the input image. The encoder generates four feature maps {F0, F1, F2, F3} at different resolutions through four downsampling stages, with 64, 128, 256, and 512 feature channels, respectively. A Transformer decoder is used to restore the spatial resolution step by step, with 8 heads and a feedforward network expansion factor of 4. Global context information is modeled through a self-attention mechanism. Skip connections are set at each layer of the decoder to pass the feature maps of the corresponding layers from the encoder to the decoder.

[0074] Step S3: Edge-guided inference module three-path feature enhancement

[0075] This step receives the skip connection feature F_skip and the prediction result P_pred through the edge-guided inference module, and extracts the edge feature F_edge using the Laplacian operator. Features are enhanced through three inference paths: the background exclusion path identifies low-confidence potential water areas using (1-Sigmoid(P_pred)); the boundary-driven path refines boundary localization using Laplacian(Sigmoid(P_pred)); and the high-frequency feature path multiplies F_skip and F_edge to strengthen the edge response. The outputs of the three paths are concatenated along the channel dimension and then integrated through a 3×3 convolution. Feature enhancement is completed through spatial attention optimization and residual connections combined with the CBAM mechanism.

[0076] Step S4: Adaptive fusion of pixel-shared feature fusion module

[0077] This step employs a symmetrical dual-branch architecture to process the deep semantic features F_deep of the decoder and the shallow geometric features F_skip via skip connections. Both branches use grouped convolutions for feature transformation, with the number of groups set to 8. Initial fusion is achieved through element-wise addition to obtain F_fused. A cascaded dual attention mechanism is introduced: spatial attention generates spatial weights through Concat(AvgPool(F_fused), MaxPool(F_fused)) followed by a 7×7 convolution; channel attention uses an adaptive convolution kernel strategy to generate channel weights, with the kernel size k adaptively determined based on the channel dimension. Finally, feature enhancement is achieved through pixel-wise element-wise multiplication and residual connections.

[0078] Step S5: Output of water body segmentation results

[0079] The image to be extracted is input into the trained network model. After the encoder extracts multi-scale features from the image, the EWFI and PSFF modules work together at each level of the decoder to enhance feature representation and adaptively fuse the data. The decoder finally outputs a binarized water body segmentation result. For large-format images, a sliding window strategy is used for cropping with a 30% overlap. After prediction, the images are stitched together to generate a complete water body extraction result.

[0080] After the above steps, a high-performance method for extracting water bodies from complex scenes in high-resolution remote sensing images is finally obtained. This model can quickly and accurately extract water body information from high-resolution remote sensing images of complex scenes.

[0081] The construction process of this embodiment for a water body extraction method for complex scenes based on edge-guided high-resolution remote sensing images is described below:

[0082] 1. Dataset Construction and Preprocessing

[0083] This embodiment constructs a high-resolution UAV water body dataset (JMW) with a spatial resolution of 2cm, collected from Jingmen City, Hubei Province, China. It covers complex scenes including seasonal farmland water systems, vegetated irrigation channels, and semi-dried ponds. The dataset is created from UAV remote sensing images with a pixel size of 184088×123093. After fine annotation, the images are cropped using a 1024×1024 pixel sliding window with a 30% overlap. After quality screening to remove image patches with more than 80% invalid information, 11987 high-quality image-label pairs are obtained, which are divided into a training set of 9594 images, a validation set of 1199 images, and a test set of 1194 images in an 8:1:1 ratio.

[0084] Simultaneously, the FloodNet dataset was used for generalization validation. This dataset provides high-resolution remote sensing imagery of hurricane-affected areas, containing 1339 4000×3000 pixel images. The original 10-category labels—"flooded buildings," "flooded roads," "water," and "pools"—were merged into a single water body category, with the remainder considered background. After cropping and filtering, 9148 valid images were obtained. The construction of both datasets fully considered the diversity of water bodies in complex scenes, providing a solid foundation for model training and validation.

[0085] 2. Network Architecture and Parameter Configuration

[0086] The network employs a CNN-Transformer hybrid architecture. The encoder uses a pre-trained ResNet-18, extracting multi-scale features through four downsampling stages with 64, 128, 256, and 512 channels respectively. The lightweight design of ResNet-18 reduces computational complexity while maintaining feature extraction capabilities. The decoder uses a standard Transformer structure, including multi-head self-attention layers and a feedforward network. The number of heads is set to 8, and the feedforward network expansion factor is 4. Global contextual information is modeled through a self-attention mechanism.

[0087] EWFI and PSFF modules are embedded in each upsampling stage of the decoder. The Laplacian operator of the EWFI module uses a 3×3 convolution kernel, and the number of output channels for each of the three paths of inference is 256. After fusion, attention is optimized by the CBAM module. The number of grouped convolutions in the PSFF module is set to 8, and a 7×7 convolution kernel is used for spatial attention. The adaptive convolution kernel size for channel attention is calculated according to the formula k=|log2(C)+1| / 2.

[0088] 3. Training Strategy and Loss Function

[0089] The model employs the AdamW optimizer with a base learning rate of 6e-4, a weight decay factor of 1e-4, and a batch size of 8. Training utilizes a cosine annealing learning rate scheduling strategy for 40 epochs. Data augmentation includes random vertical flipping, random horizontal flipping, and random brightness adjustment (range 0.8–1.2). During the testing phase, test-time augmentation strategies using vertical and horizontal flipping are employed.

[0090] The loss function uses a combination of binary cross-entropy loss (BCE) and Dice loss, with a weight ratio of 1:1. BCE loss optimizes pixel-level classification accuracy; Dice loss improves boundary accuracy and alleviates class imbalance by measuring the overlap between the predicted results and the true labels.

[0091] 4. Performance Evaluation and Comparative Analysis

[0092] To comprehensively verify the overall performance of this embodiment, a system evaluation was conducted from three aspects: quantitative accuracy, qualitative quality, and the effectiveness of core components. Experimental results show that this embodiment achieves significant performance improvement in water body extraction from complex scenes in high-resolution remote sensing images, and each core module has been proven to play a key role in the final performance improvement.

[0093] In terms of quantitative accuracy, this embodiment achieved excellent performance on both the JMW and FloodNet datasets. On the JMW dataset, it achieved an F1 score of 96.48%, overall accuracy of 95.94%, and an intersection-over-union (IoU) ratio of 92.68%; on the FloodNet dataset, it achieved an F1 score of 92.64%, overall accuracy of 93.61%, and an IoU ratio of 86.24%. Compared with six advanced methods, including DeepLabV3+, UNetformer, DC-Swin, ABCNet, CMTFNet, and CMLFormer, all metrics were optimal, demonstrating that the edge-guided inference and pixel-level adaptive fusion technology framework constructed in this embodiment can effectively address the core challenges of water extraction in complex scenes.

[0094] In terms of qualitative quality, the visualization results further confirm the effectiveness of this embodiment. For example... Figure 5 As shown, on the JMW dataset, this embodiment effectively distinguishes tree shadows from real water bodies in shadow-interference scenarios. The high-frequency feature paths of the EWFI module capture subtle differences in edge responses between shadows and water bodies. In semi-dry water body scenarios, low-confidence regions are recovered through the background exclusion path of the EWFI module, and pixel-level fusion of the PSFF module ensures the integrity of the water body, avoiding obvious fragmented segmentation seen in other methods. In vegetation-covered scenarios, this embodiment accurately separates mixed pixels and completely extracts water body boundaries. Figure 6 As shown, on the FloodNet dataset, this embodiment accurately extracts pool water by identifying the difference between pseudo-boundaries and real boundaries through edge-guided inference in the pool scene; it maintains the linear structure of roads and the rectangular outline of buildings in the muddy water flooding scene; in different turbidity scenes, the PSFF module assigns independent weights to different turbidity areas, achieving accurate differentiation between clear water, slightly turbid water, and heavily turbid muddy water.

[0095] Regarding the effectiveness evaluation of the core modules, this embodiment systematically verified the proposed Edge-Guided Inference Module (EWFI) and Pixel Shared Feature Fusion Module (PSFF). For example... Figure 7As shown, ablation experiments on the JMW and FloodNet datasets demonstrate that adding the EWFI module improves the intersection-union ratio (IU) of the JMW dataset by 0.42% and FloodNet by 0.21%, significantly enhancing the extraction of vegetation-covered and irregularly boundaryed water bodies. The EWFI module supplements boundary information from different angles through three inference paths, significantly improving boundary smoothness and continuity. Adding the PSFF module improves the IU of both datasets by 0.23%. The dual attention mechanism assigns differentiated weights to pixels at different spatial locations, achieving smooth boundary transitions and ensuring regional integrity. Simultaneously adding both modules results in a synergistic enhancement effect, enabling the IU of the JMW dataset to reach 92.68%, achieving complete link optimization from feature enhancement to feature fusion.

[0096] Specialized evaluations of five typical complex water body scenarios (semi-dried water bodies, vegetated water bodies, narrow water bodies, shaded water bodies, and muddy water) further validated the generalization ability of this embodiment. In all five scenarios, this embodiment maintained consistently excellent performance: the EWFI module's background exclusion path addressed the low confidence issue of semi-dried water bodies, the boundary-driven path handled the boundary localization problem of vegetated and narrow water bodies, and the high-frequency feature path addressed the spectral similarity problem of shaded and muddy water. The PSFF module's pixel-level adaptive fusion ensured the effective integration of features at different scales, enabling both large-area semi-dried water bodies and small-scale narrow channels to obtain fusion strategies that matched their feature scales.

[0097] Based on the above evaluation results, this embodiment not only outperforms existing methods in overall accuracy, but its core module's synergistic mechanism has also been verified to have significant technological advancements and performance contributions. By introducing depth of edge geometric priors and a pixel-level adaptive fusion mechanism, this embodiment effectively solves the key technical challenges of insufficient boundary positioning accuracy and weak feature representation ability in water body extraction from complex scenes in high-resolution remote sensing images, providing a complete and effective technical solution for refined monitoring of water bodies in complex scenes.

[0098] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to specific implementations. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims

1. A method for extracting water bodies from complex scenes in high-resolution remote sensing images using edge-guided techniques, characterized in that, Includes the following steps: S1, High-resolution UAV image input; S2, CNN-Transformer hybrid architecture for multi-scale feature extraction; S3, Enhanced three-path features of the edge-guided reasoning module; The edge-guided inference module receives the skip connection feature F_skip and the prediction result P_pred, and extracts the edge feature F_edge using the Laplacian operator. It enhances the features through three inference paths: the background exclusion path identifies low-confidence potential water areas using (1-Sigmoid(P_pred)), the boundary-driven path refines boundary localization using Laplacian(Sigmoid(P_pred)), and the high-frequency feature path multiplies F_skip and F_edge to strengthen the edge response. The outputs of the three paths are concatenated along the channel dimension and then integrated via a 3×3 convolution. Feature enhancement is achieved through spatial attention optimization and residual connections combined with the CBAM mechanism. S4, Pixel-level adaptive fusion of pixel-shared feature fusion module; The pixel-shared feature fusion module adopts a symmetrical dual-branch architecture to process the deep semantic features F_deep of the decoder and the shallow geometric features F_skip of the skip connections. Both branches use grouped convolutions for feature transformation, with the number of groups set to 8. Initial fusion is achieved by element-wise addition to obtain F_fused. A cascaded dual attention mechanism is introduced: spatial attention is generated by Concat(AvgPool(F_fused), MaxPool(F_fused)) followed by a 7×7 convolution to generate spatial weights, and channel attention uses an adaptive convolution kernel strategy to generate channel weights. The convolution kernel size k is adaptively determined according to the channel dimension. Finally, feature enhancement is achieved through pixel-wise element-wise multiplication and residual connections. S5, Output of water segmentation results for complex scenes.

2. The method for extracting water bodies from complex scenes in high-resolution remote sensing images with edge guidance according to claim 1, characterized in that, In step S1, high-resolution UAV RGB images with a spatial resolution of centimeters are acquired; the images are finely annotated manually to generate pixel-level water body labels; and the cropped image-label pairs are randomly divided into training set, validation set and test set in a ratio of 8:1:

1.

3. The method for extracting water bodies from complex scenes in high-resolution remote sensing images with edge guidance according to claim 2, characterized in that, The high-resolution drone RGB imagery covers a variety of complex water body types, including semi-dry water, vegetated water, narrow channels, shadowed areas, and murky water.

4. The method for extracting water bodies in complex scenes from edge-guided high-resolution remote sensing images according to claim 3, characterized in that, After generating pixel-level water body labels, the water body category is assigned a value of 1 and the background category is assigned a value of 0. The complete image is then cropped using a sliding window at 1024×1024 pixels, with a 30% overlap to ensure the integrity of the boundary area information. Image blocks with more than 80% of their area being invalid information are removed.

5. The method for extracting water bodies from complex scenes in high-resolution remote sensing images with edge guidance according to claim 4, characterized in that, In step S2, the encoder uses a lightweight ResNet-18 to extract multi-scale features from the input image, generating four feature maps {F0, F1, F2, F3} at different resolutions through four downsampling stages, with 64, 128, 256, and 512 feature channels, respectively; the decoder uses a Transformer decoder to restore the spatial resolution step by step, with 8 heads and a feedforward network expansion factor of 4, and models global context information through a self-attention mechanism. Skip connections are set at each level of the decoder to pass the feature maps of the corresponding levels of the encoder to the decoder.

6. The method for extracting water bodies from complex scenes in high-resolution remote sensing images with edge guidance according to claim 1, characterized in that, In step S5, the image to be extracted is input into the trained network model. After the encoder extracts multi-scale features from the image, the EWFI module and PSFF module work together at each level of the decoder to enhance feature representation and adaptive fusion. The decoder finally outputs a binarized water body segmentation result; for large-format images, a sliding window strategy is used for cropping, with a 30% overlap, and the complete water body extraction result is generated by stitching after prediction.

Citation Information

Patent Citations

  • Tunnel lining leakage water image segmentation method

    CN117409023A

  • KR20250119370A