Method for extracting flood inundation range of arid region based on TCN-Net model

By combining Sentinel-1 and Sentinel-2 imagery, the TCN-Net model solves the problem of low accuracy in extracting the flood inundation range in arid areas, achieving accurate capture and rapid response to flood events in arid areas, and overcoming the limitations and interference factors of traditional methods.

CN120912967APending Publication Date: 2025-11-07NORTHWEST NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511031127.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing technologies for flood monitoring in arid areas suffer from limitations such as single data source constraints, insufficient robustness and generalization ability of traditional thresholding methods, and the influence of factors such as vegetation and mountain shadows, resulting in low accuracy in extracting the flood inundation range.

Method used

A method based on the TCN-Net model is adopted, which combines Sentinel-1 and Sentinel-2 images. Feature extraction is performed through the TCN-Net model group. Convolutional attention modules and hybrid CNN-Transformer layers are used to optimize feature extraction. Deep learning is combined to overcome the limitations of traditional methods and achieve accurate extraction of the flood inundation range in arid areas.

Benefits of technology

It significantly improves the accuracy and speed of flood event detection and response in arid areas, overcomes interference from vegetation and mountain shadows, enhances the accuracy and efficiency of flood extent extraction, and provides rapid disaster response support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912967A_ABST
    Figure CN120912967A_ABST
Patent Text Reader

Abstract

The invention discloses a method for extracting a flood inundation range of an arid region based on a TCN-Net model, and belongs to the technical field of remote sensing geoscience application. The method comprises the following steps: acquiring Sentinel-1 image pairs and Sentinel-2 image pairs of a plurality of sub-regions in an arid region, preprocessing the Sentinel-1 image pairs and the Sentinel-2 image pairs, marking a water body region, and constructing a training data set; a TCN-Net model group is constructed, and the training data set is used for training; and for the arid region where the flood occurs, obtaining Sentinel-1 images or Sentinel-2 images before and after the flood occurs in the region, inputting the obtained images into the trained TCN-Net model group to obtain corresponding binary images, subtracting the binary images, converting the binary images into vector data, obtaining the flood inundation region, and completing extraction of the flood inundation range of the arid region. The method can quickly and effectively obtain the flood inundation range, and is suitable for flood monitoring application in arid regions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of remote sensing geosciences, and particularly relates to a method for extracting a flood inundation range in a dry area based on a TCN-Net model. BACKGROUND

[0002] At present, global climate change is significant, leading to an increase in the frequency of extreme precipitation and the occurrence of natural disasters such as floods. The dry area is wide and sparsely populated, has poor water conservation capacity, and is characterized by prominent snowmelt flood phenomena. The ground hydrological observation facilities and system are insufficient to cope with the characteristics of the suddenness, short duration and high difficulty of prediction of floods in the area. In view of the above difficulties, remote sensing technology has gradually become the main method for flood monitoring in the dry area due to its wide coverage and short revisit time. Among them, optical remote sensing satellite images and microwave remote sensing satellite images are widely used for dynamic monitoring of floods, providing important data support for sudden flood monitoring and flood warning.

[0003] At present, many scholars have carried out in-depth research on various methods for flood range disaster monitoring. In this case, the Sentinel-1 satellite synthetic aperture radar images and Sentinel-2 satellite optical remote sensing images of the European Space Agency (ESA) have been widely used in related research due to their advantages of free access and high temporal and spatial resolution. Sentinel-1 is operated by double satellites (A / B) with a revisit period of 6 days. Sentinel-2 is also composed of double satellites (A / B) with a revisit period of 5 days. These two kinds of data also have advantages and disadvantages. Sentinel-2 images have high accuracy in extracting floods, but are seriously affected by clouds, resulting in information loss. Sentinel-1 images have the ability to penetrate clouds and can be observed all-weather, but geometric distortion and image speckle noise caused by terrain can reduce the accuracy of flood extraction. In view of the above situation, the alternation of Sentinel-1 and Sentinel-2 images can effectively overcome the limitations of a single data source. Through complementary advantages, not only the temporal resolution can be improved, but also the probability of capturing short-term flood events can be effectively improved.

[0004] When using remote sensing images to extract floods in the dry area, they are also affected by factors such as high sediment content of floods, vegetation and mountain shadows. The traditional threshold method faces challenges in robustness and generalization ability when extracting floods, so there is an urgent need for a method for extracting the flood inundation range in the dry area to solve related problems. SUMMARY

[0005] To solve the problems in the prior art, the application provides a method for extracting a flood inundation range in a dry area based on a TCN-Net model.

[0006] The technical scheme of the application is as follows:

[0007] The application discloses a method for extracting a flood inundation range in a drought area based on a TCN-Net model.

[0008] Sentinel-1 image pairs and Sentinel-2 image pairs of a plurality of sub-regions in the drought area are acquired and preprocessed, the water body regions of the preprocessed Sentinel-1 image pairs and Sentinel-2 image pairs are labeled, and a training data set is constructed; a TCN-Net model group is constructed and trained by using the training data set; wherein the Sentinel-1 image pairs include Sentinel-1 images before and after the occurrence of floods in the sub-regions, and the Sentinel-2 image pairs include Sentinel-2 images before and after the occurrence of floods in the sub-regions.

