Water body extraction method, device, equipment and storage medium based on remote sensing image

Through the water body extraction method based on remote sensing images, including image pretreatment, model training and result optimization, the problem of low water body extraction accuracy in the prior art is solved, and higher water body extraction accuracy and reliability of flood disaster data are achieved.

CN113869331BActive Publication Date: 2025-03-28PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111189625.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-13
Publication Date
2025-03-28
Estimated Expiration
2041-10-13

AI Technical Summary

Technical Problem

The existing water extraction method is based on spectral characteristic analysis, and has the problem of strong subjectivity and insufficient accuracy.

Method used

The water body extraction method based on remote sensing images is adopted, including obtaining the original remote sensing image, performing image preprocessing and sample transformation, dividing training and verification data sets, training area recognition models, optimizing water body extraction results, and performing contour post-processing to improve accuracy.

Benefits of technology

It improves the accuracy of water extraction, can more accurately identify the water range, and improves the accuracy of data in flood disaster prevention and control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113869331B_ABST
    Figure CN113869331B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence technology, and discloses a water body extraction method based on remote sensing images, including: performing image preprocessing and sample transformation on an original remote sensing image set to obtain a transformed image set, and dividing the transformed image set into a training data set and a verification data set, using the training data set to train a region recognition model and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model, using the standard region recognition model to extract the original water body extraction result of the image to be recognized, and optimizing the original water body extraction result to obtain an optimized water body extraction result, and performing contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result. In addition, the present invention also relates to blockchain technology, and the transformed image set can be stored in a node of the blockchain. The present invention also proposes a water body extraction device, an electronic device, and a storage medium based on remote sensing images. The present invention can improve the accuracy of water body extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a water body extraction method, device, electronic equipment and computer-readable storage medium based on remote sensing images. Background Art

[0002] Nowadays, flood disasters are happening more and more frequently in the world. Every year, flood disasters will pose a serious threat to the national economy and people's economic and property security of various countries. Due to the suddenness of flood disasters and the uncertainty of the time and scope of occurrence, flood disaster prevention and control is very difficult. The important means of flood prevention and control is mainly based on the scope of flood inundation to further formulate plans, but the key issue is how to accurately identify the scope of the water body and determine the scope of flood inundation based on the water body. The existing methods are usually based on the spectral characteristics of the water body to analyze and separate the water body from the background. This method is highly subjective and the accuracy of water body extraction is not high enough. Summary of the invention

[0003] The present invention provides a water body extraction method, device and computer-readable storage medium based on remote sensing images, the main purpose of which is to improve the accuracy of water body extraction.

[0004] To achieve the above object, the present invention provides a water body extraction method based on remote sensing images, comprising:

[0005] Acquire an original remote sensing image set, perform image preprocessing on the original remote sensing image set, and obtain a corrected remote sensing image set;

[0006] Performing sample transformation on the corrected remote sensing image set to obtain a transformed image set, and dividing the transformed image set into a training data set and a verification data set;

[0007] Using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model;

[0008] Inputting the pre-acquired image to be identified into the standard area identification model to obtain the original water body extraction result;

[0009] The original water body extraction result is optimized by using a preset active contour algorithm to obtain an optimized water body extraction result;

[0010] The optimized water body extraction result is subjected to contour post-processing to obtain a standard water body extraction result.

[0011] Optionally, performing sample transformation on the corrected remote sensing image set to obtain a transformed image set includes:

[0012] Performing labeling processing on the corrected remote sensing image set to obtain a labeled image set;

[0013] Aggregating the annotated image set and the corrected remote sensing image set to obtain an aggregated image set, and cropping the aggregated image set based on a preset input size to obtain a cropped image set;

[0014] The cropped images whose preset target areas are smaller than a preset threshold value in the cropped image set are deleted to obtain a transformed image set.

[0015] Optionally, the using the training data set to train a preset region recognition model to obtain a trained region recognition model includes:

[0016] Receive a preset initial learning rate, number of iterations, and optimization algorithm;

[0017] Performing feature extraction on the training data set to obtain a feature data set;

[0018] Inputting the feature data set into a preset convolutional neural network to capture the relationship and obtain a prediction recognition result;

[0019] Calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result using a preset cross entropy loss function;

[0020] When the cross entropy loss value is greater than or equal to a preset loss threshold, the optimization algorithm is used to optimize and adjust the model parameters of the region recognition model until the cross entropy loss value is less than the loss threshold, and the trained region recognition model is output.

[0021] Optionally, extracting features from the training data set to obtain a feature data set includes:

[0022] Filling the training data set with zero values ​​to obtain a filled data set;

[0023] Performing convolution processing and pooling processing on the filled data set respectively to obtain a pooled data set;

