Water body extraction system and method based on dilated convolution and dynamic snakelike convolution
By combining dilated convolution and dynamic serpentine convolution, the problem of feature loss of small water bodies and difficulty in extracting narrow water bodies in high-resolution remote sensing images is solved, realizing efficient automated extraction and identification of water bodies.
Patent Information
- Application Number
- CN202511739858.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2045-11-25
AI Technical Summary
In high-resolution remote sensing images, existing technologies are prone to losing the features of small water bodies, making it difficult to accurately extract narrow water bodies, and traditional methods have limited generalization capabilities.
A water extraction system based on dilated convolution and dynamic serpentine convolution is adopted. Feature extraction is performed by combining residual multi-scale network with dilated convolution, dynamic serpentine convolution adaptively adjusts the shape of convolution kernel, and attention mechanism is combined to process features. Feature maps are reconstructed through multi-scale fusion and upsampling operations.
It effectively captures water features at different scales, accurately tracks narrow water body boundaries, enhances the model's ability to distinguish water bodies in complex backgrounds, and achieves fully automated water extraction.
Smart Images

Figure CN121330516A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of remote sensing image processing, in particular to a water body extraction system and method based on a hollow convolution and a dynamic snake convolution. BACKGROUND
[0002] With the development of remote sensing technology, high-resolution remote sensing images have become an important data source for water body extraction. However, due to the complex and variable morphology of surface water bodies, especially the extraction of small water bodies and narrow water bodies, still faces severe challenges.
[0003] Traditional water body extraction methods mainly include water body index method and machine learning-based method. The water body index method distinguishes water bodies by calculating the reflectance ratio of different bands, but the threshold determination is highly subjective and is easily disturbed by shadows. The machine learning-based method relies on artificial design features and needs to adjust the feature combination for different regions, with limited generalization ability.
[0004] In recent years, deep learning technology has been widely applied to water body extraction tasks. Some studies improve the network structure, use hollow convolution or multi-scale feature fusion to improve the extraction effect. However, in sub-meter high-resolution images, small water body features are easily lost in multiple downsampling processes, and narrow water bodies are difficult to accurately extract due to the limitation of fixed shape convolution kernel. Although dynamic snake convolution has been successfully applied in medical images, its potential in the field of water body extraction has not been fully explored.
[0005] Therefore, there is an urgent need to develop a new method that can effectively solve the problem of small water body feature loss and narrow water body extraction difficulty. SUMMARY
[0006] The purpose of the present application is to provide a water body extraction system and method based on hollow convolution and dynamic snake convolution to solve the problems in the prior art.
[0007] To achieve the above purpose, the present application provides the following technical scheme: a water body extraction system and method based on hollow convolution and dynamic snake convolution, The method comprises the following steps: Step S1: obtaining historical remote sensing images containing surface water body information, preprocessing the historical remote sensing images, and cutting the preprocessed images into image slices of a predetermined size; Step S2: interpreting and labeling the water bodies in the image slices to generate water body vector data, generating water body mask labels based on the water body vector data, combining the image slices with the corresponding water body mask labels to construct a water body dataset, and dividing the water body dataset into a training set, a validation set and a test set; Step S3: Feature extraction is performed on the input image by combining residual multi-scale network with a hollow convolution, multi-scale fusion processing is performed on the extracted features, dynamic snake convolution and attention mechanism are used to process the features in parallel, and an output feature map with the same size as the input image is reconstructed through upsampling operation; wherein the purpose of using residual multi-scale network combined with hollow convolution is to expand the receptive field while maintaining the resolution of the feature map, so as to effectively capture water features of different scales; multi-scale fusion processing integrates feature information at different levels to enhance the model's ability to recognize small water bodies; dynamic snake convolution can adaptively adjust the shape of the convolution kernel to effectively capture the morphological characteristics of narrow water bodies, while the attention mechanism can improve the model's ability to distinguish water bodies in complex backgrounds by focusing on important feature areas; Step S4: The water body extraction network model is trained using the training set, the difference between the predicted value and the true label is calculated using the loss function, the network parameters are updated through back propagation, and the performance is evaluated using the validation set and the hyperparameters are optimized, and finally the generalization performance of the model is evaluated using the test set, and the trained water body extraction model is obtained; wherein the difference between the predicted result and the true label is quantified by using the cross-entropy loss function, and the network parameters are optimized by using the back propagation algorithm, so that the model can accurately learn the water feature representation; the validation set is used to monitor the training process and adjust the hyperparameters to prevent overfitting; the test set is used to evaluate the generalization ability of the model; Step S5: Obtain the current remote sensing image to be extracted, and input it into the trained water body extraction model after preprocessing and cropping according to the method of step S1, and output the water body extraction result; wherein the trained model is applied to new remote sensing images to realize automatic extraction of water body information, providing technical support for water resource monitoring and management.
[0008] Further, step S1 includes: Step S1-1: Obtain historical remote sensing images containing surface water body information, and perform radiation correction on the historical remote sensing images, including radiation calibration and atmospheric correction; the radiation calibration is to establish a quantitative relationship between the digital quantization value and the corresponding radiation brightness value in the field of view; the atmospheric correction is to convert the radiation brightness value to the actual reflectivity of the ground surface based on the MODRAN4+ radiation transfer algorithm; wherein the purpose of radiation correction is to eliminate the sensor's own error and atmospheric influence, and to obtain accurate ground reflectivity information; Step S1-2: Perform orthorectification on the radiation-corrected image, and perform terrain deformation correction on all pixels in the image using a digital elevation model; wherein the purpose of orthorectification is to eliminate the geometric distortion caused by topographic relief and sensor attitude, and to obtain an image with accurate geographic coordinates; Step S1-3: image fusion is performed on the orthorectified image to generate a composite image; wherein the purpose of image fusion is to integrate multi-source remote sensing data to generate an image with richer spatial and spectral characteristics.
[0009] Further, step S2 includes: Step S2-1: professional interpreters visually interpret and label the water body information in the image slices to create a visually interpreted water body vector; and a water body mask is generated based on the water body vector to generate a water body label; wherein the accuracy of the label is ensured through visual interpretation by professionals, and high-quality supervision information is provided for model training; Step S2-2: the original image and the corresponding water body label are cut into 512x512 pixel image slices to construct a water body dataset for training, and the water body dataset is divided into a training set, a validation set and a test set; wherein cutting large-size images into fixed-size slices not only facilitates deep learning model processing, but also ensures the diversity of training data.
[0010] Further, the step S3 includes: Step S3-1: down-sampling is performed on the input image, and the 512x512 pixel image slice is down-sampled to 256x256 pixels through a convolution layer with a step of 2, and then input into a residual multi-scale network layer for feature extraction to obtain a first-level feature map; wherein high-level semantic features are gradually extracted through the down-sampling operation, and the residual multi-scale network is used to capture water body features at multiple scales; Step S3-2: multi-scale fusion processing is performed on the first-level feature map; first, a 1x1 convolution is performed on the first-level feature map to obtain a channel-compressed feature map; a convolution kernel size set containing a plurality of convolution kernel sizes and an expansion rate set containing a plurality of expansion rates are set, and different visual perception feature information is extracted from the channel-compressed feature map through a plurality of parallel convolution branches, wherein each convolution branch is configured by selecting one convolution kernel size from the convolution kernel size set and one expansion rate from the expansion rate set to form a feature extraction path with different receptive fields; the receptive field represents the size of the region on the original input image corresponding to the pixel point on the output feature map of each convolution branch; the feature information output by each branch is spliced to obtain a multi-scale fusion feature, and finally the multi-scale fusion feature is fused with the channel-compressed feature map through a 1x1 convolution to obtain a second-level feature map; wherein the multi-scale fusion processing extracts features with different receptive fields through parallel convolution branches, which can effectively capture multi-scale information from local details to global context; the channel compression and feature splicing operations not only ensure the calculation efficiency, but also enhance the feature expression capability; Step S3-3: simultaneously performing dynamic snake convolution processing and double attention processing on the second-level feature map, inputting the input features into the dynamic snake convolution branch and the double attention branch through parallel processing; wherein the dynamic snake convolution forms a linear structure by iteratively adjusting the convolution kernel coordinates, and the double attention processes the features through the feature aggregation and feature allocation mechanisms; the output features of the two branches are fused by element-wise addition to obtain a third-level feature map; wherein the dynamic snake convolution can accurately capture the elongated and winding water body boundary by iteratively adjusting the convolution kernel shape; the double attention mechanism enhances the attention degree of important features by feature aggregation and allocation; the parallel processing of the two branches effectively combines local details and global context; the iterative adjustment in the dynamic snake convolution, when the convolution kernel size is set to 9, the sampling points along the x-axis direction are denoted as , and the index is used to represent the offset distance of each sampling point relative to the center grid. The convolution kernel is constructed using a progressive coordinate update mechanism: taking the center position as the starting point, the coordinates of the subsequent sampling point position are obtained by superimposing an offset on the coordinates of the previous position . Through this continuous dependent coordinate update method, the convolution kernel naturally forms a linear structure feature that matches the winding shape of the water body in the x-axis direction.
[0011] Step S3-4: enlarging the size of the third-level feature map through repeated upsampling operations, and adding and fusing it with the feature map of the same scale reserved in the encoder to reconstruct an output feature map with the same size as the input image; wherein the spatial details are gradually restored through upsampling and feature fusion operations to ensure that the output feature map is consistent with the input image size, realizing pixel-level water body extraction.
[0012] Further, the step S4 includes: Step S4-1: inputting the training set into the network model to calculate the water body or non-water body classification prediction label of each pixel through forward propagation; wherein the forward propagation process calculates through multiple layers of network to gradually extract and transform features, and finally outputs the classification result of each pixel; Step S4-2: using the cross-entropy loss function to calculate the difference between the classification prediction label and the real water body label pixel by pixel to obtain the loss value of each pixel, and aggregating the loss values of all pixels to obtain the overall loss value representing the prediction effect of the image slice; wherein the cross-entropy loss function can effectively measure the difference between the predicted distribution and the real distribution, and the pixel-by-pixel calculation ensures accurate supervision of each position; Step S4-3: based on the total loss value, calculate the gradient using the back propagation algorithm, update the network weight using the optimizer to minimize the cross entropy loss function; wherein the back propagation algorithm calculates the gradient through the chain rule, and the optimizer adjusts the network parameters through the gradient descent strategy, so that the model prediction result gradually approaches the true label.
[0013] Further, the step S5 includes: Step S5-1: obtain the current remote sensing image containing surface water body information, pre-process according to the radiation correction, orthorectification and image fusion method in step S1, and cut into 512x512 pixel image slices; wherein the standardized preprocessing process ensures that the input data and the training data have the same data distribution and format; Step S5-2: input the remote sensing image slice into the trained water body extraction network model for processing, and generate water body extraction results based on the output feature map; wherein the trained model can automatically extract water body features from the input image and output the corresponding water body probability map; Step S5-3: determine the water body distribution information in the current remote sensing image based on the water body extraction results of all remote sensing image slices; wherein the extraction results of all slices are integrated to reconstruct a complete water body distribution map, which provides data support for subsequent water resource analysis.
[0014] The system comprises: an image acquisition and preprocessing module, a data set construction module, a network construction module, a model training module, and a water body extraction module; The image acquisition and preprocessing module is configured to obtain historical remote sensing images containing surface water body information, pre-process the historical remote sensing images, and cut the pre-processed images into image slices of a preset size; The data set construction module is configured to interpret and label the water bodies in the image slices, generate water body vector data, generate water body mask labels based on the water body vector data, combine the image slices and the corresponding water body mask labels to construct a water body data set, and divide the water body data set into a training set, a validation set, and a test set; The network construction module is configured to extract features from the input image through a residual multi-scale network combined with a dilated convolution, perform multi-scale fusion processing on the extracted features, process the features in parallel using a dynamic snake convolution and an attention mechanism, and reconstruct an output feature map with the same size as the input image through an upsampling operation; The model training module is configured to train the water body extraction network model using the training set, calculate the difference between the predicted value and the true label using a loss function, update the network parameters through back propagation, perform performance evaluation and hyperparameter tuning using the validation set, finally evaluate the model generalization performance through the test set, and obtain the trained water body extraction model; The water extraction module is used to acquire the current remote sensing image of the water body to be extracted. After preprocessing and cropping according to the method of the image acquisition and preprocessing module, it is input into the trained water extraction model and the water extraction result is output.
[0015] The image acquisition and preprocessing module includes: A radiometric correction unit is used to acquire historical remote sensing images containing information about surface water bodies and to perform radiometric correction on the historical remote sensing images, including radiometric calibration and atmospheric correction. Orthorectification unit, used to orthorectify radiometrically corrected images; The image fusion unit is used to perform image fusion on orthorectified images; The dataset building module includes: The annotation unit is used to perform visual interpretation and annotation of water body information in the image slice, create water body vectors and generate water body labels; The dataset partitioning unit is used to cut the original image and the corresponding water body label into image slices, construct the water body dataset and divide it into training set, validation set and test set.
[0016] The network building blocks include: The feature extraction unit is used to downsample the input image and extract features through a residual multi-scale network. The multi-scale fusion unit is used to perform multi-scale fusion processing on the extracted features, and extracts feature information of different visual perceptions through multiple parallel convolutional branches. The feature optimization unit is used to simultaneously perform dynamic serpentine convolution and dual attention processing on the fused features; The feature reconstruction unit is used to reconstruct an output feature map of the same size as the input image through an upsampling operation; The model training module includes: The forward propagation unit is used to input the training set into the network model and calculate the classification prediction label through forward propagation; The loss calculation unit is used to calculate the difference between the predicted label and the true label using the cross-entropy loss function to obtain the overall loss value; The parameter update unit is used to update the network weights based on the overall loss value using the backpropagation algorithm.
[0017] The water extraction module includes: The preprocessing unit is used to acquire current remote sensing images and perform preprocessing and cropping. The inference unit is used to input the preprocessed image slices into the trained water extraction network model for processing. The result generation unit is used to determine water body distribution information based on the processing results of all image slices.
[0018] Compared with the prior art, the beneficial effects of the present invention are: 1. In this invention, the multi-scale feature fusion module captures feature information at different scales through parallel convolution branches, ensuring that the features of small water bodies are not lost during multiple downsampling processes; the dynamic serpentine convolution accurately tracks the meandering boundaries of narrow water bodies by adaptively adjusting the shape of the convolution kernel. 2. The dual attention mechanism introduced in this invention enables the model to adaptively focus on important feature regions while suppressing interference from non-water areas through feature aggregation and allocation operations. Furthermore, the rich contextual information provided by the multi-scale feature fusion module further enhances the model's ability to distinguish between water and non-water regions. 3. This invention constructs a complete water body extraction process, from data preprocessing and model training to the final extraction of water body information, achieving fully automated processing. Through an end-to-end deep learning network, it avoids the cumbersome feature engineering and manual threshold adjustment processes of traditional methods. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the water extraction method based on dilated convolution and dynamic serpentine convolution of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example: Figure 1 As shown, this invention provides a technical solution: a water extraction system and method based on dilated convolution and dynamic serpentine convolution. The methods include: Step S1: Acquire historical remote sensing images containing information about surface water bodies, preprocess the historical remote sensing images, and crop the preprocessed images into image slices of a preset size. Step S2: Interpret and label the water bodies in the image slices to generate water body vector data, and generate water body mask labels based on the water body vector data; combine the image slices with the corresponding water body mask labels to construct a water body dataset, and divide the water body dataset into a training set, a validation set and a test set; Step S3: Extract features from the input image using a residual multi-scale network combined with dilated convolution, perform multi-scale fusion processing on the extracted features, use dynamic snake convolution and attention mechanism to process features in parallel, and reconstruct an output feature map with the same size as the input image through upsampling operation; Step S4: Train the water body extraction network model using the training set, calculate the difference between the predicted value and the true label using the loss function, update the network parameters through backpropagation, evaluate the performance and tune the hyperparameters using the validation set, and finally evaluate the generalization performance of the model through the test set to obtain the trained water body extraction model. Step S5: Obtain the current remote sensing image of the water body to be extracted, preprocess and crop it according to the method in step S1, input it into the trained water extraction model, and output the water extraction result.
[0022] Furthermore, step S1 includes: Step S1-1: Acquire satellite remote sensing images covering a plain watershed, including water bodies such as rivers, ponds, and irrigation canals, as well as backgrounds such as farmland and buildings; Radiometric calibration: Based on the calibration coefficients provided by satellite sensors, a quantitative relationship is established between the digital quantization value of the image and the radiance value at the sensor inlet, eliminating the sensor's own response error and obtaining accurate radiance data; Atmospheric correction: The MODTRAN4+ radiative transfer algorithm is used to perform pixel-level correction on the radiance data, eliminating errors caused by atmospheric scattering, absorption and reflection, converting the radiance value into the actual surface reflectance, and improving the spectral authenticity of the image. Step S1-2: Obtain the 30m resolution digital elevation model (DEM) of the watershed, use the DEM to correct the terrain deformation of the radiometrically corrected image, and at the same time eliminate the geometric deformation caused by camera orientation and sensor error, and output a planar real image that meets the requirements of orthophoto projection. Step S1-3: The Pan-sharpening fusion algorithm is used to fuse the high-resolution panchromatic band with the multispectral band to generate a synthetic image with both high spatial resolution and rich spectral information. This fully utilizes the complementary features of different band data to provide support for subsequent water feature extraction.
[0023] Steps S1-4: The fused image is cropped into image slices of 512×512 pixels. The edges that are not full are filled with zero, resulting in a total of 2000 slices for subsequent processing.
[0024] Furthermore, step S2 includes: Step S2-1: A professional with remote sensing interpretation experience performs visual interpretation of the image slices obtained in step S1: all water areas are labeled, including irrigation canals with a width of <3m and ponds with an area of <50㎡, vector data is generated, and a binary water body mask label is generated based on the vector data: the pixel value of the water area is set to 1, and the non-water area is set to 0. The label size is consistent with the original slice size of 512×512 pixels. Step S2-2: Combine the "image slice-mask label" pairs to construct a water body dataset containing 2000 sets of data, and randomly divide it in a 7:2:1 ratio: training set: 1400 sets for model parameter learning; validation set: 400 sets for hyperparameter tuning; test set: 200 sets for generalization performance evaluation.
[0025] Furthermore, step S3 includes: Step S3-1: Input a 512×512 pixel image slice into the network, downsample it to 256×256 pixels through a 3×3 convolutional layer with a stride of 2, and input it into a Res2NetLayer. The Res2NetLayer is composed of 4 stacked Res2NetBlocks, which can express multi-scale features at a fine-grained level and increase the receptive field size of each layer. After processing by this layer, the output first-level feature map contains two sets: 256×256 pixels (branch): retains more detailed features of the original image, with high spatial resolution but shallow semantic information; 128×128 pixels (main path): after deeper convolutional processing, it contains richer semantic features, with reduced spatial resolution but a larger receptive field, and can capture the distribution trend of water bodies over a large area.
[0026] Step S3-2: Process the 256×256 pixel branch features (branch portion of the first-level feature map) output in step S3-1: Channel compression: 64 channels are compressed to 32 channels using 1×1 convolution, reducing computational load; Multi-branch feature extraction: Set a set of convolution kernel sizes containing several kernel sizes and a set of dilation rates containing several dilation rates. Extract feature information of different visual perceptions from the channel-compressed feature map through multiple parallel convolution branches. Each convolution branch selects a kernel size from the kernel size set and a dilation rate from the dilation rate set for combination configuration to form feature extraction paths with different receptive fields.
[0027] Feature fusion: The feature information output from each branch is concatenated to obtain multi-scale fused features. Finally, the multi-scale fused features are fused with the channel-compressed feature map through a 1×1 convolution to obtain a second-level feature map, which is retained for decoding fusion. This feature map not only retains the detailed information of the branch features but also integrates semantic features at different scales, effectively alleviating the problem of easy loss of small water body features during processing. The 128×128 and 64×64 pixel branch features generated after processing the main features are all processed and retained according to the above MBDC module process. Step S3-3: Process the 128×128 pixel main path features output from step S3-1: Dynamic serpentine convolution branch: Employing a convolution kernel of a specific size, the kernel coordinates are iteratively adjusted to form a linear morphological structure, adapting to the shape of narrow water bodies and extracting their morphological features. In the dynamic serpentine convolution, when the kernel size is set to 9, the sampling points along the x-axis are denoted as... , where index The convolutional kernel, used to represent the offset distance of each sampling point relative to the center grid, employs a progressive coordinate update mechanism: based on the center position... As the starting point, the location of subsequent sampling points The coordinates are from the previous position The coordinates are superimposed with an offset. Thus, through this continuously dependent coordinate update method, the convolution kernel naturally forms a linear structural feature in the x-axis direction that conforms to the meandering shape of the water body; the formula in the x-axis direction is: The formula along the y-axis is: Due to the offset Typically, the result is a decimal; bilinear interpolation is used to obtain more accurate pixels. The bilinear interpolation formula is: ,in Indicates the decimal position of the x-axis and y-axis expressions. Represents the spatial location of an integer. The bilinear interpolation kernel is decomposed into two one-dimensional kernels as shown in the following equation: ; Dual attention branch: Features are processed through feature aggregation and feature allocation mechanisms to achieve complementary fusion of global and local features.
[0028] Feature fusion: The output features of the two processing steps are fused element-wise to obtain a third-level feature map. This feature map integrates the local morphological features and global contextual information of the narrow water body, significantly improving the distinguishability of the narrow water body from obscure backgrounds such as shadows and dark vegetation. Subsequent 64×64 pixel main path features are fused in the same way. Module process handling; Step S3-4: After processing by MBDC, the 32×32 pixel main path features are upsampled to 64×64 pixels through transposed convolution with a stride of 2, and then fused with the 64×64 pixel branch features retained in step S3-2. Repeated upsampling: 64×64→128×128→256×256→512×512 pixels, each level is fused with the branch features of the corresponding scale, finally reconstructing an output feature map with the same size as the input.
[0029] Furthermore, step S4 includes: Step S4-1: Input the training set slices into the network constructed in step S3, and obtain the water / non-water body classification prediction label for each pixel through forward propagation; Step S4-2: Using the cross-entropy loss function, calculate the difference between the classification prediction label and the real water body label pixel by pixel to obtain the loss value of each pixel, and aggregate the loss values of all pixels to obtain the overall loss value that characterizes the prediction effect of the image slice. Step S4-3: Based on the overall loss value, calculate the gradient using the backpropagation algorithm; use the Adam optimizer to update the network weights to minimize the cross-entropy loss function; calculate the cross-union ratio (CUI) using the validation set after each training cycle; stop training when the CUI does not improve for 15 consecutive cycles and save the optimal model.
[0030] Step S4-4: Input the test set into the trained model and evaluate the model's generalization performance on unseen data, including metrics such as crossover ratio, accuracy in extracting small water bodies, and accuracy in extracting narrow water bodies.
[0031] Furthermore, step S5 includes: Step S5-1: Obtain the current satellite remote sensing image of the watershed, and perform radiometric correction, orthorectification, and image fusion according to the methods in steps S1-1 to S1-3, and crop it into 512×512 pixel slices. Step S5-2: Input the preprocessed slices into the model trained in step S4, and output a 512×512 pixel binarized result (1 for water body, 0 for non-water body). Step S5-3: Stitch together all the slice results to obtain the current water distribution vector map of the watershed, which includes the location, boundary and morphological information of the water bodies.
[0032] The system includes: an image acquisition and preprocessing module, a dataset construction module, a network construction module, a model training module, and a water body extraction module; The image acquisition and preprocessing module is used to acquire historical remote sensing images containing information about surface water bodies, preprocess the historical remote sensing images, and crop the preprocessed images into image slices of a preset size. The dataset construction module is used to interpret and label the water bodies in the image slices, generate water body vector data, generate water body mask labels based on the water body vector data, combine the image slices with the corresponding water body mask labels to construct a water body dataset, and divide the water body dataset into a training set, a validation set and a test set. The network construction module is used to extract features from the input image through a residual multi-scale network combined with dilated convolution, perform multi-scale fusion processing on the extracted features, use dynamic snake convolution and attention mechanism to process features in parallel, and reconstruct an output feature map with the same size as the input image through upsampling operation. The model training module is used to train the water body extraction network model using the training set, calculate the difference between the predicted value and the true label using the loss function, update the network parameters through backpropagation, evaluate the performance and tune the hyperparameters using the validation set, and finally evaluate the generalization performance of the model through the test set to obtain the trained water body extraction model. The water extraction module is used to acquire the current remote sensing image of the water body to be extracted. After preprocessing and cropping according to the method of the image acquisition and preprocessing module, it is input into the trained water extraction model and the water extraction result is output.
[0033] The image acquisition and preprocessing module includes: A radiometric correction unit is used to acquire historical remote sensing images containing information about surface water bodies and to perform radiometric correction on the historical remote sensing images, including radiometric calibration and atmospheric correction. Orthorectification unit, used to orthorectify radiometrically corrected images; The image fusion unit is used to perform image fusion on orthorectified images; The dataset building module includes: The annotation unit is used to perform visual interpretation and annotation of water body information in the image slice, create water body vectors and generate water body labels; The dataset partitioning unit is used to cut the original image and the corresponding water body label into image slices, construct the water body dataset and divide it into training set, validation set and test set.
[0034] The network building blocks include: The feature extraction unit is used to downsample the input image and extract features through a residual multi-scale network. The multi-scale fusion unit is used to perform multi-scale fusion processing on the extracted features, and extracts feature information of different visual perceptions through multiple parallel convolutional branches. The feature optimization unit is used to simultaneously perform dynamic serpentine convolution and dual attention processing on the fused features; The feature reconstruction unit is used to reconstruct an output feature map of the same size as the input image through an upsampling operation; The model training module includes: The forward propagation unit is used to input the training set into the network model and calculate the classification prediction label through forward propagation; The loss calculation unit is used to calculate the difference between the predicted label and the true label using the cross-entropy loss function to obtain the overall loss value; The parameter update unit is used to update the network weights based on the overall loss value using the backpropagation algorithm.
[0035] The water extraction module includes: The preprocessing unit is used to acquire current remote sensing images and perform preprocessing and cropping. The inference unit is used to input the preprocessed image slices into the trained water extraction network model for processing. The result generation unit is used to determine water body distribution information based on the processing results of all image slices.
[0036] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A water extraction method based on dilated convolution and dynamic serpentine convolution, characterized in that: Includes the following steps: Step S1: Acquire historical remote sensing images containing information about surface water bodies, preprocess the historical remote sensing images, and crop the preprocessed images into image slices of a preset size. Step S2: Interpret and label the water bodies in the image slices to generate water body vector data, and generate water body mask labels based on the water body vector data; combine the image slices with the corresponding water body mask labels to construct a water body dataset, and divide the water body dataset into a training set, a validation set and a test set; Step S3: Extract features from the input image using a residual multi-scale network combined with dilated convolution, perform multi-scale fusion processing on the extracted features, use dynamic snake convolution and attention mechanism to process features in parallel, and reconstruct an output feature map with the same size as the input image through upsampling operation; Step S4: Train the water body extraction network model using the training set, calculate the difference between the predicted value and the true label using the loss function, update the network parameters through backpropagation, evaluate the performance and tune the hyperparameters using the validation set, and finally evaluate the generalization performance of the model through the test set to obtain the trained water body extraction model. Step S5: Obtain the current remote sensing image of the water body to be extracted, preprocess and crop it according to the method in step S1, input it into the trained water extraction model, and output the water extraction result.
2. The water extraction method based on dilated convolution and dynamic serpentine convolution according to claim 1, characterized in that: Step S1 includes: Step S1-1: Acquire historical remote sensing images containing information about surface water bodies, and perform radiometric correction on the historical remote sensing images, including radiometric calibration and atmospheric correction; the radiometric calibration is to establish a quantitative relationship between digital quantization values and radiance values in the corresponding field of view; the atmospheric correction is to convert radiance values into actual surface reflectance based on the MODRAN4+ radiative transfer algorithm. Step S1-2: Perform orthorectification on the radiometrically corrected image and use the digital elevation model to perform terrain deformation correction on all pixels in the image. Step S1-3: Perform image fusion on the orthorectified image to generate a composite image.
3. The water extraction method based on dilated convolution and dynamic serpentine convolution according to claim 2, characterized in that: Step S2 includes: Step S2-1: Visual interpretation and water body annotation of the water body information in the image slice by professional interpreters, and creation of visually interpreted water body vectors; water body masking based on the water body vectors to generate water body labels; Step S2-2: Cut the original image and the corresponding water body label into 512×512 pixel image slices to construct a water body dataset for training, and divide the water body dataset into a training set, a validation set and a test set.
4. The water extraction method based on dilated convolution and dynamic serpentine convolution according to claim 3, characterized in that, Step S3 includes: Step S3-1: Downsample the input image by passing a 512×512 pixel image slice downsampled to 256×256 pixels through a convolutional layer with a stride of 2, and input it into the residual multi-scale network layer for feature extraction to obtain the first-level feature map. Step S3-2: Perform multi-scale fusion processing on the first-level feature map. First, the first-level feature map is convolved with 1×1 to obtain a channel-compressed feature map. A set of convolution kernel sizes and a set of dilation rates are set. Multiple parallel convolution branches are used to extract different visually perceptual feature information from the channel-compressed feature map. Each convolution branch selects a kernel size from the kernel size set and a dilation rate from the dilation rate set to form feature extraction paths with different receptive fields. The receptive field represents the area size in the original input image corresponding to a pixel in the output feature map of each convolution branch. The feature information output by each branch is concatenated to obtain a multi-scale fusion feature. Finally, the multi-scale fusion feature is fused with the channel-compressed feature map using 1×1 convolution to obtain the second-level feature map. Step S3-3: Perform dynamic serpentine convolution and dual attention processing on the second-level feature map simultaneously. Input features are fed into the dynamic serpentine convolution branch and the dual attention branch in parallel. The dynamic serpentine convolution forms a linear structure by iteratively adjusting the kernel coordinates, while the dual attention branch processes features through feature aggregation and feature allocation mechanisms. The output features of the two branches are fused by element-wise addition to obtain the third-level feature map. Step S3-4: The size of the third-level feature map is enlarged by repeated upsampling operations, and then added and fused with the feature map of the same scale retained in the encoder to reconstruct an output feature map of the same size as the input image.
5. The water extraction method based on dilated convolution and dynamic serpentine convolution according to claim 4, characterized in that, Step S4 includes: Step S4-1: Input the training set into the network model and calculate the water or non-water body classification prediction label of the pixel through forward propagation; Step S4-2: Using the cross-entropy loss function, calculate the difference between the classification prediction label and the real water body label pixel by pixel to obtain the loss value of each pixel, and aggregate the loss values of all pixels to obtain the overall loss value characterizing the prediction effect of the image slice. Step S4-3: Based on the overall loss value, calculate the gradient using the backpropagation algorithm, and use the optimizer to update the network weights to minimize the cross-entropy loss function.
6. The water extraction method based on dilated convolution and dynamic serpentine convolution according to claim 5, characterized in that, Step S5 includes: Step S5-1: Obtain the current remote sensing image containing surface water information, preprocess it according to the radiometric correction, orthorectification and image fusion methods described in step S1, and crop it into 512×512 pixel image slices. Step S5-2: Input the remote sensing image slices into the trained water body extraction network model for processing, and generate water body extraction results based on the output feature map; Step S5-3: Based on the water body extraction results of all remote sensing image slices, determine the water body distribution information in the current remote sensing image.
7. A water extraction system based on dilated convolution and dynamic serpentine convolution, used to execute the water extraction method based on dilated convolution and dynamic serpentine convolution as described in any one of claims 1-6, characterized in that: The system includes: The system includes modules for image acquisition and preprocessing, dataset construction, network construction, model training, and water extraction. The image acquisition and preprocessing module is used to acquire historical remote sensing images containing information about surface water bodies, preprocess the historical remote sensing images, and crop the preprocessed images into image slices of a preset size. The dataset construction module is used to interpret and label the water bodies in the image slices, generate water body vector data, generate water body mask labels based on the water body vector data, combine the image slices with the corresponding water body mask labels to construct a water body dataset, and divide the water body dataset into a training set, a validation set and a test set. The network construction module is used to extract features from the input image through a residual multi-scale network combined with dilated convolution, perform multi-scale fusion processing on the extracted features, use dynamic snake convolution and attention mechanism to process features in parallel, and reconstruct an output feature map with the same size as the input image through upsampling operation. The model training module is used to train the water body extraction network model using the training set, calculate the difference between the predicted value and the true label using the loss function, update the network parameters through backpropagation, evaluate the performance and tune the hyperparameters using the validation set, and finally evaluate the generalization performance of the model through the test set to obtain the trained water body extraction model. The water extraction module is used to acquire the current remote sensing image of the water body to be extracted. After preprocessing and cropping according to the method of the image acquisition and preprocessing module, it is input into the trained water extraction model and the water extraction result is output.
8. The water extraction system based on dilated convolution and dynamic serpentine convolution according to claim 7, characterized in that, The image acquisition and preprocessing module includes: A radiometric correction unit is used to acquire historical remote sensing images containing information about surface water bodies and to perform radiometric correction on the historical remote sensing images, including radiometric calibration and atmospheric correction. Orthorectification unit, used to orthorectify radiometrically corrected images; The image fusion unit is used to perform image fusion on orthorectified images; The dataset construction module includes: The annotation unit is used to perform visual interpretation and annotation of water body information in the image slice, create water body vectors and generate water body labels; The dataset partitioning unit is used to cut the original image and the corresponding water body label into image slices, construct the water body dataset and divide it into training set, validation set and test set.
9. The water extraction system based on dilated convolution and dynamic serpentine convolution according to claim 8, characterized in that, The network construction module includes: The feature extraction unit is used to downsample the input image and extract features through a residual multi-scale network. The multi-scale fusion unit is used to perform multi-scale fusion processing on the extracted features, and extracts feature information of different visual perceptions through multiple parallel convolutional branches. The feature optimization unit is used to simultaneously perform dynamic serpentine convolution and dual attention processing on the fused features; The feature reconstruction unit is used to reconstruct an output feature map of the same size as the input image through an upsampling operation; The model training module includes: The forward propagation unit is used to input the training set into the network model and calculate the classification prediction label through forward propagation; The loss calculation unit is used to calculate the difference between the predicted label and the true label using the cross-entropy loss function to obtain the overall loss value; The parameter update unit is used to update the network weights based on the overall loss value using the backpropagation algorithm.
10. The water extraction system based on dilated convolution and dynamic serpentine convolution according to claim 9, characterized in that, The water extraction module includes: The preprocessing unit is used to acquire current remote sensing images and perform preprocessing and cropping. The inference unit is used to input the preprocessed image slices into the trained water extraction network model for processing. The result generation unit is used to determine water body distribution information based on the processing results of all image slices.
Citation Information
Patent Citations
Pavement crack segmentation method based on adaptive feature extraction and attention fusion
CN119444768A
Tibet plateau lake extraction method and equipment based on unsupervised deep learning
CN120126018A
ConvNeXt and efficient multi-scale feature fusion-based water body extraction method
CN120219766A
Medical blood vessel segmentation dynamic optimization method and system based on anatomical prior perception
CN120451180A
Remotely-sensed image-based terrain classification method, and system
WO2021184891A1