[0009] The TCN-Net model group includes four TCN-Net models, the TCN-Net model has the same encoder-decoder architecture as the U-Net model, the upper two layers of the encoder-decoder architecture are connected by a convolution block attention module to realize a skip connection, a hybrid CNN-Transformer layer is embedded before the last two down-sampling layers of the encoder, and a hybrid CNN-Transformer layer is also embedded after the first two up-sampling layers of the decoder; for the drought area where floods occur, Sentinel-1 images or Sentinel-2 images before and after the occurrence of floods in the region are acquired, the acquired images are input into the trained TCN-Net model group to obtain corresponding binary images, the binary images are subtracted, the result is converted into vector data, the flood inundation area is obtained, and the extraction of the flood inundation range in the drought area is completed.

[0010] Further, the mixed CNN-Transformer layer is composed of two cascaded CNN-Transformer modules, the first CNN-Transformer module includes two 1*1 convolution layers, a residual convolution block and a window-based Transformer block; the second CNN-Transformer module includes two 1*1 convolution layers, a residual convolution block and a shift window-based Transformer block. Further, when the mixed CNN-Transformer layer receives the feature map, the first CNN-Transformer module processes the feature map first, one 1*1 convolution layer of the first CNN-Transformer module first extracts features from the feature map and outputs the extracted feature map, then the extracted feature map is segmented into two parts of equal size, one part is input into the residual convolution block for local feature capture, and the other part is input into the window-based Transformer block for global dependency capture using window multi-head self-attention mechanism, the residual convolution block outputs the first feature map, the window-based Transformer block outputs the second feature map, and then the first feature map and the second feature map are connected along the channel dimension, and then the connection result is input into another 1*1 convolution layer, which outputs the third feature map; finally, the third feature map and the feature map input into the first CNN-Transformer module are fused, and the fusion result is output to the second CNN-Transformer module;

[0011] One 1*1 convolution layer of the second CNN-Transformer module first extracts features from the fusion result and outputs the extracted feature map, then the extracted feature map is segmented into two parts of equal size, one part is input into the residual convolution block for local feature capture, and the other part is input into the shift window-based Transformer block for non-local feature learning using shift window multi-head self-attention mechanism, the residual convolution block outputs the fourth feature map, the shift window-based Transformer block outputs the fifth feature map, and then the fourth feature map and the fifth feature map are connected along the channel dimension, and then the connection result is input into another 1*1 convolution layer, which outputs the sixth feature map; finally, the sixth feature map and the fusion result input into the second CNN-Transformer module are fused, and the fusion result is the output of the mixed CNN-Transformer layer.

[0012] Compared with the prior art, the beneficial effects of the present application are:

[0013] Combining Sentinel-1 image and Sentinel-2 image alternately can break the limitation of single data source, and can accurately capture the flood event in the arid region; deep learning solves the robustness and generalization ability problem of traditional threshold algorithm in extracting the flood submerged area, and overcomes the influence of vegetation, mountain shadow, snow and cloud; TCN-Net further optimizes the feature extraction performance of the model by adding CBAM module, and the CNN-Transformer double branch module can extract local and global feature information; the TCN-Net model automatically processes Sentinel-1 / 2 satellite images, quickly generates a flood distribution map, significantly improves the disaster response speed, and greatly improves the work efficiency and scientific decision-making ability. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 is a method flow chart for extracting the flood submerged area in the arid region based on the TCN-Net model provided by the application;

[0015] Figure 2 is a structure diagram of the TCN-Net model provided by the application;

[0016] Figure 3 is a structure diagram of the convolution attention module CBAM provided by the application;

[0017] Figure 4 is a structure diagram of the fusion channel attention module CAB provided by the application;

[0018] Figure 5 is a structure diagram of the spatial attention module SAM provided by the application;

[0019] Figure 6 is a structure diagram of the hybrid CNN-Transformer layer provided by the application;

[0020] Figure 7 is a prediction display diagram of the Sentinel-2 image pair based on the TCN-Net model provided by the application;

[0021] Figure 8 is a prediction display diagram of the Sentinel-1 image pair based on the TCN-Net model provided by the application;

[0022] Figure 9 is a flood submerged area prediction display diagram of a certain area Sentinel-2 image pair provided by the application;

[0023] Figure 10 is a flood submerged area prediction display diagram of a certain area Sentinel-1 image pair provided by the application. DETAILED DESCRIPTION

[0024] The present application will be further described and illustrated with reference to the specific embodiments. The embodiments are only exemplary and do not limit the scope of the disclosure. The technical features of various embodiments of the present application can be combined as appropriate without conflict.

[0025] The present application mainly provides a method for extracting a flood inundation area in a drought area based on a TCN-Net model. The method fully extracts the features of Sentinel-1 images and Sentinel-2 images by using the TCN-Net model, extracts the flood inundation result, overcomes the interference of clouds, snow, and terrain in identifying the flood area by the traditional threshold algorithm, and improves the flood area extraction accuracy. The network structure of the TCN-Net model is designed based on an encoder-decoder. The convolution attention module (CBAM) is added between the two layers of the encoder and the decoder. The hybrid CNN-Transformer module is added before the second downsampling of the encoder and after the first two upsampling of the decoder. The TCN-Net model solves the problems of the traditional threshold method, such as being limited by the regional threshold and being affected by the interference of mountain shadows, vegetation, and other ground objects, and can accurately extract the flood inundation area in the drought area.

[0026] As shown in Figure 1 The technical scheme of the method for extracting a flood inundation area in a drought area based on a TCN-Net model is as follows:

[0027] Step 1: Obtain Sentinel-1 image pairs and Sentinel-2 image pairs of multiple sub-regions in the drought area and pre-process

[0028] The Sentinel-1 image pairs include Sentinel-1 images before and after the flood, and the Sentinel-2 image pairs include Sentinel-2 images before and after the flood. The Sentinel-1 image pairs and the Sentinel-2 image pairs are taken in the same region of the drought area.