[0024] The pooled data set is input into a preset dense module for connection processing to obtain a feature data set.

[0025] Optionally, the optimizing process of the original water body extraction result by using a preset active contour algorithm to obtain an optimized water body extraction result includes:

[0026] Extracting an original contour curve corresponding to the original water body extraction result, and constructing an energy function based on the original contour curve;

[0027] The energy function is solved for a minimum value, and when the minimum value is obtained, the corresponding contour curve is output as an optimized water body extraction result.

[0028] Optionally, performing contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result includes:

[0029] Determine whether there are intersecting line segments in the optimized water body extraction result;

[0030] If there are intersecting line segments in the optimized water body extraction result, the intersecting line segments are interrupted and reconnected to obtain a reconstructed water body extraction result;

[0031] When the contour area in the reconstructed water body extraction result is greater than a preset threshold, the reconstructed water body extraction result is output as a standard water body extraction result.

[0032] Optionally, performing image preprocessing on the original remote sensing image set to obtain a corrected remote sensing image set includes:

[0033] The original remote sensing image set is subjected to orthorectification, radiation calibration and atmospheric correction to obtain a corrected remote sensing image set.

[0034] In order to solve the above problems, the present invention also provides a water body extraction device based on remote sensing images, the device comprising:

[0035] An image processing module is used to obtain an original remote sensing image set, perform image preprocessing on the original remote sensing image set to obtain a corrected remote sensing image set, perform sample transformation on the corrected remote sensing image set to obtain a transformed image set, and divide the transformed image set into a training data set and a verification data set;

[0036] A water body extraction module is used to train a preset region recognition model using the training data set to obtain a trained region recognition model, and to verify the trained region recognition model using the verification data set to obtain a standard region recognition model, and to input the pre-acquired image to be recognized into the standard region recognition model to obtain an original water body extraction result;

[0037] A result optimization module, used for optimizing the original water body extraction result by using a preset active contour algorithm to obtain an optimized water body extraction result;

[0038] The contour post-processing module is used to perform contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result.

[0039] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0040] at least one processor; and,

[0041] a memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned water body extraction method based on remote sensing images.

[0043] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned water body extraction method based on remote sensing images.

[0044] The embodiment of the present invention trains a standard region recognition model, and uses the standard region recognition model to recognize the pre-acquired image to be recognized to obtain the original water body extraction result. The standard region recognition model can make the region recognition result more accurate. The original water body extraction result is optimized using a preset active contour algorithm to obtain an optimized water body extraction result. The active contour algorithm can adjust and optimize the contours in the original water body extraction result, and perform contour post-processing on the optimized water body extraction result to obtain a smooth and accurate standard water body extraction result. Therefore, the water body extraction method, device, electronic device and computer-readable storage medium based on remote sensing images proposed in the present invention can solve the problem of insufficient accuracy of water body extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a flow chart of a water body extraction method based on remote sensing images provided in one embodiment of the present invention;

[0046] Figure 2 A functional module diagram of a water body extraction device based on remote sensing images provided by an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of the structure of an electronic device for implementing the water body extraction method based on remote sensing images provided in one embodiment of the present invention.

[0048] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0050] The embodiment of the present application provides a water body extraction method based on remote sensing images. The execution subject of the water body extraction method based on remote sensing images includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided in the embodiment of the present application. In other words, the water body extraction method based on remote sensing images can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.

[0051] Reference Figure 1 FIG. 1 is a flow chart of a water body extraction method based on remote sensing images provided by an embodiment of the present invention. In this embodiment, the water body extraction method based on remote sensing images includes:

[0052] S1. Acquire an original remote sensing image set, and perform image preprocessing on the original remote sensing image set to obtain a corrected remote sensing image set.

[0053] In the embodiment of the present invention, the original remote sensing image set (Remote Sensing Image) refers to films or photos that record the electromagnetic wave size of various ground objects, mainly divided into aerial photos and satellite photos. The 16-meter resolution remote sensing image of the Gaofen-1 multispectral camera WFV can be obtained from the China Resources Satellite Application Center.

[0054] Specifically, the image preprocessing of the original remote sensing image set to obtain the corrected remote sensing image set includes:

[0055] The original remote sensing image set is subjected to orthorectification, radiation calibration and atmospheric correction to obtain a corrected remote sensing image set.

