SAR image water body submergence range change detection method and device for flood scenario
By employing Lee filtering and histogram equalization preprocessing, ConvNeXt dual-branch network, multi-scale feature fusion unit, and deep supervision, this method solves the problems of noise interference and feature complexity in SAR image flood inundation range detection, achieving high-precision and efficient flood inundation range identification, and is suitable for emergency monitoring in complex flood scenarios.
Patent Information
- Application Number
- CN202610326845.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies for detecting the inundation range of SAR images in flood scenarios suffer from problems such as strong noise interference, complex ground features, insufficient utilization of multi-scale features, and insufficient model adaptability and accuracy, making it difficult to meet the needs of efficient and accurate identification in complex scenarios.
A preprocessing strategy combining Lee filtering and histogram equalization is adopted to suppress speckle noise and enhance contrast. A twin network based on ConvNeXt is used to extract multi-scale features. A plug-and-play multi-scale feature fusion unit and a deep supervision unit are used for feature enhancement and loss supervision to generate an intermediate heat map of the flood area. Finally, the change of water inundation range is detected by the detection head.
It significantly improves detection accuracy and robustness, effectively identifying the inundation range of water bodies in complex mixed flood scenarios such as complete submersion, partial submersion, and receding water. It has good generalization ability and is suitable for the real-time needs of flood disaster emergency monitoring.
Smart Images