[0029] In view of the characteristics of strong suddenness, short duration, low predictability and prominent snowmelt flood phenomenon of floods in arid regions, the application uses Sentinel-1 satellite synthetic aperture radar images (i.e. Sentinel-1 images) and Sentinel-2 satellite optical remote sensing images (i.e. Sentinel-2 images) of the European Space Agency (ESA), the Sentinel-1 images are operated by double satellites (A / B) with a revisit period of 6 days; the Sentinel-2 images are also composed of double satellites (A / B) with a revisit period of 5 days. These two kinds of image data also have advantages and disadvantages, the Sentinel-2 image has high accuracy in extracting flood, but is seriously affected by clouds, resulting in information loss; the Sentinel-1 image has the ability to penetrate clouds and can realize all-weather observation, but the geometric distortion caused by terrain and image speckle noise will reduce the accuracy of extracting flood.

[0030] In view of the above situation, the Sentinel-1 image and the Sentinel-2 image are used alternately, which can effectively break through the limitation of single data source. Through complementary advantages, not only the time resolution can be improved, but also the probability of capturing short-term flood events can be effectively improved. In order to further enhance the accuracy of flood extraction, the application also obtains the Slope data in the NASA SRTM DEM 30m data set in the same area as the Sentinel-1 image as auxiliary data. The specific operation is: visualizing the Slope data to obtain a Slope image, resampling the VV polarization band and the VH polarization band of the image in the Sentinel-1 image pair and the Slope image, and then performing data fusion after unifying the spatial resolution to 10 meters to generate a 3-channel image to enhance the water body recognition ability and improve the flood extraction accuracy. That is, the VV polarization band and the VH polarization band of the resampled Sentinel-1 image before the flood and the resampled Slope image are channel fused to obtain a first fused Sentinel-1 image; the VV polarization band and the VH polarization band of the resampled Sentinel-1 image after the flood and the resampled Slope image are channel fused to obtain a second fused Sentinel-1 image.

[0031] The eighth band (near infrared), the eleventh band (short wave infrared) and the second band (blue light) of the Sentinel-2 image are used, the image in the Sentinel-2 image pair is resampled to 10m spatial resolution, the resampled Sentinel-2 image before the flood occurs and the resampled Sentinel-2 image after the flood occurs are obtained, and the resampled Sentinel-2 image can show good discrimination effect and application advantage in the extraction of water body information in the arid region. Finally, in order to facilitate subsequent data processing and analysis, the geographic coordinate system of the first fused Sentinel-1 image, the second fused Sentinel-1 image and the image in the resampled Sentinel-2 image pair is unified to EPSG: 4326, so as to ensure the consistency of different data sources in spatial position. Finally, the image size consistency adjustment is performed on the first fused Sentinel-1 image, the second fused Sentinel-1 image and the image in the Sentinel-2 image pair after the unified geographic coordinate system, and the pretreatment is completed.

[0032] Second step: making arid region flood training data set

[0033] Otsu as a classic threshold segmentation algorithm has been widely used and recognized in the extraction of flood using Sentinel-1 image, but the extraction effect is not good in the special geographical environment of arid region. In view of this problem, by introducing ground elevation data and global land use data set for constraint, the more accurate extraction of flood in arid region is successfully realized. The core of Otsu algorithm is to calculate the between-class variance under each possible threshold, and then select the threshold with the maximum between-class variance as the best threshold. The calculation formula is as follows:

[0034]

[0035] is the between-class variance; t represents the current suitable threshold; ω0(t) and ω1(t) represent the proportion of pixels below and above the threshold t respectively; μ0(t) and μ1(t) are the average gray values of all pixels below and above the threshold t respectively.

[0036] Therefore, the Otsu method is used to preliminarily label the water body region of the image in the pretreated Sentinel-1 image pair, and then the image in the preliminarily labeled Sentinel-1 image pair is calibrated and secondarily labeled, so as to complete the labeling of the water body region of the pretreated Sentinel-1 image pair.

[0037] The MNDWI (Modified Normalized Difference Water Index) algorithm can be used to extract the flood range from the Sentinel-2 image after cloud removal, and is defined as the difference between the reflectivity of the green band and the short-wave infrared band (SWIR1) divided by the sum of the reflectivity of the green band and the short-wave infrared band (SWIR1), and the formula is as follows:

[0038] MNDWI = (R Green -R SWIR ) / (R Green +R SWIR )

[0039] Wherein, R Green and R SWIR are the reflectivity of the green and short-wave infrared bands. When using the MNDWI algorithm to extract the flood, the MNDWI threshold value needs to be recalibrated because the optimal threshold value of MNDWI may be different in different regions.

[0040] Therefore, the MNDWI method is used to preliminarily label the water area of the image in the preprocessed Sentinel-2 image pair; and the image in the Sentinel-2 image pair after preliminary labeling is calibrated and secondarily labeled, so as to complete the labeling of the water area of the preprocessed Sentinel-2 image pair. The Sentinel-1 image and the Sentinel-2 image used in the present application are obtained and the threshold value algorithm is used to extract the flood range, and both are carried out on the remote sensing processing cloud platform, and then the data obtained by processing is downloaded to the local, and then the ArcGIS Pro software is used to manually revise the threshold value extraction result, so as to serve as a sample label for model training. The image and the label are both TIFF files with a size of 512*512. The Sentinel-2 image and the label, and the Sentinel-1 image and the label are respectively stored in different folders, and the images in each folder are named consistently and correspond one by one. 20% of all images are randomly selected as a verification set, and 80% are used as a training set.