[0056] In detail, the orthorectification refers to selecting some ground control points on the image, and using the digital elevation model (DEM) data within the image range that has been obtained, to simultaneously correct the tilt and projection difference of the image, and resample the image into an orthophoto. After splicing and mosaicking multiple orthophotos together and performing color balance processing, the image cut out within a certain range is the orthophoto map. Orthophotos have both topographic map characteristics and image characteristics, are rich in information, and can be used as a data source for GIS, thereby enriching the expression form of the geographic information system. The radiation calibration refers to the need to convert the brightness grayscale value of the image into absolute radiation brightness when the user needs to calculate the spectral reflectance or spectral radiation brightness of the object, or when the images acquired by different sensors at different times need to be compared. The atmospheric correction refers to the fact that the total radiation brightness of the ground target finally measured by the sensor is not a reflection of the true reflectance of the surface, and includes the radiation error caused by atmospheric absorption, especially scattering. The atmospheric correction refers to the process of eliminating the radiation error caused by the influence of the atmosphere and inverting the true surface reflectance of the object.

[0057] S2. Perform sample transformation on the corrected remote sensing image set to obtain a transformed image set, and divide the transformed image set into a training data set and a verification data set.

[0058] In the embodiment of the present invention, sample changes are performed on the calibrated remote sensing image set, and the obtained transformed image set can be used for subsequent training and verification of the model.

[0059] Specifically, performing sample transformation on the corrected remote sensing image set to obtain a transformed image set includes:

[0060] Performing labeling processing on the corrected remote sensing image set to obtain a labeled image set;

[0061] Aggregating the annotated image set and the corrected remote sensing image set to obtain an aggregated image set, and cropping the aggregated image set based on a preset input size to obtain a cropped image set;

[0062] The cropped images whose preset target areas are smaller than a preset threshold value in the cropped image set are deleted to obtain a transformed image set.

[0063] In detail, the labeling process refers to manually labeling the water bodies therein to form binary label images of water bodies and non-water bodies of the same size corresponding to the corrected remote sensing image set, and the preset input size is 224*224px.

[0064] Furthermore, the transformed image set is divided into a training data set and a verification data set according to a preset division ratio.

[0065] Preferably, the division ratio of the training data set to the verification data set is 8:2.

[0066] In detail, the training dataset is a data sample used for model fitting, and the validation dataset is used to adjust the hyperparameters of the model and to perform a preliminary evaluation of the capabilities of the model.

[0067] S3. Using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model.

[0068] In an embodiment of the present invention, the preset region recognition model is a deep convolutional neural network.

[0069] Specifically, the using the training data set to train a preset region recognition model to obtain a trained region recognition model includes:

[0070] Receive a preset initial learning rate, number of iterations, and optimization algorithm;

[0071] Performing feature extraction on the training data set to obtain a feature data set;

[0072] Inputting the feature data set into a preset convolutional neural network to capture the relationship and obtain a prediction recognition result;

[0073] Calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result using a preset cross entropy loss function;

[0074] When the cross entropy loss value is greater than or equal to a preset loss threshold, the optimization algorithm is used to optimize and adjust the model parameters of the region recognition model until the cross entropy loss value is less than the loss threshold, and the trained region recognition model is output.

[0075] In detail, in this solution, the initial learning rate of the region recognition model is set to 0.0001, the number of iterations of the model is 60,000 times, and the optimization algorithm can adopt the Adam algorithm.

[0076] Furthermore, the extracting features from the training data set to obtain a feature data set includes:

[0077] Filling the training data set with zero values ​​to obtain a filled data set;

[0078] Performing convolution processing and pooling processing on the filled data set respectively to obtain a pooled data set;

[0079] The pooled data set is input into a preset dense module for connection processing to obtain a feature data set.

[0080] In detail, since the subsequent convolution processing will reduce the size of the training data set, the training data set is first filled with 3*3 zero values, which can increase the size of the training data on the one hand and strengthen the edge information of the training data on the other hand. The convolution processing is a 7*7 convolution, and the pooling processing is a 3*3 maximum pooling. The preset dense module is constructed by four dense blocks and a transition block, in which the structure of the dense block is a 1*1 convolution followed by a 3*3 convolution, and then a polymerization layer is added to fuse the features of the first two layers of convolution. The most significant feature of the dense block and the ordinary feedforward neural network is the dense connection between the convolution layers. On the one hand, it can realize the reuse of features, greatly reduce the number of parameters, improve computing efficiency, and solve the problem of gradient vanishing when the network layer is too deep; on the other hand, each convolution layer is designed to be very narrow, reducing the redundancy of the network.

[0081] Specifically, the feature data set is input into a preset convolutional neural network for relationship capture to obtain a prediction recognition result, including: using the self-attention mechanism in the spatial attention module to capture the spatial dependency between any two positions, aggregating the features of all positions by weighted summation, and the second multiplication operation in the two attention modules contains a scale coefficient, which is initialized to 0, and then obtains a larger weight through continuous learning. Finally, the output results of the two attention modules are added and fused to obtain a prediction recognition result.