Figure CN122265861A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing and recognition technology, and in particular to a method and apparatus for detecting changes in the inundation range of SAR images in flood scenarios. Background Technology
[0002] Floods, as a frequent major natural disaster worldwide, are characterized by their suddenness, wide impact, and destructive power, easily causing casualties, property losses, and ecological damage. Timely and accurate determination of the inundation area of floodwaters is crucial for disaster emergency response, disaster assessment, and post-disaster reconstruction, and is of great significance for improving disaster response efficiency and reducing losses.
[0003] Synthetic Aperture Radar (SAR) technology, with its all-weather, all-day observation capabilities and high-resolution identification of ground features, has become a core tool for flood monitoring. Its advantages are particularly pronounced in scenarios where optical remote sensing is obscured by clouds and rain, enabling rapid capture of surface changes before and after flooding and extraction of the inundation range. With the development of satellite technology, high-resolution, multi-polarization SAR data provides richer support for monitoring. However, actual flood scenarios often involve a mixture of completely submerged, partially submerged, and receding water states, resulting in complex grayscale, texture, and spatial characteristics of ground features, posing a significant challenge to accurate identification.
[0004] However, current flood water body extraction technologies based on SAR imagery still have many shortcomings, making it difficult to meet the needs of accurate and efficient identification in complex scenarios. For example, noise interference leads to low accuracy, gray-level histogram characteristics limit threshold accuracy, classical thresholding methods have poor adaptability and low efficiency, polarization index methods have a narrow range of application, and empirical methods and change detection technologies have limitations. These problems result in existing technologies being insufficient in terms of accuracy, adaptability, and efficiency, and failing to meet the needs of complex flood monitoring. New identification methods are urgently needed to solve these problems. Summary of the Invention
[0005] Therefore, it is necessary to provide a method and device for detecting changes in the inundation range of SAR images in flood scenarios, which can effectively improve detection accuracy and generalization ability, in order to address the above-mentioned technical problems.
[0006] A method for detecting changes in the inundation range of SAR images in flood scenarios, the method comprising:
[0007] Obtain a training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area; The pre-disaster SAR sample images and post-disaster SAR sample images are sequentially preprocessed with speckle noise suppression and contrast enhancement to obtain preprocessed data. The pre-processed pre-disaster SAR sample images and post-disaster SAR sample images are input into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The dual-temporal multi-scale feature map is input into a plug-and-play multi-scale feature fusion unit. The shallow dual-temporal feature map in the dual-temporal multi-scale feature map is used as the fusion reference map. The dual-temporal feature maps of other scales are upsampled to be consistent with the size of the fusion reference map. All scale feature maps are then stitched together along the channel dimension and input into the channel spatial attention unit for feature enhancement to obtain an optimized fusion feature map. Based on the optimized fusion feature map, the detection head generates a predicted detection result; The optimized fusion feature map is input into the deep supervision unit, and the optimized fusion feature map is processed to generate an intermediate heat map. The loss function is calculated based on the intermediate heat map, the corresponding water mask data, and the predicted detection results. The calculation results are used to train the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head until convergence, and the trained detection model is obtained. Acquire pre-disaster and post-disaster SAR images of the area to be detected, perform the preprocessing operations in sequence, and input them into the trained detection model to obtain the detection results of changes in the water inundation range in the post-disaster SAR images.
[0008] In one embodiment, preprocessing operations of speckle noise suppression and contrast enhancement are sequentially performed on pre-disaster SAR sample images and post-disaster SAR sample images, including: The Lee filtering algorithm with a preset pixel filtering window is used to perform adaptive filtering on the entire SAR sample image to achieve speckle noise suppression. The SAR sample images with completed speckle noise suppression are then sliced, and histogram equalization is performed on each image slice. The original gray levels are nonlinearly mapped by calculating the cumulative distribution function of the image to achieve contrast enhancement.
[0009] In one embodiment, the feature extraction Siamese network adopts a two-branch symmetric architecture, with the two branches having the same internal structure. Each branch includes an initial downsampling layer and three subsequent downsampling layers connected in sequence to output feature maps at four scales. The initial downsampling layer includes a max pooling operation block and a basic convolutional block; The three subsequent sequentially connected downsampling layers each include a basic convolutional block; The basic convolutional block sequentially includes a depth-separable convolutional layer, a channel semantic augmentation layer, a grouped convolutional layer, and a channel recovery layer. Layer normalization layers and GELU activation function layers are also set between each layer.
[0010] In one embodiment, the multi-scale feature fusion unit includes an upsampling block, a feature stitching block, and a channel spatial attention unit; The upsampling block performs upsampling processing on feature maps of other scales in the dual-temporal multi-scale feature map except for the shallow dual-temporal feature map, to obtain a feature map of the same size as the fusion reference map. The feature stitching block stitches the feature maps at each scale after upsampling with the fusion reference map along the channel dimension to obtain the multi-scale stitched feature map; The channel spatial attention unit performs feature enhancement on the multi-scale spliced feature map to obtain the optimized fused feature map.
[0011] In one embodiment, the channel spatial attention unit sequentially includes a channel attention block and a spatial attention block; The channel attention block performs global average pooling and global max pooling operations on the multi-scale stitched feature map to compress the feature map into channel description vectors. Then, it performs feature learning and transformation through a shared fully connected network. Finally, it generates channel attention weights through the Sigmoid activation function and uses the channel attention weights to weight the multi-scale stitched feature map. The spatial attention block performs average pooling and max pooling operations on the channel dimension of the weighted multi-scale stitched feature map to obtain two different spatial description feature maps. These two spatial description feature maps are stitched together and then subjected to feature fusion and dimensionality reduction through convolution. The spatial attention weights are then generated by the Sigmoid activation function and used to weight the multi-scale stitched feature map after being weighted by the channel attention weights to obtain the optimized fused feature map.
[0012] In one embodiment, in the depth supervision unit: After upsampling to adjust the spatial size of the optimized fused feature map to match the water mask data, a convolution operation is performed, and the feature values are mapped to the [0,1] interval via the Sigmoid activation function to generate the intermediate heatmap reflecting the confidence level of the flood area.
[0013] In one embodiment, the calculation of the loss function based on the intermediate heatmap, the corresponding water mask data, and the predicted detection results includes: Using intermediate heatmaps as hidden layer predictions and water body mask data as real labels, calculate intermediate monitoring loss; Using the predicted detection results as the final predicted value and the water mask data as the true label, the main detection loss is calculated; The intermediate supervision loss and the main detection loss are weighted and summed according to preset weights to obtain the total training loss of the model.
[0014] In one embodiment, the deep supervision unit dynamically adjusts the convolutional receptive field based on the flood imaging angle information of the input image, directly optimizing the gradient backpropagation process of the hidden layer weights, so that the hidden layer is biased towards the high-discrimination feature map.
[0015] This application also provides a SAR image-based water inundation range change detection device for flood scenarios, the device comprising: The training sample acquisition module is used to acquire a training sample set, which includes SAR sample images of a certain area before floods, SAR sample images of a certain area after floods, and corresponding water mask data. The preprocessing module is used to sequentially perform speckle noise suppression and contrast enhancement on the pre-disaster SAR sample images and post-disaster SAR sample images to obtain preprocessed data. The multi-scale feature extraction module is used to input the pre-processed pre-disaster SAR sample images and post-disaster SAR sample images into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The feature map optimization module is used to input the dual-temporal multi-scale feature map into the plug-and-play multi-scale feature fusion unit, use the shallow dual-temporal feature map in the dual-temporal multi-scale feature map as the fusion reference map, upsample the dual-temporal feature maps of other scales to the same size as the fusion reference map, stitch all scale feature maps along the channel dimension, and then input them into the channel spatial attention unit for feature enhancement to obtain the optimized fusion feature map; The prediction result generation module is used to generate a prediction detection result based on the optimized fusion feature map using the detection head; The network training module is used to input the optimized fusion feature map into the deep supervision unit, process the optimized fusion feature map to generate an intermediate heat map, calculate the loss function based on the intermediate heat map, the corresponding water mask data and the predicted detection results, and use the calculation results to train the feature extraction Siamese network, the multi-scale feature fusion unit and the detection head until convergence, so as to obtain the trained detection model. The water inundation range change detection module is used to acquire pre-disaster SAR images and post-disaster SAR images of the area to be detected. After performing the preprocessing operations in sequence, the images are input into the trained detection model to obtain the water inundation range change detection results in the post-disaster SAR images.
[0016] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps in the above-described method for detecting changes in the inundation range of SAR images for flood scenarios.
[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method for detecting changes in the inundation range of SAR images for flood scenarios.
[0018] The aforementioned method and apparatus for detecting changes in the inundation range of SAR images in flood scenarios involves preprocessing pre-flood SAR sample images and post-flood SAR sample images of the same area by sequentially performing speckle noise suppression and contrast enhancement. The preprocessed pre-flood and post-flood SAR sample images are then input into a dual-branch feature extraction Siamese network with ConvNeXt as its backbone. The two feature extraction branches extract multi-scale feature maps from the pre-flood and post-flood SAR sample images respectively, and the feature maps of the same scale are interacted to generate a dual-temporal multi-scale feature map. This dual-temporal multi-scale feature map is then input into a plug-and-play multi-scale feature fusion unit. The shallow dual-temporal feature map in the dual-temporal multi-scale feature map is used as the fusion reference map, and the dual-temporal feature maps of other scales are upsampled to... After aligning with the fusion baseline image size, all scale feature maps are stitched together along the channel dimension and then input into the channel spatial attention unit for feature enhancement to obtain an optimized fusion feature map. The detection head generates a predicted detection result based on the optimized fusion feature map and inputs it into the deep supervision unit to process the optimized fusion feature map and generate an intermediate heatmap. The loss function is calculated based on the intermediate heatmap, the corresponding water mask data, and the predicted detection result. The calculation result is used to train the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head until convergence, resulting in a trained detection model. The pre-disaster SAR image and post-disaster SAR image of the area to be detected are preprocessed sequentially and then input into the trained detection model to obtain the detection result of the change in water inundation range in the post-disaster SAR image.
[0019] Beneficial effects: This method addresses the technical challenges of strong speckle noise interference, complex ground features, and insufficient utilization of multi-scale features in SAR images during floods, providing a comprehensive solution with significant technical advantages and practical application value. First, a preprocessing strategy combining Lee filtering and histogram equalization effectively suppresses multiplicative speckle noise in SAR images while stretching the image's grayscale dynamic range and enhancing the contrast between land and water areas. This lays a high-quality data foundation for subsequent feature extraction, avoiding feature misjudgments caused by noise and low contrast. Next, a dual-branch Siamese network built on ConvNeXt accurately extracts multi-scale depth features from pre- and post-disaster temporal images. Combined with same-scale feature interaction design, it effectively captures surface change information in flood scenarios, improving the relevance and effectiveness of feature representation. Finally, a plug-and-play multi-scale feature fusion unit, through shallow feature benchmark fusion, multi-scale feature upsampling and stitching, and channel spatial attention enhancement, fully mines the global and local information of high-dimensional and low-dimensional features, effectively solving channel redundancy and spatial similarity problems in feature fusion and enhancing the recognition accuracy of key features such as flood edges. Furthermore, a dual-layer loss supervision mechanism is constructed in the deep supervision unit using intermediate heatmaps. Combined with adaptive adjustment of the convolutional receptive field based on the imaging angle, this directly optimizes the backpropagation process of the hidden layer weight gradients, significantly improving the model's detection accuracy and robustness. Simultaneously, it makes the model more inclined to learn high-discrimination flood features. The overall technical solution of this method balances detection accuracy and inference efficiency. Its lightweight network architecture and modular design adapt to the real-time requirements of flood disaster emergency monitoring. It can effectively identify the inundation range of complex mixed flood scenarios such as complete submersion, partial submersion, and receding water. It exhibits good generalization ability in multi-source SAR imagery, providing reliable technical support for flood disaster emergency rescue and accurate disaster assessment. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a method for detecting changes in the inundation range of SAR images in a flood scenario, as shown in one embodiment. Figure 2 This is a structural block diagram of a SAR image water inundation range change detection device for flood scenarios in one embodiment; Figure 3 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0022] To address the problems in existing technologies, such as strong speckle noise interference in SAR images leading to low accuracy in water body extraction, insufficient grayscale contrast affecting feature differentiation, inadequate utilization of multi-scale features and easy channel redundancy during fusion, and weak generalization ability and limited detection accuracy of flood detection models for complex flood scenarios, this application addresses these issues. Figure 1 As shown, a method for detecting changes in the inundation range of SAR images in flood scenarios is provided, which specifically includes the following steps: Step S100: Obtain the training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area.
[0023] Step S110: Perform speckle noise suppression and contrast enhancement preprocessing on the pre-disaster SAR sample images and post-disaster SAR sample images in sequence to obtain preprocessed data.
[0024] Step S120: Input the pre-disaster SAR sample images and post-disaster SAR sample images into a dual-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps.
[0025] Step S130: Input the dual-temporal multi-scale feature map into the plug-and-play multi-scale feature fusion unit, use the shallow dual-temporal feature map in the dual-temporal multi-scale feature map as the fusion reference map, upsample the dual-temporal feature maps of other scales to the same size as the fusion reference map, stitch all scale feature maps along the channel dimension, and then input them into the channel spatial attention unit for feature enhancement to obtain the optimized fusion feature map.
[0026] Step S140: Using the detection head, generate a predicted detection result based on the optimized fusion feature map.
[0027] Step S150: Input the optimized fusion feature map into the deep supervision unit, process the optimized fusion feature map to generate an intermediate heat map, calculate the loss function based on the intermediate heat map, the corresponding water mask data and the predicted detection results, and use the calculation results to train the feature extraction Siamese network, the multi-scale feature fusion unit and the detection head until convergence, and obtain the trained detection model.
[0028] Step S160: Obtain pre-disaster SAR images and post-disaster SAR images of the area to be detected. Perform preprocessing operations in sequence and input them into the trained detection model to obtain the detection results of changes in the water inundation range in the post-disaster SAR images.
[0029] In step S100, the training sample set used is dual-temporal SAR image data of the same geographical area. The pre-disaster SAR sample image is the normal surface SAR image before the flood disaster, and the post-disaster SAR sample image is the surface SAR image of the area after the flood disaster. The water body mask data is the labeled data of the flood inundation range of the corresponding area, which serves as the real label for model training. Its labeling accuracy matches the resolution of the SAR sample image, ensuring the correspondence between the label and the image features during model training.
[0030] In step S110, addressing the inherent characteristics of strong speckle noise interference and often indistinct gray-level contrast between water and non-water areas in flood disaster SAR images, a combined preprocessing method is proposed. This method first uses the Lee filtering algorithm with edge-preserving properties to smooth the original image, effectively suppressing multiplicative noise while retaining flood-inundated boundaries. Subsequently, histogram equalization is used to perform gray-level stretching on the filtered image, expanding its dynamic range and significantly enhancing the contrast between water bodies and background features, laying the foundation for subsequent flood extraction. Specifically, the first step is to perform speckle noise suppression. The Lee filtering algorithm with a preset pixel filtering window is used to adaptively filter the entire SAR sample image. As an adaptive filter based on local statistical information, the Lee filtering algorithm calculates the mean and variance within the local window of the image and determines the filtering weight factor according to the multiplicative noise model of the SAR image. The filtering intensity is increased in uniform areas of the image to effectively suppress speckle noise, while the filtering intensity is reduced in the edge areas of water bodies and non-water bodies to protect the details of the flood-submerged boundary and avoid subsequent feature extraction errors caused by boundary blurring.
[0031] Specifically, a 7×7 pixel Lee filter window is selected to output a denoised image with significantly reduced noise and clear water edges while balancing noise suppression effect with spatial resolution loss.
[0032] Furthermore, after completing speckle noise suppression, the denoised SAR sample image is sliced. The entire image is divided into several image slices according to a preset size, and then histogram equalization is performed on each image slice. By calculating the cumulative distribution function of the image, the original gray level is nonlinearly mapped to make the gray level probability density of the output image tend to be uniformly distributed. This stretches the gray dynamic range of the image, amplifies the gray level difference between the water area and the background land area, solves the problem of insufficient water-land contrast in SAR images, enhances the recognizability of water-land boundaries, and lays a high-quality data foundation for subsequent feature extraction steps.
[0033] In step S120, a dual-branch feature extraction Siamese network with ConvNeXt as the backbone is designed. This Siamese network is the core feature extraction module. Both feature extraction branches are encoder-decoder architectures, each containing an encoder and decoder corresponding to multi-scale features. It can perform multi-scale depth feature extraction and same-scale feature interaction on pre-disaster and post-disaster dual-temporal images.
[0034] Specifically, the internal network structures of the two feature extraction branches in this Siamese network are exactly the same, and each includes an initial downsampling layer and three subsequent downsampling layers connected in sequence. Through four levels of downsampling operations, four feature maps of different scales are output, as well as four corresponding decoders that perform upsampling in sequence, so as to meet the requirements of multi-scale feature extraction and size restoration.
[0035] Furthermore, the initial downsampling layer of the Siamese network adopts a combination of max pooling operation blocks and basic convolutional blocks. It innovatively replaces the traditional 3×3 convolution with a combination of max pooling and 2×2 convolutions, effectively improving computational efficiency while reducing the feature map size to one-quarter of its original size. The subsequent three sequentially connected downsampling layers each have their own basic convolutional blocks and all use 2×2 convolutions with a stride of 2 to achieve downsampling, ensuring the stability and efficiency of the downsampling process.
[0036] In this embodiment, the basic convolutional blocks constituting each downsampling layer adopt an inverse bottleneck structure, and a grouped convolution mechanism is introduced to improve feature extraction capabilities.
[0037] Specifically, the basic convolutional block sequentially includes a depthwise separable convolutional layer, a 1×1 channel semantic augmentation layer, a grouped convolutional layer, and a 1×1 channel restoration layer. The depthwise separable convolutional layer decomposes standard convolution into depthwise convolution and pointwise convolution, reducing the number of parameters and computation while maintaining feature extraction performance. The 1×1 channel semantic augmentation layer introduces more semantic information by increasing the channel dimension, enriching the feature representation capability. The grouped convolutional layer groups the input feature map according to the channel dimension, allowing each convolutional kernel to process only a specific group, increasing the diagonal correlation of channels within a group and capturing richer local feature patterns. The 1×1 channel restoration layer restores the number of channels to a dimension suitable for the input of subsequent network layers.
[0038] Furthermore, layer normalization layers and GELU activation function layers are set between each layer of the basic convolutional block. The layer normalization layer normalizes all neurons in each sample along the channel dimension, stabilizing the internal covariate shift problem during network training, accelerating model convergence, and is unaffected by batch size. This method abandons the traditional ReLU activation function and adopts the GELU activation function based on the idea of stochastic regularization, providing neurons with a smooth and probabilistic activation mode. At the same time, it reduces the number of GELU activation functions used, avoiding excessive nonlinear transformations that interfere with feature information, effectively preventing model overfitting, and improving the model's generalization ability.
[0039] In this embodiment, two feature extraction branches perform independent multi-scale feature extraction on the pre-disaster SAR sample images and post-disaster SAR sample images, respectively, to obtain multi-scale feature maps for the pre-disaster and post-disaster periods. Then, the pre-disaster feature map and the post-disaster feature map of the same scale are subjected to feature interaction. The pre-disaster and post-disaster feature maps of the same size are directly added and fused to obtain the surface change information of the two time phases, and finally generate a dual-time phase multi-scale feature map, which provides a basis for subsequent feature fusion steps.
[0040] In step S130, the dual-temporal multi-scale feature map is input to the plug-and-play multi-scale feature fusion unit to complete the fusion and enhancement of multi-scale features. The multi-scale feature fusion unit includes an upsampling block, a feature stitching block, and a channel spatial attention unit, and each module works together to complete feature processing.
[0041] Specifically, the upsampling block first upsamples the feature maps at all scales except the shallow bi-temporal feature map in the bi-temporal multi-scale feature map, and then uses interpolation to adjust the size of each scale feature map to match that of the shallow bi-temporal feature map. Figure 1 Among them, the shallow dual-temporal feature map serves as the fusion reference map, preserving the richest spatial detail information.
[0042] Furthermore, the feature stitching block stitches the feature maps at each scale after upsampling with the fusion reference map along the channel dimension to obtain a multi-scale stitched feature map, realizing the initial fusion of high-dimensional and low-dimensional multi-scale features, and fully mining the semantic representation information of global and local land features and floods.
[0043] Furthermore, the multi-scale stitched feature map is input into the channel spatial attention unit for feature enhancement. The channel spatial attention unit includes channel attention blocks and spatial attention blocks. First, the channel attention blocks enhance the channel information related to flood features and suppress irrelevant or weak feature channels. Then, the spatial attention blocks focus on the spatial distribution range and shape characteristics of the flood, thereby achieving adaptive recalibration of features.
[0044] Specifically, the channel attention block performs global average pooling and global max pooling operations on the multi-scale stitched feature map to compress the feature map into channel description vectors. Then, it performs feature learning and transformation through a shared fully connected network. Finally, it generates channel attention weights through the Sigmoid activation function and uses these channel attention weights to weight the multi-scale stitched feature map.
[0045] Specifically, the spatial attention block performs average pooling and max pooling operations on the channel dimension of the weighted multi-scale stitched feature map to obtain two different spatial description feature maps. These two spatial description feature maps are stitched together and then fused and dimensionality reduced through convolution. The spatial attention weights are then generated by the Sigmoid activation function and used to perform a second weighting on the multi-scale stitched feature map weighted by the channel attention weights. Finally, an optimized fused feature map is obtained. This feature map effectively solves the channel redundancy and spatial similarity problems in multi-scale feature fusion, highlights the key features of flood, and improves the recognizability of features.
[0046] In step S140, the detection head adopts a combination structure of convolutional layers and activation function layers. Specifically, after the optimized fused feature map is input into the detection head, it first performs feature dimensionality reduction and classification through a 1×1 convolutional layer, and then maps the feature values to the [0,1] interval through a Sigmoid activation function to generate a confidence map reflecting that each pixel is a water body. The confidence map is then binarized according to a preset threshold to obtain the predicted detection result of the water body inundation range, thus realizing the preliminary detection of the flood inundation range.
[0047] In step S150, the deep supervision unit is used to process the optimized fusion feature map and complete the training and optimization of the model.
[0048] In this embodiment, on the dual-branch feature extraction Siamese network, the second decoder of the network and the decoder that outputs the second-scale feature map are specifically configured, and an additional deep supervision unit is added to them. This design introduces a deep supervision optimization mechanism to the encoder and the first two decoders of the entire network. Through this mechanism, the model can be guided to learn feature information at different levels, thereby effectively improving the accuracy and reliability of flood change detection results.
[0049] Specifically, the pre-disaster and post-disaster feature maps of the same size as the output of the second decoder are then processed by the multi-scale feature fusion unit to obtain the optimized fusion feature map, namely the second-scale optimized fusion feature map. This feature map is then input into the deep supervision unit for processing to generate an intermediate heatmap.
[0050] Furthermore, in the deep supervised unit, during model training, the following is adopted: The function upsamples the second-scale optimized fusion feature map, adjusting its spatial size to match the water mask data. It then performs convolution to reduce the dimensionality, and subsequently maps the feature values to the [0,1] interval using the Sigmoid activation function. This yields an intermediate heatmap reflecting the confidence level of the flood area. This intermediate heatmap serves as the prediction result for the network's hidden layers, effectively supervising the model's intermediate training process.
[0051] Furthermore, the loss function is calculated based on the intermediate heatmap, the corresponding water mask data, and the predicted detection results. The calculation process is divided into two parts: intermediate supervision loss and main detection loss. Using the intermediate heatmap as the hidden layer predicted value and the water mask data as the ground truth label, the intermediate supervision loss is calculated using the cross-entropy loss function. Then, using the predicted detection results as the final predicted value and the water mask data as the ground truth label, the main detection loss is calculated using the cross-entropy loss function. The intermediate supervision loss and the main detection loss are then weighted and summed according to preset weights to obtain the total training loss of the model.
[0052] The intermediate supervision loss function used in its training is expressed as:
[0053] In the above formula, This represents the predicted feature heatmap output by the second decoder (De_2) for the b-th batch of samples. Let represent the true label of the i-th pixel, where is the one-hot label for the water mask data, where 1 = water and 0 = non-water. B represents the batch size of the samples in the training set. This represents the total number of pixels in the feature map within a single batch, used to normalize the loss value. This represents the upsampling function, used to adjust the size of the decoder's output feature map to match the real label.
[0054] The main detection loss function used in its training is expressed as:
[0055] In the above formula, This represents the predicted feature heatmap output by the AIRFloodNet network for the b-th batch of samples. This represents the true label of the b-th batch sample.
[0056] In this embodiment, the weight ratio of the two loss functions can be adjusted according to the model training requirements to achieve dual supervision of the hidden layer and the output layer. The total training loss of the model is backpropagated to each network layer of the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head. The weight parameters of each network layer are updated using the gradient descent algorithm. The above training process is repeated until the total training loss of the model tends to stabilize and the model converges, resulting in a trained detection model with stable flood inundation range detection capability.
[0057] Furthermore, the deep supervision unit can dynamically adjust the convolutional receptive field based on the flood imaging angle information of the input image, directly optimizing the gradient backpropagation process of the hidden layer weights, making the hidden layer more inclined to learn high-discrimination flood feature maps, thereby further improving the detection accuracy and robustness of the model.
[0058] In this embodiment, the AIRFloodNet network architecture, i.e., the detection model, is built from a trained dual-branch feature extraction Siamese network, a plug-and-play multi-scale feature fusion unit, and a detection head.
[0059] In step S160, when actually detecting the flood inundation range of the area to be detected, the pre-disaster SAR image and post-disaster SAR image of the area are first acquired. Following the same operation as in step S110, the preprocessing operations of speckle noise suppression and contrast enhancement are performed sequentially to ensure that the data to be detected is consistent with the data processing standards of the training sample set. Then, the preprocessed dual-temporal SAR image to be detected is input into the trained detection model. The model will sequentially complete the steps of multi-scale feature extraction, multi-scale feature fusion enhancement, and detection head prediction, and finally output the detection result of the change in the flood inundation range in the post-disaster SAR image of the area to be detected, so as to achieve accurate identification of the flood inundation range.
[0060] The aforementioned method for detecting changes in the inundation range of SAR images in flood scenarios can be applied to flood detection tasks using various medium-resolution SAR images. It can effectively identify the inundation range of water bodies in complex mixed flood scenarios, including complete submersion, partial submersion, and receding water levels, solving the problems of poor adaptability and low detection accuracy in existing technologies for complex flood scenarios. Furthermore, this method employs a lightweight network architecture design, with each module possessing high computational efficiency. While improving detection accuracy, it also considers the limitations of terminal computing resources, meeting the real-time requirements of flood disaster emergency monitoring. The model also exhibits good generalization ability in multi-source SAR images, providing reliable technical support for emergency rescue, disaster assessment, and post-disaster reconstruction in flood disasters.
[0061] It should be understood that, although Figure 1The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Furthermore, Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0062] In one embodiment, such as Figure 2 As shown, a SAR image-based device for detecting changes in the inundation range of flooded areas is provided, comprising: a training sample acquisition module 200, a preprocessing module 210, a multi-scale feature extraction module 220, a feature map optimization module 230, a prediction result generation module 240, a network training module 250, and a water inundation range change detection module 260, wherein: The training sample acquisition module 200 is used to acquire a training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area. The preprocessing module 210 is used to sequentially perform speckle noise suppression and contrast enhancement on the pre-disaster SAR sample images and post-disaster SAR sample images to obtain preprocessed data. The multi-scale feature extraction module 220 is used to input the pre-processed pre-disaster SAR sample images and post-disaster SAR sample images into a dual-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The feature map optimization module 230 is used to input the dual-temporal multi-scale feature map into the plug-and-play multi-scale feature fusion unit, use the shallow dual-temporal feature map in the dual-temporal multi-scale feature map as the fusion reference map, upsample the dual-temporal feature maps of other scales to the same size as the fusion reference map, stitch all scale feature maps along the channel dimension, and then input them into the channel space attention unit for feature enhancement to obtain the optimized fusion feature map; The prediction result generation module 240 is used to generate a prediction detection result based on the optimized fusion feature map using the detection head; The network training module 250 is used to input the optimized fusion feature map into the deep supervision unit, process the optimized fusion feature map to generate an intermediate heat map, calculate the loss function based on the intermediate heat map, the corresponding water mask data and the predicted detection results, and use the calculation results to train the feature extraction Siamese network, the multi-scale feature fusion unit and the detection head until convergence, so as to obtain the trained detection model. The water inundation range change detection module 260 is used to acquire pre-disaster SAR images and post-disaster SAR images of the area to be detected, and after performing the preprocessing operations in sequence, it is input into the trained detection model to obtain the water inundation range change detection results in the post-disaster SAR images.
[0063] Specific limitations regarding the SAR image flood inundation range change detection device for flood scenarios can be found in the limitations of the SAR image flood inundation range change detection method for flood scenarios described above, and will not be repeated here. Each module in the aforementioned SAR image flood inundation range change detection device for flood scenarios can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0064] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for detecting changes in the inundation range of SAR images in flood scenarios. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device casing, or an external keyboard, touchpad, or mouse.
[0065] Those skilled in the art will understand that Figure 3The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0066] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: Obtain a training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area; The pre-disaster SAR sample images and post-disaster SAR sample images are sequentially preprocessed with speckle noise suppression and contrast enhancement to obtain preprocessed data. The pre-processed pre-disaster SAR sample images and post-disaster SAR sample images are input into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The dual-temporal multi-scale feature map is input into a plug-and-play multi-scale feature fusion unit. The shallow dual-temporal feature map in the dual-temporal multi-scale feature map is used as the fusion reference map. The dual-temporal feature maps of other scales are upsampled to be consistent with the size of the fusion reference map. All scale feature maps are then stitched together along the channel dimension and input into the channel spatial attention unit for feature enhancement to obtain an optimized fusion feature map. Based on the optimized fusion feature map, the detection head generates a predicted detection result; The optimized fusion feature map is input into the deep supervision unit, and the optimized fusion feature map is processed to generate an intermediate heat map. The loss function is calculated based on the intermediate heat map, the corresponding water mask data, and the predicted detection results. The calculation results are used to train the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head until convergence, and the trained detection model is obtained. Acquire pre-disaster and post-disaster SAR images of the area to be detected, perform the preprocessing operations in sequence, and input them into the trained detection model to obtain the detection results of changes in the water inundation range in the post-disaster SAR images.
[0067] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain a training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area; The pre-disaster SAR sample images and post-disaster SAR sample images are sequentially preprocessed with speckle noise suppression and contrast enhancement to obtain preprocessed data. The pre-processed pre-disaster SAR sample images and post-disaster SAR sample images are input into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The dual-temporal multi-scale feature map is input into a plug-and-play multi-scale feature fusion unit. The shallow dual-temporal feature map in the dual-temporal multi-scale feature map is used as the fusion reference map. The dual-temporal feature maps of other scales are upsampled to be consistent with the size of the fusion reference map. All scale feature maps are then stitched together along the channel dimension and input into the channel spatial attention unit for feature enhancement to obtain an optimized fusion feature map. Based on the optimized fusion feature map, the detection head generates a predicted detection result; The optimized fusion feature map is input into the deep supervision unit, and the optimized fusion feature map is processed to generate an intermediate heat map. The loss function is calculated based on the intermediate heat map, the corresponding water mask data, and the predicted detection results. The calculation results are used to train the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head until convergence, and the trained detection model is obtained. Acquire pre-disaster and post-disaster SAR images of the area to be detected, perform the preprocessing operations in sequence, and input them into the trained detection model to obtain the detection results of changes in the water inundation range in the post-disaster SAR images.
[0068] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0069] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0070] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for detecting changes in the inundation range of SAR images in flood scenarios, characterized in that, The method includes: Obtain a training sample set, which includes pre-flood SAR sample images, post-flood SAR sample images, and corresponding water mask data for a certain area; The pre-disaster SAR sample images and post-disaster SAR sample images are sequentially preprocessed with speckle noise suppression and contrast enhancement to obtain preprocessed data. The pre-processed pre-disaster SAR sample images and post-disaster SAR sample images are input into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The dual-temporal multi-scale feature map is input into a plug-and-play multi-scale feature fusion unit. The shallow dual-temporal feature map in the dual-temporal multi-scale feature map is used as the fusion reference map. The dual-temporal feature maps of other scales are upsampled to be consistent with the size of the fusion reference map. All scale feature maps are then stitched together along the channel dimension and input into the channel spatial attention unit for feature enhancement to obtain an optimized fusion feature map. Based on the optimized fusion feature map, the detection head generates a predicted detection result; The optimized fusion feature map is input into the deep supervision unit, and the optimized fusion feature map is processed to generate an intermediate heat map. The loss function is calculated based on the intermediate heat map, the corresponding water mask data, and the predicted detection results. The calculation results are used to train the feature extraction Siamese network, the multi-scale feature fusion unit, and the detection head until convergence, and the trained detection model is obtained. Acquire pre-disaster and post-disaster SAR images of the area to be detected, perform the preprocessing operations in sequence, and input them into the trained detection model to obtain the detection results of changes in the water inundation range in the post-disaster SAR images.
2. The method for detecting changes in the inundation range of SAR images in flood scenarios according to claim 1, characterized in that, Preprocessing operations, including speckle noise suppression and contrast enhancement, were performed sequentially on pre-disaster SAR sample images and post-disaster SAR sample images, including: The Lee filtering algorithm with a preset pixel filtering window is used to perform adaptive filtering on the entire SAR sample image to achieve speckle noise suppression. The SAR sample images with completed speckle noise suppression are then sliced, and histogram equalization is performed on each image slice. The original gray levels are nonlinearly mapped by calculating the cumulative distribution function of the image to achieve contrast enhancement.
3. The method for detecting changes in water inundation range in SAR images for flood scenarios according to claim 1, characterized in that, The feature extraction Siamese network adopts a two-branch symmetric architecture, with the two branches having the same internal structure. Each branch includes an initial downsampling layer and three subsequent downsampling layers connected in sequence to output feature maps at four scales. The initial downsampling layer includes a max pooling operation block and a basic convolutional block; The three subsequent sequentially connected downsampling layers each include a basic convolutional block; The basic convolutional block sequentially includes a depth-separable convolutional layer, a channel semantic augmentation layer, a grouped convolutional layer, and a channel recovery layer. Layer normalization layers and GELU activation function layers are also set between each layer.
4. The method for detecting changes in water inundation range in SAR images for flood scenarios according to claim 1, characterized in that, The multi-scale feature fusion unit includes an upsampling block, a feature splicing block, and a channel spatial attention unit; The upsampling block performs upsampling processing on feature maps of other scales in the dual-temporal multi-scale feature map except for the shallow dual-temporal feature map, to obtain a feature map of the same size as the fusion reference map. The feature stitching block stitches the feature maps at each scale after upsampling with the fusion reference map along the channel dimension to obtain the multi-scale stitched feature map; The channel spatial attention unit performs feature enhancement on the multi-scale spliced feature map to obtain the optimized fused feature map.
5. The method for detecting changes in the inundation range of SAR images in flood scenarios according to claim 4, characterized in that, The channel spatial attention unit includes a channel attention block and a spatial attention block in sequence; The channel attention block performs global average pooling and global max pooling operations on the multi-scale stitched feature map to compress the feature map into channel description vectors. Then, it performs feature learning and transformation through a shared fully connected network. Finally, it generates channel attention weights through the Sigmoid activation function and uses the channel attention weights to weight the multi-scale stitched feature map. The spatial attention block performs average pooling and max pooling operations on the channel dimension of the weighted multi-scale stitched feature map to obtain two different spatial description feature maps. These two spatial description feature maps are stitched together and then subjected to feature fusion and dimensionality reduction through convolution. The spatial attention weights are then generated by the Sigmoid activation function and used to weight the multi-scale stitched feature map after being weighted by the channel attention weights to obtain the optimized fused feature map.
6. The method for detecting changes in the inundation range of SAR images in flood scenarios according to claim 5, characterized in that, In the depth supervision unit: After upsampling to adjust the spatial size of the optimized fused feature map to match the water mask data, a convolution operation is performed, and the feature values are mapped to the [0,1] interval via the Sigmoid activation function to generate the intermediate heatmap reflecting the confidence level of the flood area.
7. The method for detecting changes in the inundation range of SAR images in flood scenarios according to claim 6, characterized in that, The calculation of the loss function based on the intermediate heatmap, the corresponding water mask data, and the predicted detection results includes: Using intermediate heatmaps as hidden layer predictions and water body mask data as real labels, calculate intermediate monitoring loss; Using the predicted detection results as the final predicted value and the water mask data as the true label, the main detection loss is calculated; The intermediate supervision loss and the main detection loss are weighted and summed according to preset weights to obtain the total training loss of the model.
8. The method for detecting changes in the inundation range of SAR images in flood scenarios according to claim 7, characterized in that, The deep supervision unit dynamically adjusts the convolution receptive field based on the flood imaging angle information of the input image, directly optimizing the gradient backpropagation process of the hidden layer weights, so that the hidden layer is biased towards high-discrimination feature maps.
9. A device for detecting changes in the inundation range of SAR images in flood scenarios, characterized in that, The device includes: The training sample acquisition module is used to acquire a training sample set, which includes SAR sample images of a certain area before floods, SAR sample images of a certain area after floods, and corresponding water mask data. The preprocessing module is used to sequentially perform speckle noise suppression and contrast enhancement on the pre-disaster SAR sample images and post-disaster SAR sample images to obtain preprocessed data. The multi-scale feature extraction module is used to input the pre-processed pre-disaster SAR sample images and post-disaster SAR sample images into a two-branch feature extraction twin network with ConvNeXt as the backbone. The two feature extraction branches extract multi-scale feature maps of the pre-disaster and post-disaster SAR sample images respectively, and the feature maps of the same scale are interacted to generate dual-temporal multi-scale feature maps. The feature map optimization module is used to input the dual-temporal multi-scale feature map into the plug-and-play multi-scale feature fusion unit, use the shallow dual-temporal feature map in the dual-temporal multi-scale feature map as the fusion reference map, upsample the dual-temporal feature maps of other scales to the same size as the fusion reference map, stitch all scale feature maps along the channel dimension, and then input them into the channel spatial attention unit for feature enhancement to obtain the optimized fusion feature map; The prediction result generation module is used to generate a prediction detection result based on the optimized fusion feature map using the detection head; The network training module is used to input the optimized fusion feature map into the deep supervision unit, process the optimized fusion feature map to generate an intermediate heat map, calculate the loss function based on the intermediate heat map, the corresponding water mask data and the predicted detection results, and use the calculation results to train the feature extraction Siamese network, the multi-scale feature fusion unit and the detection head until convergence, so as to obtain the trained detection model. The water inundation range change detection module is used to acquire pre-disaster SAR images and post-disaster SAR images of the area to be detected. After performing the preprocessing operations in sequence, the images are input into the trained detection model to obtain the water inundation range change detection results in the post-disaster SAR images.