[0041] Step 3: Constructing a TCN-Net model group

[0042] The TCN-Net model group includes four TCN-Net models, inspired by the success of U-Net and its variants in semantic segmentation, TCN-Net is a U-shaped structure composed of 4 encoding layers and 4 corresponding decoding layers. In order to further optimize the feature extraction performance of the model, the present application innovatively introduces a convolutional attention module (Convolutional Block Attention Module, CBAM) between the upper two layers of the encoder-decoder architecture, as shown in Figure 2As shown, this module is composed of a Channel Attention Block (CAB) and a Spatial Attention Block (SAM). First, the CAB adaptively recalibrates the channel weights based on the statistical characteristics of the inter-channel feature responses, prioritizing the enhancement of key semantic features. Then, the SAM models the spatial distribution of feature responses in the spatial dimension, highlighting the spatial correlation of the target region through attention weight allocation. This sequential dual-attention mechanism achieves global feature modeling from channel to space, effectively capturing multi-scale contextual information. Finally, residual connections fuse the attention-refined features with the original input, preserving low-level details while further enhancing the non-linear expressive power of the features using activation functions. Experiments show that the introduction of the Convolutional Attention Block (CBAM) improves the model's ability to perceive complex scenes, and its lightweight design ensures a dual optimization of inference efficiency and feature quality. This invention also innovatively embeds hybrid CNN-Transformer layers in the model's key layers (the last two encoding layers and the first two decoding layers), such as... Figure 2 As shown.

[0043] like Figure 6 As shown, the hybrid CNN-Transformer layer first efficiently extracts spatial local details from the feature map through a lightweight CNN branch, utilizing the local receptive field characteristics of the convolutional kernel to capture low-level visual features such as edges and textures. Simultaneously, a Swing Transformer branch is introduced, employing alternating window multi-head self-attention (W-MSA) and moving window multi-head self-attention (SW-MSA) mechanisms to achieve long-range dependency modeling across windows while maintaining linear computational complexity, effectively capturing global contextual semantic information. In the decoding stage, this invention deploys upsampling after each hybrid CNN-Transformer layer, employing a hybrid strategy of transposed convolution and sub-pixel convolution to gradually restore the spatial resolution of the feature map. By using skip connections, the decoded features are deeply fused with the corresponding encoding layer's features at the same scale, preserving high-level semantic information while fully reusing low-level details, forming a multi-scale feature complementarity mechanism. The hybrid CNN-Transformer architecture has two advantages: First, the low-resolution feature maps used as Transformer input in the encoding stage reduce the computational cost of self-attention through spatial dimensionality reduction, significantly improving inference efficiency. Second, the hybrid CNN-Transformer layer complements the local inductive bias of CNN with the global modeling capability of Transformer, constructing a progressive representation learning path of "local details → region structure → global semantics" in the feature space, while maintaining the real-time inference frame rate.

[0044] As shown in Figure 2 TCN-Net model architecture is based on U-Net model, TCN-Net model includes an encoder and a decoder and a bottleneck layer for connecting the encoder and the decoder, the encoder includes sequentially connected initial convolutional layer, first down-sampling layer, second down-sampling layer, first hybrid CNN-Transformer layer, third down-sampling layer, second hybrid CNN-Transformer layer and fourth down-sampling layer, the decoder includes sequentially connected first up-sampling layer, third hybrid CNN-Transformer layer, second up-sampling layer, fourth hybrid CNN-Transformer layer, third up-sampling layer, fourth up-sampling layer and classification head; the first down-sampling layer and the fourth up-sampling layer are connected by the first convolution block attention module; the second down-sampling layer and the third down-sampling layer are connected by the second convolution block attention module; the first and fourth hybrid CNN-Transformer layers are connected by the skip connection, and the second and third hybrid CNN-Transformer layers are connected by the skip connection. Wherein, the bottleneck layer is a convolutional layer.

[0045] The convolutional attention module CBAM and the hybrid CNN-Transformer layer in it are respectively:

[0046] 1) Convolutional attention module CBAM

[0047] The convolutional attention module CBAM combines the channel attention fusion module CAB and the spatial attention module SAM. The workflow of the convolutional attention module CBAM is as shown in Figure 3 The convolutional attention module CBAM receives the feature map output by the down-sampling layer, inputs the feature map into the channel attention fusion module CAB to obtain channel attention, and then applies the attention weight to the feature map. After that, the feature map with channel attention is input into the spatial attention module SAM to obtain spatial attention, and then the attention weight is applied to the feature map with channel attention. Finally, after the serial operation of the two attention modules, the initial feature map is processed by the channel and spatial attention mechanisms, and the feature is adaptively refined.

[0048] The convolutional attention module CBAM receives the feature map output by the down-sampling layer, and then inputs the received feature map into the channel attention fusion module CAB, as shown in Figure 4As shown, the fusion channel attention module CAB retains the most important feature information of the feature map through two parallel global maximum pooling and global average pooling, and then outputs the results into a shared multi-layer perception, respectively. The shared multi-layer perception (MLP) is used for nonlinear transformation to extract features, and then a sigmoid activation function is used to obtain the output results of channel attention. The fusion channel attention module CAB inputs the final results into the spatial attention module SAM.

[0049] As shown in Figure 5 , the spatial attention module SAM obtains two feature maps with a channel number of 1 by maximum pooling and average pooling on the results output by the fusion channel attention module CAB, then splices the two feature maps, obtains a feature map with a channel number of 1 through a 7x7 convolution, and finally obtains a spatial attention feature map through a sigmoid activation function.

[0050] 2) Hybrid CNN-Transformer layer