[0082] In detail, by adding two attention modules to model the semantic dependencies in the spatial dimension and channel dimension respectively, similar features at any scale are adaptively integrated from a global perspective to improve the recognition accuracy.

[0083] Furthermore, the calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result by using a preset cross entropy loss function includes:

[0084] The cross entropy loss value between the predicted recognition result and the preset true recognition result is calculated using the following formula:

[0085]

[0086] Among them, loss is the cross entropy loss value, is the predicted recognition result, y i is the true recognition result, and n is the total number of data.

[0087] Specifically, the trained region recognition model is verified using the verification data set to obtain a standard region recognition model.

[0088] S4. Input the pre-acquired image to be identified into the standard region identification model to obtain the original water body extraction result.

[0089] In an embodiment of the present invention, the pre-acquired image to be identified is input into the standard area recognition model to obtain the original water body extraction result. The standard area recognition model can more accurately identify the water body in the target area of ​​the pre-acquired image to be identified, thereby obtaining the original water body extraction result.

[0090] Specifically, before inputting the pre-acquired image to be recognized into the standard region recognition model, the method further includes cropping the image to be recognized into the preset input size, wherein the preset input size is 224*224.

[0091] In detail, by using the standard region recognition model for water body recognition, the water body extraction results can be preliminarily obtained and serve as the basis for subsequent optimization and contour post-processing.

[0092] S5. Optimizing the original water body extraction result using a preset active contour algorithm to obtain an optimized water body extraction result.

[0093] In the embodiment of the present invention, the active contour algorithm is a B-snake model. The B-snake model, while retaining the internal force expression of the classic snake model, uses a balloon force perpendicular to the contour line, with a constant magnitude and a direction along the external normal line to replace the original gradient external force. The magnitude of the balloon force is the sum of the contour unit external normal vector and the image unit negative gradient.

[0094] Specifically, the optimizing process of the original water body extraction result by using a preset active contour algorithm to obtain an optimized water body extraction result includes:

[0095] Extracting an original contour curve corresponding to the original water body extraction result, and constructing an energy function based on the original contour curve;

[0096] The energy function is solved for a minimum value, and when the minimum value is obtained, the corresponding contour curve is output as an optimized water body extraction result.

[0097] Furthermore, constructing an energy function based on the original contour curve includes:

[0098]

[0099] Wherein, v′(s) and v″(s) represent the first-order derivative and the second-order derivative of the original contour curve, respectively, N(s) is the unit external normal direction of the original contour curve, is the external energy gradient, is the image force, indicating the direction of the Gaussian external force, α(s) and β(s) are the coefficients of the smoothing force and the continuous force respectively, k1 is the expansion force coefficient, when k1>0, the contour expands outward, otherwise the contour shrinks inward, k is the image force coefficient.

[0100] Preferably, α(s)|v′(s)|2+β(s)|v″(s)| 2 Represents internal energy, Represents external energy.

[0101] In detail, the original water body extraction results obtained using the standard region recognition model often have problems such as inaccurate boundary segmentation and high noise. This scheme uses the B-snake model to further optimize the contours in the original water body extraction results and solve the minimum value of the energy function to make the contours smoother and the shape and position of the contours closer to the actual boundaries of the target.

[0102] S6. Perform contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result.

[0103] In the embodiment of the present invention, since there are narrow and long tubular small branches in the optimized water body extraction result, there are often self-intersections in the extraction result, so a contour post-processing step is performed to realize the detection and processing of these self-intersections.

[0104] Specifically, the contour post-processing of the optimized water body extraction result to obtain the standard water body extraction result includes:

[0105] Determine whether there are intersecting line segments in the optimized water body extraction result;

[0106] If there are intersecting line segments in the optimized water body extraction result, the intersecting line segments are interrupted and reconnected to obtain a reconstructed water body extraction result;

[0107] When the contour area in the reconstructed water body extraction result is greater than a preset threshold, the reconstructed water body extraction result is output as a standard water body extraction result.

[0108] In detail, the corresponding water body area can be calculated based on the standard water body extraction results, and finally the water body area changes in different periods can be obtained. The water body layers in different periods can be differentially analyzed to obtain the inundation range and inundation area of ​​flood disaster events.

[0109] The embodiment of the present invention trains a standard region recognition model, and uses the standard region recognition model to recognize the pre-acquired image to be recognized to obtain the original water body extraction result. The standard region recognition model can make the region recognition result more accurate. The original water body extraction result is optimized using a preset active contour algorithm to obtain an optimized water body extraction result. The active contour algorithm can adjust and optimize the contours in the original water body extraction result, and perform contour post-processing on the optimized water body extraction result to obtain a smooth and accurate standard water body extraction result. Therefore, the water body extraction method based on remote sensing images proposed in the present invention can solve the problem of insufficient accuracy of water body extraction.

[0110] like Figure 2 , which is a functional module diagram of a water body extraction device based on remote sensing images provided by an embodiment of the present invention.

[0111] The water body extraction device 100 based on remote sensing images of the present invention can be installed in an electronic device. According to the functions to be implemented, the water body extraction device 100 based on remote sensing images can include an image processing module 101, a water body extraction module 102, a result optimization module 103 and a contour post-processing module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0112] In this embodiment, the functions of each module / unit are as follows:

[0113] The image processing module 101 is used to obtain an original remote sensing image set, perform image preprocessing on the original remote sensing image set to obtain a corrected remote sensing image set, perform sample transformation on the corrected remote sensing image set to obtain a transformed image set, and divide the transformed image set into a training data set and a verification data set;

[0114] The water body extraction module 102 is used to train a preset region recognition model using the training data set to obtain a trained region recognition model, and to verify the trained region recognition model using the verification data set to obtain a standard region recognition model, and to input the pre-acquired image to be recognized into the standard region recognition model to obtain an original water body extraction result;

[0115] The result optimization module 103 is used to optimize the original water body extraction result by using a preset active contour algorithm to obtain an optimized water body extraction result;

[0116] The contour post-processing module 104 is used to perform contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result.

[0117] In detail, the specific implementation of each module of the water body extraction device 100 based on remote sensing images is as follows:

[0118] Step 1: Obtain an original remote sensing image set, perform image preprocessing on the original remote sensing image set, and obtain a corrected remote sensing image set.

[0119] In the embodiment of the present invention, the original remote sensing image set (Remote Sensing Image) refers to films or photos that record the electromagnetic wave size of various ground objects, mainly divided into aerial photos and satellite photos. The 16-meter resolution remote sensing image of the Gaofen-1 multispectral camera WFV can be obtained from the China Resources Satellite Application Center.

[0120] Specifically, the image preprocessing of the original remote sensing image set to obtain the corrected remote sensing image set includes:

[0121] The original remote sensing image set is subjected to orthorectification, radiation calibration and atmospheric correction to obtain a corrected remote sensing image set.

[0122] In detail, the orthorectification refers to selecting some ground control points on the image, and using the digital elevation model (DEM) data within the image range that has been acquired, to simultaneously perform tilt correction and projection error correction on the image, and resample the image into an orthophoto. After splicing and mosaicking multiple orthophotos together and performing color balancing, the image cut out within a certain range is the orthophoto map. Orthophotos have both topographic map characteristics and image characteristics, are rich in information, and can be used as a data source for GIS, thereby enriching the expression form of the geographic information system. The radiation calibration refers to the need to convert the brightness grayscale value of the image into absolute radiation brightness when the user needs to calculate the spectral reflectance or spectral radiation brightness of the object, or when the images acquired at different times and different sensors need to be compared. The atmospheric correction means that the total radiation brightness of the ground target finally measured by the sensor is not a reflection of the true reflectance of the surface, and includes the radiation error caused by atmospheric absorption, especially scattering.

[0123] The atmospheric correction is the process of eliminating the radiation error caused by the atmospheric influence and inverting the true surface reflectivity of the object.

[0124] Step 2: Perform sample transformation on the corrected remote sensing image set to obtain a transformed image set, and divide the transformed image set into a training data set and a verification data set.

[0125] In the embodiment of the present invention, sample changes are performed on the calibrated remote sensing image set, and the obtained transformed image set can be used for subsequent training and verification of the model.

[0126] Specifically, performing sample transformation on the corrected remote sensing image set to obtain a transformed image set includes:

[0127] Performing labeling processing on the corrected remote sensing image set to obtain a labeled image set;

[0128] Aggregating the annotated image set and the corrected remote sensing image set to obtain an aggregated image set, and cropping the aggregated image set based on a preset input size to obtain a cropped image set;

[0129] The cropped images whose preset target areas are smaller than a preset threshold value in the cropped image set are deleted to obtain a transformed image set.

[0130] In detail, the labeling process refers to manually labeling the water bodies therein to form binary label images of water bodies and non-water bodies of the same size corresponding to the corrected remote sensing image set, and the preset input size is 224*224px.

[0131] Furthermore, the transformed image set is divided into a training data set and a verification data set according to a preset division ratio.

[0132] Preferably, the division ratio of the training data set to the verification data set is 8:2.