[0051] As shown in Figure 6 , the hybrid CNN-Transformer layer is used to fuse global and local features in the present application, which takes advantage of the local feature extraction of CNN and the ability of Transformer to model global dependencies. The Transformer is responsible for modeling long-term dependencies from images, while the CNN focuses on extracting more fine-grained local features. The hybrid CNN-Transformer layer introduced in the present application is composed of two cascaded CNN-Transformer modules, each module containing a pair of 1x1 convolution layers, a residual convolution block and a window-based Transformer block (or a shift window-based Transformer block). The first hybrid CNN-Transformer layer receives the feature map output by the second downsampling layer, the second hybrid CNN-Transformer layer receives the feature map output by the third downsampling layer, the third hybrid CNN-Transformer layer receives the feature map output by the first upsampling layer, and the fourth hybrid CNN-Transformer layer receives the feature map output by the second upsampling layer.

[0052] For a given input feature map x ∈ R H×W×C , the workflow of the hybrid CNN-Transformer layer includes:

[0053] (1) First, use 1x1 kernel convolution to fuse features along the channel dimension, and then use channel division operation to divide the feature map output by the CNN layer into two equal size parts and

[0054] (2) The residual convolution block formed by two convolution layers with 3x3 kernel and LeakyReLU activation function is used to process the feature map x c to capture local features While the feature map x t is sent to the window-based Transformer block, which uses the window multi-head self-attention (W-MSA) mechanism to capture global dependencies, generating a feature map

[0055] (3) x cl and x tg are connected along the channel dimension, and then a convolution layer with 1x1 kernel is used to process the connection result to obtain the output of the CNN-Transformer module, so that the model can utilize global information and local details when performing feature extraction.

[0056] (4) A skip connection is constructed between the input x and the output of the CNN-Transformer module to allow more efficient feature fusion, resulting in the final feature map y w ∈R H×W×C ;

[0057] (5) The feature map y w is processed by the second CNN-Transformer module, where the window-based Transformer block of the second CNN-Transformer module uses the sliding window multi-head self-attention (SW-MSA) mechanism to learn non-local features, while other components remain unchanged. The output feature map of the final mixed CNN-Transformer layer is represented as y∈R H ×W×C .

[0058] The formula of the first CNN-Transformer module is as follows:

[0059] x c ,x t =Split(Conv1×1(x))

[0060] x cl =RC(x c )

[0061] x tg =WT(x t )

[0062] y ω =x+Conv1×1(Cat(x cl ,x tg ))

[0063] where Split(*) denotes a channel split function; Conv1x1(*) denotes a 1x1 kernel convolution function; RC(*) denotes a function of a residual convolution block; WT(*) denotes a function of a window-based Transformer of the first CNN-Transformer module; and Cat(*) denotes a concatenation function.

[0064] Similarly, the pipeline of the second CNN-Transformer module can be defined as follows:

[0065] y c ,y t = Split(Conv1x1(y w ))

[0066] y cl = RC(y c )

[0067] y tg = SWT(y t )

[0068] y = y ω + Conv1x1(Cat(y cl , y tg ))

[0069] where y c and y t denote two equal-sized parts of the feature map y w split by a channel split operation; y cl denotes a feature map output by a residual convolution block; SWT(*) denotes a function of a window-based Transformer of the second CNN-Transformer module; and y tg denotes a feature map output by a window-based Transformer block of the second CNN-Transformer module.

[0070] The hybrid CNN-Transformer module leverages the advantage of Swin Transformer in effectively modeling global dependencies and ingeniously combines it with residual convolution in a lightweight manner, which guarantees the effectiveness and efficiency of feature learning.

[0071] Step 4: Model training

[0072] Firstly, the parameters of the model training code train.py, train_data_dir, train_mask_dir, are set, which correspond to the paths of the Sentinel-1 / 2 images and labels in the training data set respectively, and the optimal model saving path (model_SAVEPATH) in the code is set. Secondly, the multi-threading parameter (num_workers), the number of iterations (epochs), the batch size (batch-size), the learning rate (learning-rate), and the validation set proportion (validation) are set. The total loss function is constructed using the cross-entropy loss function and the Dice loss function to train each TCN-Net model in the TCN-Net model group. The learning rate is optimized using the Adam optimizer and the cosine annealing (Cosine Annealing). After all the settings are completed, the model is trained. Finally, the parameters of the prediction code predict.py are set, and the --input, --output, and --model parameters correspond to the paths of the Sentinel-1 / 2 images before and after the flood occurs, the output path of the predicted Sentinel-1 / 2 image results, and the model weight saving path, respectively. After setting, the code can be run to generate the prediction results.

[0073] The formula of the total loss function is:

[0074] L = L CE + L Dice

[0075]

[0076] Wherein, L represents the total loss function; L CE represents the cross-entropy loss function; L Dice represents the Dice loss function; N represents the total number of pixels in the image, and the image is the labeled Sentinel-1 image before the flood occurs, the labeled Sentinel-1 image after the flood occurs, the labeled Sentinel-2 image before the flood occurs, or the labeled Sentinel-2 image before the flood occurs; K represents the number of ground object categories in the image, and the categories include water and non-water; represents the One-Hot encoding of the actual label of pixel n belonging to category k; represents the confidence of pixel n belonging to category k, wherein n∈[1,...,N].

[0077] Fifth step: flood inundation area prediction and generation of flood inundation range data