[0133] In detail, the training dataset is a data sample used for model fitting, and the validation dataset is used to adjust the hyperparameters of the model and to perform a preliminary evaluation of the capabilities of the model.

[0134] Step three: using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model.

[0135] In an embodiment of the present invention, the preset region recognition model is a deep convolutional neural network.

[0136] Specifically, the using the training data set to train a preset region recognition model to obtain a trained region recognition model includes:

[0137] Receive a preset initial learning rate, number of iterations, and optimization algorithm;

[0138] Performing feature extraction on the training data set to obtain a feature data set;

[0139] Inputting the feature data set into a preset convolutional neural network to capture the relationship and obtain a prediction recognition result;

[0140] Calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result using a preset cross entropy loss function;

[0141] When the cross entropy loss value is greater than or equal to a preset loss threshold, the optimization algorithm is used to optimize and adjust the model parameters of the region recognition model until the cross entropy loss value is less than the loss threshold, and the trained region recognition model is output.

[0142] In detail, in this solution, the initial learning rate of the region recognition model is set to 0.0001, the number of iterations of the model is 60,000 times, and the optimization algorithm can adopt the Adam algorithm.

[0143] Furthermore, the extracting features from the training data set to obtain a feature data set includes:

[0144] Filling the training data set with zero values ​​to obtain a filled data set;

[0145] Performing convolution processing and pooling processing on the filled data set respectively to obtain a pooled data set;

[0146] The pooled data set is input into a preset dense module for connection processing to obtain a feature data set.

[0147] In detail, since the subsequent convolution processing will reduce the size of the training data set, the training data set is first filled with 3*3 zero values, which can increase the size of the training data on the one hand and strengthen the edge information of the training data on the other hand. The convolution processing is a 7*7 convolution, and the pooling processing is a 3*3 maximum pooling. The preset dense module is constructed by four dense blocks and a transition block, in which the structure of the dense block is a 1*1 convolution followed by a 3*3 convolution, and then a polymerization layer is added to fuse the features of the first two layers of convolution. The most significant feature of the dense block and the ordinary feedforward neural network is the dense connection between the convolution layers. On the one hand, it can realize the reuse of features, greatly reduce the number of parameters, improve computing efficiency, and solve the problem of gradient vanishing when the network layer is too deep; on the other hand, each convolution layer is designed to be very narrow, reducing the redundancy of the network.

[0148] Specifically, the feature data set is input into a preset convolutional neural network for relationship capture to obtain a prediction recognition result, including: using the self-attention mechanism in the spatial attention module to capture the spatial dependency between any two positions, aggregating the features of all positions by weighted summation, and the second multiplication operation in the two attention modules contains a scale coefficient, which is initialized to 0, and then obtains a larger weight through continuous learning. Finally, the output results of the two attention modules are added and fused to obtain a prediction recognition result.

[0149] In detail, by adding two attention modules to model the semantic dependencies in the spatial dimension and channel dimension respectively, similar features at any scale are adaptively integrated from a global perspective to improve the recognition accuracy.

[0150] Furthermore, the calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result by using a preset cross entropy loss function includes:

[0151] The cross entropy loss value between the predicted recognition result and the preset true recognition result is calculated using the following formula:

[0152]

[0153] Among them, loss is the cross entropy loss value, is the predicted recognition result, y i is the true recognition result, and n is the total number of data.

[0154] Specifically, the trained region recognition model is verified using the verification data set to obtain a standard region recognition model.

[0155] Step 4: input the pre-acquired image to be identified into the standard area recognition model to obtain the original water body extraction result.

[0156] In an embodiment of the present invention, the pre-acquired image to be identified is input into the standard area recognition model to obtain the original water body extraction result. The standard area recognition model can more accurately identify the water body in the target area of ​​the pre-acquired image to be identified, thereby obtaining the original water body extraction result.

[0157] Specifically, before inputting the pre-acquired image to be recognized into the standard region recognition model, the method further includes cropping the image to be recognized into the preset input size, wherein the preset input size is 224*224.

[0158] In detail, by using the standard region recognition model for water body recognition, the water body extraction results can be preliminarily obtained and serve as the basis for subsequent optimization and contour post-processing.

[0159] Step 5: Utilize a preset active contour algorithm to optimize the original water body extraction result to obtain an optimized water body extraction result.

[0160] In the embodiment of the present invention, the active contour algorithm is a B-snake model. The B-snake model, while retaining the internal force expression of the classic snake model, uses a balloon force perpendicular to the contour line, with a constant magnitude and a direction along the external normal line to replace the original gradient external force. The magnitude of the balloon force is the sum of the contour unit external normal vector and the image unit negative gradient.

[0161] Specifically, the optimizing process of the original water body extraction result by using a preset active contour algorithm to obtain an optimized water body extraction result includes:

[0162] Extracting an original contour curve corresponding to the original water body extraction result, and constructing an energy function based on the original contour curve;

[0163] The energy function is solved for a minimum value, and when the minimum value is obtained, the corresponding contour curve is output as an optimized water body extraction result.

[0164] Furthermore, constructing an energy function based on the original contour curve includes:

[0165]

[0166] Wherein, v′(s) and v″(s) represent the first-order derivative and the second-order derivative of the original contour curve, respectively, N(s) is the unit external normal direction of the original contour curve, is the external energy gradient, is the image force, indicating the direction of the Gaussian external force, α(s) and β(s) are the coefficients of the smoothing force and the continuous force respectively, k1 is the expansion force coefficient, when k1>0, the contour expands outward, otherwise the contour shrinks inward, k is the image force coefficient.

[0167] Preferably, α(s)|v′(s)|2+β(s)|v″(s)| 2 Represents internal energy, Represents external energy.

[0168] In detail, the original water body extraction results obtained using the standard region recognition model often have problems such as inaccurate boundary segmentation and high noise. This scheme uses the B-snake model to further optimize the contours in the original water body extraction results and solve the minimum value of the energy function to make the contours smoother and the shape and position of the contours closer to the actual boundaries of the target.

[0169] Step six: perform contour post-processing on the optimized water body extraction result to obtain a standard water body extraction result.

[0170] In the embodiment of the present invention, since there are narrow and long tubular small branches in the optimized water body extraction result, there are often self-intersections in the extraction result, so a contour post-processing step is performed to realize the detection and processing of these self-intersections.

[0171] Specifically, the contour post-processing of the optimized water body extraction result to obtain the standard water body extraction result includes:

[0172] Determine whether there are intersecting line segments in the optimized water body extraction result;

[0173] If there are intersecting line segments in the optimized water body extraction result, the intersecting line segments are interrupted and reconnected to obtain a reconstructed water body extraction result;

[0174] When the contour area in the reconstructed water body extraction result is greater than a preset threshold, the reconstructed water body extraction result is output as a standard water body extraction result.

[0175] In detail, the corresponding water body area can be calculated based on the standard water body extraction results, and finally the water body area changes in different periods can be obtained. The water body layers in different periods can be differentially analyzed to obtain the inundation range and inundation area of ​​flood disaster events.

[0176] The embodiment of the present invention trains a standard region recognition model, and uses the standard region recognition model to recognize the pre-acquired image to be recognized to obtain the original water body extraction result. The standard region recognition model can make the region recognition result more accurate. The original water body extraction result is optimized using a preset active contour algorithm to obtain an optimized water body extraction result. The active contour algorithm can adjust and optimize the contours in the original water body extraction result, and perform contour post-processing on the optimized water body extraction result to obtain a smooth and accurate standard water body extraction result. Therefore, the water body extraction method based on remote sensing images proposed in the present invention can solve the problem of insufficient accuracy of water body extraction.

[0177] like Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a water body extraction method based on remote sensing images provided by an embodiment of the present invention.

[0178] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a water body extraction program based on remote sensing images.

[0179] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a water body extraction program based on remote sensing images, etc.), and calling data stored in the memory 11.

[0180] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device, such as the code of a water body extraction program based on remote sensing images, but may also be used to temporarily store data that has been output or is to be output.

[0181] The communication bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0182] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0183] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0184] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0185] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0186] The water body extraction program based on remote sensing images stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0187] Acquire an original remote sensing image set, perform image preprocessing on the original remote sensing image set, and obtain a corrected remote sensing image set;

[0188] Performing sample transformation on the corrected remote sensing image set to obtain a transformed image set, and dividing the transformed image set into a training data set and a verification data set;

[0189] Using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model;

[0190] Inputting the pre-acquired image to be identified into the standard area identification model to obtain the original water body extraction result;

[0191] The original water body extraction result is optimized by using a preset active contour algorithm to obtain an optimized water body extraction result;

[0192] The optimized water body extraction result is subjected to contour post-processing to obtain a standard water body extraction result.

[0193] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0194] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0195] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0196] Acquire an original remote sensing image set, perform image preprocessing on the original remote sensing image set, and obtain a corrected remote sensing image set;

[0197] Performing sample transformation on the corrected remote sensing image set to obtain a transformed image set, and dividing the transformed image set into a training data set and a verification data set;

[0198] Using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model;

[0199] Inputting the pre-acquired image to be identified into the standard area identification model to obtain the original water body extraction result;

[0200] The original water body extraction result is optimized by using a preset active contour algorithm to obtain an optimized water body extraction result;