[0078] For the arid region where floods occur, the Sentinel-1 image or the Sentinel-2 image before and after the flood in the region is obtained, the obtained image is input into the trained TCN-Net model group to obtain the corresponding binary image, the binary images are subtracted, and then the result is converted into vector data to obtain the flood inundation area, and the extraction of the flood inundation range in the arid region is completed. That is, since the prediction result is 512*512 size TIFF format data, the 512*512 size prediction result needs to be merged using the merge raster tool in the ArcGIS Pro software or Python code, and then the prediction results before and after the flood are used to determine the flood inundation range. The final data is stored in a vector format (such as shp) and adds data projection and other attribute information. Based on the flood inundation range data, the flood inundation area can be further calculated. Through the comparative analysis of the images before and after the flood, the specific area and change of the flood inundation can be quickly obtained, and timely and effective data support is provided for the emergency response of flood disasters.

[0079] The present application provides a method for extracting the flood inundation range in the arid region using deep learning, which has high production efficiency, good reliability, and can accurately capture the flood events in the arid region. The disadvantage of the present method is that the accuracy of the sample label is required to be high, the calculation time is long, and the model requires high computing resources.

[0080] In order to more clearly illustrate the technical solutions of the present application, the specific embodiments of the present application will be described below with reference to the examples and drawings.

[0081] In order to verify the reliability of the present application, the present example selects the Sentinel-2 image of a certain region on May 29, 2023 and the Sentinel-1 image on June 7, 2023 as the image before the flood, and the Sentinel-2 image of the region on June 13, 2023 and the Sentinel-1 image on June 13, 2023 as the image after the flood as example data. All Sentinel-1 images and Sentinel-2 images are provided free of charge by the United States Geological Survey (USGS) (website: http: / / glovis.usgs.gov / ), and the data set can also be directly called on the remote sensing data processing cloud platform. The Sentinel-1 image is operated by dual satellites (A / B) with a revisit period of 6 days; the Sentinel-2 image is also composed of dual satellites (A / B) with a revisit period of 5 days. In the visible, near-infrared and short-wave infrared spectrum, the spatial resolution of the Sentinel-2 image is 10 meters, 10 meters and 20 meters, respectively.

[0082] In the present embodiment, the method for extracting the flood inundation range in the arid region based on the TCN-Net model comprises the following steps:

[0083] First step: In the remote sensing data processing cloud platform, select the Sentinel-1 image pair and the Sentinel-2 image pair in multiple sub-regions in the arid area in 2024, and obtain the slope data in the SRTM DEM 30M data set, and visualize the slope data to obtain the slope image. The data set provided by the cloud platform has completed basic preprocessing. Resample the VV polarization band and VH polarization band of the image in the Sentinel-1 image pair and the slope image, and unify the spatial resolution to 10 meters before data fusion. Combine to generate a 3-channel image, that is, channel fusion of the resampled VV polarization band and VH polarization band of the Sentinel-1 image before the flood and the resampled slope image to obtain the first fused Sentinel-1 image; channel fusion of the resampled VV polarization band and VH polarization band of the Sentinel-1 image after the flood and the resampled slope image to obtain the second fused Sentinel-1 image.

[0084] The Sentinel-2 image adopts the 8th band (near-infrared), the 11th band (short-wave infrared) and the 2nd band (blue light), resamples the images in the Sentinel-2 image pair to 10-meter spatial resolution to obtain the resampled Sentinel-2 image before the flood and the resampled Sentinel-2 image after the flood. In order to facilitate subsequent data processing and analysis, the present application unifies the geographic coordinate system of the first fused Sentinel-1 image, the second fused Sentinel-1 image and the images in the resampled Sentinel-2 image pair to EPSG: 4326, ensuring the consistency of different data sources in spatial position. Finally, adjust the image size consistency of the first fused Sentinel-1 image, the second fused Sentinel-1 image and the images in the Sentinel-2 image pair after unifying the geographic coordinate system, and complete the preprocessing.

[0085] Second step: the Sentinel-1 / 2 images used by the application and the threshold extraction flood results are all downloaded to the local through the use of a more efficient remote sensing data processing cloud platform, and the results of threshold extraction are manually revised using ArcGIS Pro software. That is, the Otsu method is used to preliminarily label the water body region of the image in the preprocessed Sentinel-1 image pair, and then the image in the preprocessed Sentinel-1 image pair after preliminary labeling is calibrated and secondarily labeled to complete the labeling of the water body region of the preprocessed Sentinel-1 image pair. And the MNDWI method is used to preliminarily label the water body region of the image in the preprocessed Sentinel-2 image pair; then the image in the preprocessed Sentinel-2 image pair after preliminary labeling is calibrated and secondarily labeled to complete the labeling of the water body region of the preprocessed Sentinel-2 image pair. The training data set is made, and the Sentinel-2 image pair and the label, the Sentinel-1 image pair and the label are respectively stored in different folders, the images in each folder are named consistently and correspond one by one, 20% of all images are randomly selected as a test set, and 80% are used as a training set, and 5500 groups of Sentinel-1 / 2 image pairs are used each time.

[0086] Third step: build the TCN-Net model group, set the parameters of the model training code train.py, train_data_dir, train_mask_dir, parameters correspond to the paths of the two files of Sentinel-1 / 2 images and labels in the training data set in turn, and set the optimal model saving path (model_SAVEPATH) in the code, and then set the multi-threading parameters: num_workers=8, iteration times: epochs=100, batch size: batch-size=4, learning rate: learning-rate=0.0006, validation set proportion: validation=20.0, wherein num_workers and batch-size can be set according to the performance of the computer, after all the settings, train the TCN-Net model in the TCN-Net model group, use the evaluation index of the deep learning model and the double verification method of the existing data and visual interpretation to verify the accuracy of the extraction result, ensure the reliability and accuracy of the extraction result, use six different precision evaluation indexes to verify the accuracy of the model prediction result, the overall accuracy (Accuracy) of the model in extracting flood from Sentinel-2 image is 0.9821, the precision (Precision) is 0.9371, the recall (Recall) is 0.9165, the F1 score (F1) is 0.9129, the intersection over union (Iou) is 0.9032, and the Dice score is 0.9121; the overall accuracy (Accuracy) of the model in extracting flood from Sentinel-1 image is 0.9846, the precision (Precision) is 0.9057, the recall (Recall) is 0.9141, the F1 score (F1) is 0.9045, the intersection over union (Iou) is 0.8851, and the Dice score is 0.9037.