[0201] The optimized water body extraction result is subjected to contour post-processing to obtain a standard water body extraction result.

[0202] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0203] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0204] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0205] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0206] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0207] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0208] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0209] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A water body extraction method based on remote sensing images, characterized in that: The method comprises: Acquire an original remote sensing image set, perform image preprocessing on the original remote sensing image set, and obtain a corrected remote sensing image set; Performing sample transformation on the corrected remote sensing image set to obtain a transformed image set, and dividing the transformed image set into a training data set and a verification data set; Using the training data set to train a preset region recognition model to obtain a trained region recognition model, and using the verification data set to verify the trained region recognition model to obtain a standard region recognition model; Inputting the pre-acquired image to be identified into the standard area identification model to obtain the original water body extraction result; Extracting an original contour curve corresponding to the original water body extraction result, constructing an energy function based on the original contour curve, solving the minimum value of the energy function, and outputting the contour curve corresponding to the minimum value as the optimized water body extraction result; Determine whether there are intersecting line segments in the optimized water body extraction result. If there are intersecting line segments in the optimized water body extraction result, interrupt and reconnect the intersecting line segments to obtain a reconstructed water body extraction result. When the contour area in the reconstructed water body extraction result is greater than a preset threshold, output the reconstructed water body extraction result as a standard water body extraction result.

2. The water body extraction method based on remote sensing images according to claim 1, characterized in that: The step of performing sample transformation on the corrected remote sensing image set to obtain a transformed image set includes: Performing labeling processing on the corrected remote sensing image set to obtain a labeled image set; Aggregating the annotated image set and the corrected remote sensing image set to obtain an aggregated image set, and cropping the aggregated image set based on a preset input size to obtain a cropped image set; The cropped images whose preset target areas are smaller than a preset threshold value in the cropped image set are deleted to obtain a transformed image set.

3. The water body extraction method based on remote sensing images according to claim 1, characterized in that: The method of training a preset region recognition model using the training data set to obtain a trained region recognition model includes: Receive a preset initial learning rate, number of iterations, and optimization algorithm; Performing feature extraction on the training data set to obtain a feature data set; Inputting the feature data set into a preset convolutional neural network to capture the relationship and obtain a prediction recognition result; Calculating the cross entropy loss value between the predicted recognition result and the preset true recognition result using a preset cross entropy loss function; When the cross entropy loss value is greater than or equal to a preset loss threshold, the optimization algorithm is used to optimize and adjust the model parameters of the region recognition model until the cross entropy loss value is less than the loss threshold, and the trained region recognition model is output.

4. The water body extraction method based on remote sensing images as claimed in claim 3, characterized in that: The step of extracting features from the training data set to obtain a feature data set includes: Filling the training data set with zero values ​​to obtain a filled data set; Performing convolution processing and pooling processing on the filled data set respectively to obtain a pooled data set; The pooled data set is input into a preset dense module for connection processing to obtain a feature data set.

5. The water body extraction method based on remote sensing images according to claim 1, characterized in that: The performing image preprocessing on the original remote sensing image set to obtain the corrected remote sensing image set includes: The original remote sensing image set is subjected to orthorectification, radiation calibration and atmospheric correction to obtain a corrected remote sensing image set.

6. A water body extraction device based on remote sensing images, characterized in that: The device comprises: An image processing module is used to obtain an original remote sensing image set, perform image preprocessing on the original remote sensing image set to obtain a corrected remote sensing image set, perform sample transformation on the corrected remote sensing image set to obtain a transformed image set, and divide the transformed image set into a training data set and a verification data set; A water body extraction module is used to train a preset region recognition model using the training data set to obtain a trained region recognition model, and to verify the trained region recognition model using the verification data set to obtain a standard region recognition model, and to input the pre-acquired image to be recognized into the standard region recognition model to obtain an original water body extraction result; A result optimization module is used to extract the original contour curve corresponding to the original water body extraction result, construct an energy function based on the original contour curve, solve the minimum value of the energy function, and output the contour curve corresponding to the minimum value as the optimized water body extraction result; The contour post-processing module is used to determine whether there are intersecting line segments in the optimized water body extraction result. If there are intersecting line segments in the optimized water body extraction result, the intersecting line segments are interrupted and reconnected to obtain a reconstructed water body extraction result. When the contour area in the reconstructed water body extraction result is greater than a preset threshold, the reconstructed water body extraction result is output as a standard water body extraction result.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the water body extraction method based on remote sensing images as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the water body extraction method based on remote sensing images as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Remote sensing image segmentation method based on normalization index and multi-scale model

    CN110176005A

  • Remote sensing image ground object identification method and system, and computer readable storage medium

    CN112560544A