[0087] Fourth step: select Sentinel-2 image of May 29, 2023 and Sentinel-1 image of June 7, 2023 in a certain area as the image before the flood occurs, and Sentinel-2 image of June 13, 2023 and Sentinel-1 image of June 13, 2023 as the image after the flood occurs, use the same preprocessing method as the first step to download the Sentinel-2 images before and after the flood and the Sentinel-1 images before and after the flood to the local, use the image cropping code to crop the Sentinel-1 / 2 images into 512x512 size respectively, and store them in the corresponding folders one by one.

[0088] Fifth step: Based on the best trained model best_model.pth, the Sentinel-1 image and the Sentinel-2 image before the flood and the Sentinel-1 image and the Sentinel-2 image after the flood are predicted, and then the parameters of the prediction code predict.py are set, including the path of the Sentinel-1 image and the Sentinel-2 image before the flood, the path of the Sentinel-1 image and the Sentinel-2 image after the flood, the output path of the predicted Sentinel-1 image or Sentinel-2 image result, and the model weight path to be used, and the code is run after being set to generate the prediction result.

[0089] Four binary images are obtained by using the trained TCN-Net model group, two binary images corresponding to the Sentinel-1 image before and after the flood are subtracted, and the result is converted into vector data to obtain the flood inundation area, and the extraction of the flood inundation range in the arid area is completed, and the prediction result display diagram is as shown in Figure 8 The two binary images corresponding to the Sentinel-2 image before and after the flood are subtracted, and the result is converted into vector data to obtain the flood inundation area, and the extraction of the flood inundation range in the arid area is completed, and the prediction result display diagram is as shown in Figure 7 That is, since the prediction result is 512x512 size TIFF format data, the 512x512 size prediction result needs to be merged using the merge raster tool in ArcGIS Pro or Python code. Then the flood inundation range of the pre-disaster and post-disaster prediction results is determined. The final data is stored in vector format (such as shp) and adds data projection and other attribute information.

[0090] Figures 7-8 is the result of predicting the Sentinel-1 / 2 test set. is the image prediction result of the test set based on the trained model, wherein the label is the flood true value. From Figures 7-8 It can be seen from the prediction result that the method in the present application can accurately identify the local details and global coherence of the flood when extracting the flood range in the arid area.

[0091] Figures 9-10 is the flood inundation range extracted by the method in the present application when a part of the area in a certain region is flooded. Figures 9-10 The a, b and c areas in are "local amplification" at a small area scale, which reflects that the method in the present application can more accurately and completely extract the flood inundation range and reduce the missing and false extraction phenomenon.

[0092] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation to the patent scope of the present application. For ordinary skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, which shall all fall into the protection scope of the present application.

Claims

1. A method for extracting a flood inundation area in a dry region based on a TCN-Net model, characterized in that, The application relates to a method for extracting a flood submerging range in a drought area. The method comprises the following steps: acquiring a Sentinel-1 image pair and a Sentinel-2 image pair of a plurality of sub-regions in the drought area and performing pretreatment, labeling water body regions of the pretreated Sentinel-1 image pair and the Sentinel-2 image pair, and constructing a training data set; constructing a TCN-Net model group and training the TCN-Net model group by using the training data set; wherein the Sentinel-1 image pair comprises Sentinel-1 images before and after flood occurrence in the sub-region, and the Sentinel-2 image pair comprises Sentinel-2 images before and after flood occurrence in the sub-region. The TCN-Net model group comprises four TCN-Net models, the TCN-Net model has the same encoder-decoder architecture as the U-Net model, the upper two layers of the encoder-decoder architecture are connected through a convolution block attention module, a hybrid CNN-Transformer layer is embedded before the last two down-sampling layers of the encoder, and a hybrid CNN-Transformer layer is also embedded after the first two up-sampling layers of the decoder; for the drought area where the flood occurs, the Sentinel-1 images or the Sentinel-2 images before and after the flood occurrence in the region are acquired, the acquired images are input into the trained TCN-Net model group to obtain corresponding binary images, the binary images are subtracted, the result is converted into vector data, the flood submerging region is obtained, and the extraction of the flood submerging range in the drought area is completed.

2. The method for extracting the flood inundation area in the arid region based on the TCN-Net model according to claim 1, characterized in that, The Sentinel-1 image pair and the Sentinel-2 image pair are pretreated, and the pretreatment comprises the following steps: Slope data in a NASA SRTM DEM data set of the same region as the Sentinel-1 image pair is acquired, the Slope data is visualized to obtain a Slope image, the VV polarization band and the VH polarization band of the images in the Sentinel-1 image pair and the images in the Sentinel-2 image pair are resampled, the VV polarization band and the VH polarization band of the resampled Sentinel-1 images before the flood occurrence and the resampled Slope image are channel fused to obtain a first fused Sentinel-1 image, and the VV polarization band and the VH polarization band of the resampled Sentinel-1 images after the flood occurrence and the resampled Slope image are channel fused to obtain a second fused Sentinel-1 image; wherein the spatial resolutions of the resampled VV polarization band and the VH polarization band of the Sentinel-1 image pair, the resampled Slope image and the images in the Sentinel-2 image pair are all 10 m. The geographic coordinate systems of the images in the first fused Sentinel-1 image, the second fused Sentinel-1 image and the resampled Sentinel-2 image pair are unified to EPSG: 4326; finally, the images in the first fused Sentinel-1 image, the second fused Sentinel-1 image and the Sentinel-2 image pair after unifying the geographic coordinate systems are adjusted for image size consistency, completing the preprocessing.

3. The method of claim 1, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. The water body regions of the preprocessed Sentinel-1 image pair and the Sentinel-2 image pair are labeled, including: The Otsu method is used to preliminarily label the water body regions of the images in the preprocessed Sentinel-1 image pair, and the images in the preliminarily labeled Sentinel-1 image pair are calibrated and secondarily labeled, completing the labeling of the water body regions of the preprocessed Sentinel-1 image pair; The MNDWI method is used to preliminarily label the water body regions of the images in the preprocessed Sentinel-2 image pair; the images in the preliminarily labeled Sentinel-2 image pair are calibrated and secondarily labeled, completing the labeling of the water body regions of the preprocessed Sentinel-2 image pair.

4. The method of claim 1, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. The encoder of the TCN-Net model includes sequentially connected initial convolutional layers, first down-sampling layers, second down-sampling layers, first hybrid CNN-Transformer layers, third down-sampling layers, second hybrid CNN-Transformer layers and fourth down-sampling layers. The initial convolutional layers of the four TCN-Net models are respectively used to receive the labeled Sentinel-1 images before and after the occurrence of floods and the labeled Sentinel-2 images before and after the occurrence of floods.

5. The method of claim 4, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. The decoder of the TCN-Net model includes sequentially connected first up-sampling layers, third hybrid CNN-Transformer layers, second up-sampling layers, fourth hybrid CNN-Transformer layers, third up-sampling layers, fourth up-sampling layers and classification heads. The encoder and the decoder are connected through a bottleneck layer, which is a convolutional layer; the first down-sampling layer and the fourth up-sampling layer are connected through a first convolutional block attention module; the second down-sampling layer and the third down-sampling layer are connected through a second convolutional block attention module; the first and fourth hybrid CNN-Transformer layers are connected through a jump connection, and the second and third hybrid CNN-Transformer layers are connected through a jump connection.

6. The method of claim 5, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. The mixed CNN-Transformer layer is composed of two cascaded CNN-Transformer modules, the first CNN-Transformer module includes two 1*1 convolution layers, a residual convolution block and a window-based Transformer block; the second CNN-Transformer module includes two 1*1 convolution layers, a residual convolution block and a shift window-based Transformer block; The first mixed CNN-Transformer layer receives the feature map output by the second down-sampling layer, the second mixed CNN-Transformer layer receives the feature map output by the third down-sampling layer, the third mixed CNN-Transformer layer receives the feature map output by the first up-sampling layer, and the fourth mixed CNN-Transformer layer receives the feature map output by the second up-sampling layer.

7. The method of claim 6, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. When the mixed CNN-Transformer layer receives the feature map, the first CNN-Transformer module processes the feature map first, one 1*1 convolution layer of the first CNN-Transformer module first extracts features from the feature map and outputs the extracted feature map, then the extracted feature map is segmented into two parts of equal size, one part is input into the residual convolution block for local feature capture, and the other part is input into the window-based Transformer block for global dependency capture using window multi-head self-attention mechanism, the residual convolution block outputs a first feature map, the window-based Transformer block outputs a second feature map, and then the first feature map and the second feature map are connected along the channel dimension, and then the connection result is input into another 1*1 convolution layer, which outputs a third feature map; finally, the third feature map and the feature map input into the first CNN-Transformer module are fused, and the fusion result is output to the second CNN-Transformer module; A 1x1 convolutional layer of the second CNN-Transformer module first extracts features from the fusion result and outputs the extracted feature map, and then performs channel segmentation on the extracted feature map to obtain two equal-size parts, one of which is input into the residual convolutional block for local feature capture, and the other is input into the mobile window-based Transformer block for non-local feature learning using the mobile window multi-head self-attention mechanism, the residual convolutional block outputs a fourth feature map, and the mobile window-based Transformer block outputs a fifth feature map, and then the fourth feature map and the fifth feature map are connected along the channel dimension, and then the connection result is input into another 1x1 convolutional layer, which outputs a sixth feature map; finally, the sixth feature map is fused with the fusion result input into the second CNN-Transformer module, and at this time the fusion result is the output of the hybrid CNN-Transformer layer.

8. The method of claim 1, wherein the TCN-Net model is used to extract the flood inundation area in the arid region. The total loss function is constructed by using the cross-entropy loss function and the Dice loss function to train each TCN-Net model in the TCN-Net model group; the formula of the total loss function is: L = L CE + L Dice where L denotes the total loss function; L CE denotes the cross-entropy loss function; L Dice denotes the Dice loss function; N denotes the total number of pixels in the image, which is the annotated pre-flood Sentinel-1 image, the annotated post-flood Sentinel-1 image, the annotated pre-flood Sentinel-2 image, or the annotated pre-flood Sentinel-2 image; K denotes the number of land cover classes within the image, including water and non-water; denotes the One-Hot encoding of the actual label of pixel n belonging to class k; denotes the confidence of pixel n belonging to class k, where n ∈ [1,..., N].