Water body detection model training method, aerial image water body detection method and device

By automatically labeling water bodies with spatial objects and detection results from an aerial imagery water body detection model and dynamically updating the training dataset, the problems of high cost and poor applicability are solved, achieving efficient and accurate water body detection.

CN116863356BActive Publication Date: 2026-03-27BEIJING AEROSPACE HONGTU INFORMATION TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing aerial imagery methods for water body detection suffer from high costs and poor applicability. In particular, deep learning methods require a large amount of training data, manual annotation is costly, and water body detection algorithms are difficult to adapt to the complex changes in different geographical environments.

Method used

By acquiring the training dataset, extracting a subset of the dataset for water body detection, and using the spatial objects and detection results of the water body detection model to determine whether labeling is required, the labels of the training dataset are dynamically updated. Furthermore, by dynamically calibrating the model parameters, manual labeling is reduced, and labeling efficiency and model accuracy are improved.

Benefits of technology

It significantly reduces the cost of producing training images, improves the applicability and accuracy of water body detection models, and enables reliable water body detection in different geographical environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116863356B_ABST
    Figure CN116863356B_ABST
Patent Text Reader

Abstract

The application provides a water body detection model training method, an aerial image water body detection method and device, comprising: obtaining a training data set, and extracting a sub-data set from the training data set; if the current iteration training is not the first iteration training, extracting a spatial object from the sub-data set, and performing water body detection on the sub-data set by using the water body detection model to obtain a water body detection result; judging whether to perform water body label annotation based on the spatial object and the water body detection result; if yes, performing dynamic calibration on the water body detection model, updating the water body label of the training data set based on the spatial object and the water body detection result, and performing the next round of iteration training based on the updated training data set until the iteration stop condition is met, and obtaining a target water body detection model. The application can significantly reduce the cost of producing training images, and can fully utilize a reasonable number of training images to train a target water body detection model which has wide applicability and high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of engineering technology for intelligent interpretation of aerial image targets, and in particular to a training method for a water body detection model, an aerial image water body detection method and device. Background Technology

[0002] Accurate acquisition of surface water information is of great significance for fields such as water monitoring, environmental protection, and urban planning. As one of the fundamental types of surface information, the accurate extraction of water information can provide valuable prior knowledge for various remote sensing applications, such as 3D urban reconstruction.

[0003] Currently, aerial imagery methods for water body detection are mainly categorized into threshold detection, machine learning, and deep learning. Threshold detection suffers from instability, low accuracy, and limited applicability. Machine learning requires manually designed image feature combinations, and the effectiveness of these features in distinguishing between water and non-water bodies significantly impacts algorithm performance. To address these issues, deep learning has been proposed for aerial imagery water body detection. However, deep learning demands massive amounts of training data, and the manual and economic costs of labeling water bodies in aerial imagery are also high, resulting in high costs for training data production. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a training method for a water body detection model, a method and apparatus for water body detection using aerial images, which can significantly reduce the cost of producing training images and can make full use of a reasonable number of training images to train a target water body detection model with wide applicability and high accuracy.

[0005] In a first aspect, embodiments of the present invention provide a method for training a water body detection model, comprising:

[0006] Obtain the training dataset and extract a subset of the training dataset;

[0007] If the current iteration of training is not the first iteration of training, then spatial objects are extracted from the subset of data, and water body detection results are obtained by performing water body detection on the subset of data through the water body detection model.

[0008] Based on the spatial object and the water body detection results, determine whether to perform water body labeling;

[0009] If so, the water body detection model is dynamically calibrated, and the water body labels of the training dataset are updated based on the spatial objects and the water body detection results, so as to carry out the next round of iterative training based on the updated training dataset until the iteration stopping condition is met, and the target water body detection model is obtained.

[0010] In one implementation, determining whether to label a water body based on the spatial object and the water body detection results includes:

[0011] For each training image in the subset dataset, the spatial object and the water body detection results corresponding to the training image are superimposed to obtain the object overlap.

[0012] If the overlap of the objects is within a preset threshold range, water body labeling is determined.

[0013] If the overlap of the objects is not within the preset threshold range, the water body labeling will be stopped.

[0014] In one implementation, updating the water body labels in the training dataset based on the spatial object and the water body detection results includes:

[0015] Training images whose object overlap is within a preset threshold range are identified as training images to be labeled;

[0016] Add water body labels to the training images to be labeled in the training dataset to update the water body labels in the training dataset.

[0017] In one embodiment, the water body detection model includes a water body detection encoder and a water body detection decoder connected in sequence, wherein the water body detection encoder includes a basic feature unit and an abstract semantic feature unit connected in sequence.

[0018] The water body detection results are obtained by performing water body detection on the subset of data using a water body detection model, including:

[0019] The basic features of the training images in the subset dataset are extracted using the basic feature units.

[0020] The abstract semantic features of the basic features are extracted through the abstract semantic feature unit;

[0021] The abstract semantic features are decoded by the water body detection decoder to obtain the water body detection result.

[0022] In one embodiment, the water body detection model further includes a context extraction unit connected to the water body detection decoder;

[0023] Dynamic calibration of the water body detection model includes:

[0024] The output cross-entropy loss value of the water body detection model is determined based on the water body detection results.

[0025] The context extraction unit extracts the context information of the water body detection result and determines the context cross-entropy loss value of the water body detection model based on the context information.

[0026] The target loss value is obtained by weighted summing of the output cross-entropy loss value and the context cross-entropy loss value.

[0027] The abstract semantic feature unit is dynamically calibrated using the target loss value.

[0028] In one implementation, obtaining the training dataset includes:

[0029] Acquire raw aerial imagery data;

[0030] Based on the aerial image data, spectral intensity simulation and / or spectral contrast simulation are performed to obtain simulated aerial image data; wherein, the spectral intensity simulation includes Gamma transformation simulation and / or linear transformation simulation, and the spectral contrast simulation includes one or more of the following: extremum stretching, extremum shearing, mean and variance stretching, histogram equalization, and contrast-limited adaptive histogram equalization.

[0031] The original aerial imagery data and the simulated aerial imagery data are used as training images to obtain a training dataset.

[0032] In one embodiment, the method further includes:

[0033] If the water body labeling is stopped based on the spatial object and the water body detection results, the water body detection model is dynamically calibrated, and the next round of iteration training is carried out based on the training dataset used in the previous iteration training process until the iteration stopping condition is met, and the target water body detection model is obtained.

[0034] Secondly, embodiments of the present invention also provide a method for detecting water bodies using aerial imagery, comprising:

[0035] Acquire aerial image data to be inspected;

[0036] The target water body detection model is pre-trained to perform water body detection on the aerial image data to be detected, and the water body detection result corresponding to the aerial image data to be detected is obtained.

[0037] The target water body detection model is obtained by training the water body detection model training method provided in any of the first aspects.

[0038] Thirdly, embodiments of the present invention also provide a training device for a water body detection model, comprising:

[0039] The training data acquisition module is used to acquire the training dataset and extract a sub-dataset from the training dataset;

[0040] The first detection module is used to extract spatial objects from the subset of the dataset if the current iteration training is not the first iteration training, and to perform water body detection on the subset of the dataset through the water body detection model to obtain water body detection results.

[0041] The judgment module is used to determine whether to perform water body labeling based on the spatial object and the water body detection results;

[0042] The calibration module is used to dynamically calibrate the water body detection model when the judgment result of the judgment module is yes, and update the water body labels of the training dataset based on the spatial object and the water body detection result, so as to perform the next round of iterative training based on the updated training dataset until the iteration stopping condition is met, and obtain the target water body detection model.

[0043] Fourthly, embodiments of the present invention also provide an aerial image water body detection device, comprising:

[0044] The image data acquisition module is used to acquire the aerial image data to be detected;

[0045] The second detection module is used to perform water body detection on the aerial image data to be detected using a pre-trained target water body detection model, and obtain the water body detection result corresponding to the aerial image data to be detected.

[0046] The target water body detection model is obtained by training the water body detection model training method provided in any of the first aspects.

[0047] Fifthly, embodiments of the present invention also provide an electronic device, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method provided in either the first or second aspect.

[0048] In a sixth aspect, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in either the first or second aspect.

[0049] This invention provides a training method and apparatus for a water body detection model. First, a training dataset is acquired, and a subset of the training dataset is extracted. If the current iteration is not the first iteration, spatial objects are extracted from the subset of the training dataset, and water body detection results are obtained by performing water body detection on the subset of the training dataset using the water body detection model. If water body labeling is performed based on spatial objects and water body detection results, the water body detection model needs to be dynamically calibrated, and the water body labels of the training dataset are updated based on spatial objects and water body detection results. The next round of iteration training is then performed based on the updated training dataset until the iteration stopping condition is met, and the target water body detection model is obtained. In each iteration of training, the above method updates the water body labels of the training dataset based on the spatial objects extracted from the extracted subset and the corresponding water body detection results output by the water body detection model. Then, it continues to extract subsets for iterative training from the updated training dataset. In this embodiment of the invention, the water body labeling process automatically queries incomplete water body identification areas using the spatial characteristics of water bodies and water body detection results for water body labeling. It can automatically retrieve water body objects to be labeled and effectively avoid duplicate labeling of similar water bodies, realizing semi-automatic water body labeling. This improves the efficiency of water body labeling and the effectiveness of water body samples, and significantly reduces the cost of producing training images. In addition, this embodiment of the invention can also make full use of a reasonable number of training images to train a target water body detection model with wide applicability and high accuracy.

[0050] This invention provides a method and apparatus for water body detection in aerial imagery. The method acquires aerial imagery data to be detected, and then uses a pre-trained target water body detection model to perform water body detection on the aerial imagery data, obtaining the corresponding water body detection results. The target water body detection model used in the above method is trained using a water body detection model training method, exhibiting high applicability and accuracy. Therefore, this target water body detection model can be used to reliably detect water bodies in different geographical environments, thereby significantly improving the accuracy of the water body detection results.

[0051] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0052] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0053] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0054] Figure 1 A flowchart illustrating a training method for a water body detection model provided in an embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of a process for labeling water bodies according to an embodiment of the present invention;

[0056] Figure 3 A schematic flowchart of an aerial imagery water body detection method provided in an embodiment of the present invention;

[0057] Figure 4 A flowchart illustrating a water body detection model training method and an aerial image water body detection method provided in an embodiment of the present invention;

[0058] Figure 5 An aerial image schematic diagram provided for an embodiment of the present invention;

[0059] Figure 6 Another aerial image schematic diagram provided for an embodiment of the present invention;

[0060] Figure 7 This is a schematic diagram illustrating the cross-union ratio of a water body detected by a target water body detection model according to an embodiment of the present invention;

[0061] Figure 8 Another aerial image schematic diagram provided for an embodiment of the present invention;

[0062] Figure 9 A schematic diagram of the structure of a training device for a water body detection model provided in an embodiment of the present invention;

[0063] Figure 10 This is a schematic diagram of the structure of an aerial imaging water body detection device provided in an embodiment of the present invention;

[0064] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, 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.

[0066] Aerial image water body detection refers to the detection technology that identifies and locates water bodies in aerial images based on image interpretation methods such as image classification and semantic segmentation.

[0067] Currently, aerial imagery methods for water body detection are mainly categorized into threshold detection, machine learning, and deep learning. Threshold detection calculates water body indicators, such as the Normalized Difference Water Index (NDWI), using aerial imagery and statistically analyzing these indicators to define thresholds for detecting water bodies. This method is computationally fast but has low accuracy. Threshold determination is highly dependent on the geographical location of the aerial imagery and the domain knowledge of the algorithm developers, leading to instability, low accuracy, and limited applicability. Machine learning calculates image features and utilizes the correspondence between water body samples and image features to train a classifier based on supervised learning. Commonly used image features include texture features, spatial features, spectral features, and statistical features. Commonly used classifiers include Support Vector Machines (SVM), Random Forests (RF), and K-nearest neighbors. Compared to threshold-based algorithms, this type of algorithm offers higher accuracy and requires less domain-specific empirical knowledge. However, its drawback lies in the fact that the selection of image features is virtually limitless, necessitating manual design of feature combinations. The effectiveness of image features in distinguishing between water and non-water bodies has a decisive impact on algorithm performance. Deep learning methods utilize the correspondence between aerial imagery and water bodies to train an end-to-end neural network, including convolutional neural networks, vision transformers, and graphical neural networks. These methods employ neural network models with millions or even tens of billions of parameters, learning the complex relationship between aerial image content and water bodies from the end-to-end based on thousands to millions of aerial images labeled with water body annotations. The accuracy of these algorithms is currently at the state-of-the-art level. Compared to the previous two techniques, deep learning requires the least domain knowledge. This method eliminates the need for manual selection of image features; instead, it automatically learns the most beneficial features for distinguishing water bodies through the correspondence between massive amounts of images and targets. The disadvantage of this type of method lies in the enormous demand for training data, and the high manual and economic costs of annotating water bodies in aerial imagery, resulting in high costs for producing training data. At the same time, due to the combined influence of external factors such as geographical location, topography, weather, aerial photography equipment, flight altitude, season, and time, as well as internal factors such as water mineral content, eutrophication level, pollution level, sediment content, and flow rate, the appearance of water bodies in aerial images is very complex. This results in a high demand for labeled data for water body detection and makes it difficult to widely apply detection algorithms.

[0068] In real-world production, there is a need for a generalizable water body detection algorithm with wide applicability and high accuracy, while simultaneously reducing algorithm development costs, especially the cost of producing training data. Based on this, embodiments of the present invention provide a training method for a water body detection model, an aerial imagery-based water body detection method and apparatus, which can significantly reduce the cost of producing training images and can fully utilize a reasonable number of training images to train a target water body detection model with wide applicability and high accuracy.

[0069] To facilitate understanding of this embodiment, a training method for a water body detection model disclosed in this embodiment of the invention will first be described in detail. (See [link to relevant documentation]). Figure 1 The diagram shows a training method for a water body detection model, which mainly includes the following steps S102 to S108:

[0070] Step S102: Obtain the training dataset and extract a subset from it. The training dataset includes multiple training images, which may include original aerial imagery data and simulated aerial imagery data corresponding to the original aerial impact data.

[0071] In one implementation, raw aerial imagery data can be acquired and subjected to spectral intensity simulation and / or spectral contrast simulation to obtain at least one simulated aerial imagery data corresponding to the raw aerial imagery data, which is used to enhance the training dataset. Then, a specified number (e.g., 20) of training images are randomly selected from the training dataset to obtain a subset dataset.

[0072] Step S104: If the current iteration of training is not the first iteration, then spatial objects are extracted from the subset of data, and water detection results are obtained by performing water detection on the subset of data using the water detection model. Here, spatial objects refer to each object contained in the training image (such as water objects, ground objects, etc.), and water detection results refer to the recognition results of water objects contained in the training image.

[0073] In one implementation, the training image can be processed by superpixel segmentation to obtain spatial objects in the training image, and the edges of each spatial object can be labeled in the training image. At the same time, the training image can be input into the water body detection model so that the water body detection model outputs water body detection results, which can also be in the form of labeling water body objects in the training image.

[0074] Step S106: Determine whether to label the water body based on the spatial object and water body detection results.

[0075] In one optional implementation, the condition for water body labeling can be that the overlap between the spatial objects in the training images and the water body detection results is within a preset threshold range during multiple consecutive training iterations. That is, the conditions for water body labeling include the number of iterations (i.e., the number of consecutive iterations) and the overlap condition (i.e., within the preset threshold range). Water body labeling is stopped only when both the number of iterations and the overlap condition are met simultaneously. For example, if the overlap between the spatial objects in the training images and the water body detection results in each training image in the subset of the dataset is not within the preset threshold range during three consecutive training iterations, water body labeling can be stopped.

[0076] In another optional implementation, the conditions for water body labeling can include only the overlap condition. That is, water body labeling can be stopped when the overlap between the spatial objects and water body detection results of each training image in the subset is not within a preset threshold range.

[0077] In practical implementation, the overlap between spatial objects and water detection results can be calculated. If the overlap between spatial objects and water detection results of a training image is within a preset threshold range, or if the overlap in the current iteration training process is not within the preset threshold range but the number of consecutive iterations does not meet the iteration number condition, it can be determined that the training image contains mixed objects. This indicates that the training effect of the water detection model is poor, water labeling is required, and the next round of iteration training should be determined.

[0078] Step S108: If yes, dynamically calibrate the water body detection model and update the water body labels in the training dataset based on spatial objects and water body detection results. Then, perform the next round of iterative training based on the updated training dataset until the iteration stopping condition is met, thus obtaining the target water body detection model. The water body labels are used to annotate the regions where water objects are located in the training images.

[0079] In one implementation, when it is determined that water body labeling is required, training images with an overlap within a preset threshold range are identified as training images to be labeled. Water body labels are manually added to these images, and the labeled training images are then added to the training dataset. Furthermore, since the overlap is within the preset threshold range, it indicates that the training effect of the water body detection model is poor, requiring continued training. At this point, transfer learning can be used to dynamically calibrate the model parameters of the water body detection model, and the next round of iterative training can be performed. A subset of the dataset is extracted from the updated training dataset, and steps S102 to S108 are repeated until the iteration stopping condition is met, thus obtaining the target water body detection model. The iteration stopping condition is the convergence of the loss value of the water body detection model.

[0080] In another implementation, when it is determined that water body labeling is not required, a subset of the dataset can be directly extracted from the training dataset used in the previous iteration, and the aforementioned steps S102 to S108 can be repeated until the iteration stopping condition is met, thereby obtaining the target water body detection model.

[0081] The water body detection model training method provided in this embodiment of the invention updates the water body labels of the training dataset based on the extraction of spatial objects from the extracted subset and the output of corresponding water body detection results by the water body detection model during each iteration of training. Then, a subset for iterative training is extracted from the updated training dataset. The water body labeling process in this embodiment of the invention utilizes the spatial characteristics of water bodies and the water body detection results to automatically query incomplete water body identification areas for water body labeling. It can automatically retrieve water body objects to be labeled and effectively avoid duplicate labeling of similar water bodies, realizing semi-automatic labeling of water body labels. This improves the efficiency of water body labeling and the effectiveness of water body samples, and significantly reduces the cost of producing training images. In addition, this embodiment of the invention can also make full use of a reasonable number of training images to train a target water body detection model with wide applicability and high accuracy.

[0082] To facilitate understanding of the foregoing embodiments, this invention provides a specific implementation method for training a water body detection model.

[0083] Currently, the main challenge in water body identification from aerial images lies in the differences in spectral characteristics of images acquired under different conditions. This invention uses image processing techniques combined with the characteristics of raw aerial image data to simulate the spectral diversity of the raw aerial image data. The resulting simulated aerial image data will be used for model training, thereby improving the model's stability in dealing with spectral differences.

[0084] Compared with the random color variations in conventional data augmentation in deep learning, the aerial image simulation method and parameter settings of this invention embodiment are more consistent with the characteristics of light intensity, exposure, and color of aerial images. This image simulation is designed based on the analysis and summary of common errors generated when a large number of water body detection results of the benchmark model are analyzed. Specifically, when performing the step of obtaining the training dataset, please refer to the following (1) to (3):

[0085] (1) Obtain the raw aerial imagery data. For example, if the raw aerial imagery data is A, let p i,j =A(i,j) represents the pixel value in the i-th row and j-th column of the original aerial image data A. The simulated aerial image data is... To simulate aerial image data The pixel value in the i-th row and j-th column. The function θ(·) is an image simulation function.

[0086] (2) Perform spectral intensity simulation and / or spectral contrast simulation based on aerial image data to obtain simulated aerial image data; wherein, spectral intensity simulation includes Gamma transformation simulation and / or linear transformation simulation, and spectral contrast simulation includes one or more of the following: extremum stretching, extremum shearing, mean and variance stretching, histogram equalization, and contrast-limited adaptive histogram equalization.

[0087] In one implementation, water body image simulation is performed primarily from two dimensions: spectral intensity and spectral contrast of the image.

[0088] Spectral intensity simulation includes Gamma transformation and linear transformation, see Methods 1 and 2 below:

[0089] Method 1, Gamma transformation:

[0090] Here, γ is also the hyperparameter of the Gamma transformation.

[0091] Method 2, Linear transformation:

[0092] Here, α is the hyperparameter of the linear transformation.

[0093] Spectral contrast simulation includes extreme value stretching, extreme value shearing, mean-variance stretching, histogram equalization, and contrast-constrained adaptive histogram equalization, as shown in methods 3 to 7 below:

[0094] Method 3 Optimal stretching:

[0095] Where max(A): the maximum pixel value in the original aerial image data A; min(A): the minimum pixel value in the original aerial image data A.

[0096] Method 4 Extreme value shearing:

[0097] Where, perc(A,β): the pixel value in the original aerial image data A at the β quantile, β∈{0.01,0.015,0.02}; perc(A,μ): the pixel value in the original aerial image data A at the μ quantile, μ∈{0.98,0.985,0.99}.

[0098] Method 5 Mean and variance stretching.

[0099] Method 6 Histogram stretching:

[0100] Hist_eq is used for histogram equalization.

[0101] Method 7, Limit contrast adaptive histogram equalization:

[0102] Among them, CLAHE is a limited contrast adaptive histogram equalization.

[0103] (3) Use the original aerial image data and simulated aerial image data as training images to obtain the training dataset.

[0104] The diversity of aerial imagery leads to poor stability and generalization ability of water body detection models, making them difficult to use in practical engineering. Typical factors affecting image diversity include: topography, climate, weather, lighting, sensor spectral settings, image preprocessing systems, and water mineral content. These factors can cause significant differences in spectral intensity and contrast of images.

[0105] By summarizing the systematic detection errors of the benchmark model, this embodiment of the invention selects the above seven image transformation methods and the hyperparameter search range of each method, aiming to establish a data simulation space from the dimensions of image spectral intensity and spectral contrast. This space mainly pursues two goals: First, when the differences between a single aerial image are too large, this image simulation method can provide data with smaller differences from general data through its simulation space to participate in the training; second, for a single image, this embodiment of the invention can also simulate the performance of the same ground features under different influencing factors. By training a deep learning model with the aerial image data simulated by this embodiment of the invention, the model can be made capable of resisting image differences caused by various environmental and water body factors, thereby improving the stability and generalization of the model's detection results.

[0106] Based on the spatial continuity of water bodies and the representativeness of existing samples, this invention automatically selects aerial imagery data to be labeled, avoiding duplicate labeling of similar samples. It provides an implementation method for labeling water bodies, as shown in steps 1 to 3 below:

[0107] Step 1: For each training image in the subset, overlay the spatial object and water body detection results corresponding to that training image to obtain the object overlap. If the object overlap is not within a preset threshold range, it is determined that water body labeling is not satisfied; if the object overlap is within a preset threshold range, it is determined that water body labeling is stopped. The two endpoints of the preset threshold range are the first preset threshold and the second preset threshold, respectively.

[0108] In one implementation, spatial object and water body monitoring results can be fused, and the fused results can be statistically analyzed to obtain the object overlap. Specifically, the proportion of water pixels in each spatial object can be calculated, and the presence of mixed objects can be determined based on this proportion. If the proportion of water pixels in a spatial object is greater than a first preset threshold and less than a second preset threshold, a mixed object is identified, and water body labeling is required. For example, the first preset threshold can be set to 40%, and the second preset threshold can be set to 60%, meaning that if the proportion of water in a spatial object is greater than 40% and less than 60%, it is determined to be a mixed object.

[0109] Step 2: Select training images whose object overlap falls within a preset threshold range as training images to be labeled. In one implementation, training images containing mixed spatial objects are automatically extracted and selected as training images to be labeled.

[0110] Step 3: Add water body labels to the training images to be labeled in the training dataset to update the water body labels in the training dataset. In one implementation, if a training image can be extracted (i.e., there are mixed objects), then add a water body label to the image to be labeled; if no training image is extracted (i.e., there are no mixed objects), then continue to extract a subset of the dataset for training; if training images cannot be automatically extracted three times in a row (the number of determinations can be changed according to the actual situation), then labeling stops.

[0111] For ease of understanding, this embodiment of the invention provides a specific implementation method for labeling water bodies, see [link to relevant documentation]. Figure 2 The diagram shows a process for labeling water bodies. For details, please refer to (I) to (VIII) below:

[0112] (i) A fixed number of raw and simulated aerial image data are selected as the training dataset. The training dataset is the dataset consisting of the raw and simulated aerial image data mentioned above; this training dataset can also be called the unlabeled aerial image dataset. For example, 151 aerial images (6000x4000 pixels each) from 12 regions can be selected as the training dataset.

[0113] (ii) Randomly select a specified number of original aerial image data and simulated aerial image data from the training dataset to obtain a subset dataset. The specified number can be changed according to the actual situation. For example, 20 training images can be randomly selected from the training dataset. If it is the first selection, proceed to (viii); if it is not the first selection, proceed to (iii).

[0114] (iii) Perform superpixel segmentation on each training image in the subset to obtain spatial objects. In one implementation, the SLIC (Simple Linear Iterative Clustering) algorithm can be used to generate spatial objects in the training images.

[0115] (iv) Use the water detection model to detect water in each training image in the subset and output the water detection results.

[0116] (v) Integrate spatial object and water body detection results.

[0117] (vi) Statistical analysis of the fusion results. Calculate the proportion of water pixels in each spatial object and determine whether a mixed object exists based on this proportion. A spatial object with a water proportion greater than 40% and less than 60% is considered a mixed object.

[0118] (vii) Automatically extract training images containing mixed spatial objects. If training images are extracted, proceed to (viii); if no training images are extracted, proceed to (ii); if no training images are automatically extracted three times consecutively (the number of judgments can be changed according to the actual situation), then stop annotation.

[0119] (viii) Label the selected training images (i.e., the training images to be labeled) with water bodies. Output the labeled data, add it to the training book set, and quickly train the water body detection model.

[0120] Water bodies are fluid and therefore spatially continuous, allowing them to be located through spatial object segmentation. The annotation process in this invention utilizes the spatial characteristics of water bodies and water body identification results to automatically query areas where water body identification is incomplete, and then annotates the data. This invention can automatically retrieve water body targets to be annotated and effectively avoid duplicate annotation of similar water bodies, thereby improving the efficiency of water body annotation and the effectiveness of water body samples.

[0121] To facilitate understanding of the water detection model provided in the foregoing embodiments, this invention also provides a water detection model, including a water detection encoder and a water detection decoder connected in sequence, and a context extraction unit connected to the water detection decoder. The water detection encoder includes a basic feature unit and an abstract semantic feature unit connected in sequence. The input of the basic feature unit is a training image, and its output is basic features; the input of the abstract semantic feature unit is the basic features, and its output is abstract semantic features; the input of the water detection decoder is the abstract semantic features, and its output is the water detection result; the input of the context extraction unit is the water detection result, and its output is context information.

[0122] Based on this, this embodiment of the invention provides an implementation method for obtaining water body detection results by performing water body detection on a subset of data using a water body detection model. The method involves extracting basic features from the training images in the subset of data using a basic feature unit; then extracting abstract semantic features from the basic features using an abstract semantic feature unit; and finally decoding the abstract semantic features using a water body detection decoder to obtain the water body detection results.

[0123] In one embodiment, this invention also provides an implementation method for dynamically calibrating a water body detection model, which can employ transfer learning. Transfer learning typically uses a mature model trained on a similar task as a starting point to learn a new task. In visual tasks, the shallow features of deep learning models extract general basic features of images, such as points, lines, and arcs. These features have universal applicability in image recognition tasks. The deep feature extraction of deep learning models is related to the abstract semantic information of a specific task. Therefore, this invention aims to utilize the shallow weights of a proven effective image classification model to train the high-level abstract semantic features of an aerial image water body recognition model. This significantly reduces the computational load, accelerates model convergence, and improves the model's generalization ability. In contrast, conventional transfer learning typically relearns a mature model as a whole. This approach requires a large amount of data and computational power, while altering the shallow basic image features, making the model more prone to overfitting to the training data and limiting its generalization ability. According to the aerial image water body recognition task, this embodiment of the invention dynamically queries the abstract semantic feature layer of the deep learning model to locate the effective abstract semantic layer in the model.

[0124] In one example, the abstract semantic feature units of a deep learning model are qualitatively divided. Based on practical development experience, this method defines the tail third of the model as abstract semantic feature units and the head two-thirds as basic image feature units. When using models for similar tasks, basic image feature units will not participate in model training, while abstract semantic feature units will.

[0125] In one example, the abstract semantic feature units are traversed and located. The convolutional blocks (or convolutional layers, attention mechanism blocks) within the abstract semantic feature units (the last third of the model) are dynamically calibrated. This method sequentially trains and validates different combinations of convolutional blocks within the abstract semantic feature modules on small training and validation datasets. Based on the accuracy of the validation dataset, the optimal semantic feature module for water body recognition in aerial imagery is found. This step can be viewed as an automatic query and setting of the hyperparameters of the aerial imagery water body semantic recognition module.

[0126] In one example, the deep learning model uses HRNet, and the processed water body labeled samples are input into the deep learning model for transfer learning training. Based on this, when dynamically calibrating the water body detection model, the output cross-entropy loss value of the water body detection model can be determined based on the water body detection results, and the context information of the water body detection results can be extracted by the context extraction unit. Based on the context information, the context cross-entropy loss value of the water body detection model is determined, and then the output cross-entropy loss value and the context cross-entropy loss value are weighted and summed to obtain the target loss value. Finally, the target loss value is used to dynamically calibrate the abstract semantic feature unit. In this embodiment of the invention, the loss function is calculated simultaneously for the output part of the water body detection decoder and the output part of the context (OCR) extraction unit. The loss function is the cross-entropy function. Through the backpropagation algorithm, after multiple rounds of training until the model converges, the trained model is obtained and used for subsequent inference. The loss function is as follows:

[0127] Loss=λ1*loss_sup_hrnet+λ2*loss_sup_ocr;

[0128] Where loss_sup_hrnet is the cross-entropy error of the model decoder output, λ1 is its coefficient, set to 0.4; loss_sup_ocr is the cross-entropy error of the target context, λ2 is its coefficient, set to 1.0.

[0129] In one implementation, if water body labeling is stopped based on spatial objects and water body detection results, the water body detection model is dynamically calibrated, and the next iteration of training is performed based on the training dataset used in the previous iteration until the iteration stopping condition is met, resulting in the target water body detection model. In a specific implementation, when water body labeling stops, subsequent iterations can directly use the training dataset from the last water body labeling iteration. Optionally, spatial objects may not need to be extracted in subsequent iterations. For ease of understanding, this embodiment provides a training process after stopping water body labeling: a subset of the training dataset is extracted, water body detection is performed on the subset using the water body detection model to obtain water body detection results, a loss value is calculated based on the water body detection results, and the model parameters of the water body detection model are adjusted using the loss value until the loss value converges.

[0130] In addition to the training method for the water body detection model provided in the foregoing embodiments, this invention also provides a method for water body detection using aerial imagery data. (See [link to previous document]). Figure 3 The diagram shows a flow chart of an aerial imagery method for water body detection. The method mainly includes the following steps S302 to S304:

[0131] Step S302: Obtain the aerial image data to be detected;

[0132] Step S304: Using a pre-trained target water body detection model, water body detection is performed on the aerial image data to be detected, resulting in water body detection results corresponding to the aerial image data. The target water body detection model is trained using a water body detection model training method. In one embodiment, the aerial image data to be detected is input into the target water body detection model, and the output of the water body detection decoder in the target water body detection model is used as the water body monitoring result.

[0133] The aerial imagery water body detection method provided in this invention uses a target water body detection model trained by a water body detection model training method. This model has high applicability and accuracy. Therefore, this target water body detection model can be used to reliably detect water bodies in different geographical environments, thereby significantly improving the accuracy of water body detection results.

[0134] For ease of understanding, embodiments of the present invention also provide a training method for a water body detection model and an application example of an aerial imagery-based water body detection method, see [link to relevant documentation]. Figure 4 The diagram illustrates a training method for a water body detection model and a flowchart of an aerial imagery-based water body detection method. The training method for the water body detection model includes three processes: water body annotation data creation, water body image simulation, and transfer learning model training. Water body annotation data creation is the aforementioned process of labeling water bodies, water body image simulation is the process of acquiring the training dataset, and transfer learning model training is the dynamic calibration process of the water body detection model. The aerial imagery-based water body detection method includes three processes: acquiring the trained target water body detection model, acquiring UVA water body images, and determining the water body detection results.

[0135] This invention provides a training method for a water body detection model and an experimental process for an aerial image water body detection method, as shown in (1) to (4) below:

[0136] (1) Data preparation:

[0137] This invention selects aerial imagery data from 30 different regions, including Beijing, Chengdu, Hong Kong, Yinchuan, Nanjing, Huanggang, Jiaxing, Baotou, Wenchang, Xiaolangdi, and Yibin. Data from 12 of these regions is selected as training data and labeled using the methods described in (I) to (VIII) above. Data from the remaining 18 regions is used as test data.

[0138] The method of setting up the training and testing data in this embodiment of the invention presents significant challenges. This is because the testing data is geographically widespread, encompassing 18 different regions with vastly different influencing factors such as image capture conditions and water morphology. For example, water color, terrain, and image capture angles all vary considerably. Furthermore, the testing data is completely different from the 12 regions used in the training data. This significant regional variation in the distribution of training and testing data further increases the difficulty of water body identification. This testing data places extremely high demands on the generalization ability of the aerial image water detection model.

[0139] (2) Water body image simulation test:

[0140] (2.1) Simulated Image Testing: This test simulates different scenarios using the same aerial image. The simulation data will be used to test the water body identification model. See [link / reference] Figure 5 The diagram shows an aerial image, where the first row represents the original aerial image, a simulated overexposed image, a simulated low-light image, a simulated hazy image, and simulated images from different sensors. Please continue reading. Figure 5 , Figure 5 The second row shows the recognition performance of the HRNet model developed based on the aforementioned training dataset; please continue reading... Figure 5 , Figure 5 The third row shows the recognition performance of the HRNet model developed based on the training dataset and water image simulation method.

[0141] Depend on Figure 5 As can be seen, the water body data simulation described in the embodiments of the present invention can effectively improve the accuracy of water body identification in aerial images under different conditions, and the consistency of water body detection for the same ground features under different conditions is also greatly improved.

[0142] (2.2) Real Data Testing: This test demonstrates the effectiveness of the water image simulation method combined with the HRNet model described in this embodiment of the invention on real data. See also Figure 6 Another aerial image illustration is shown. Figure 6 The first row displays aerial images of Deqing, Hong Kong, Yinchuan, and Lanzhou. Figure 6 The second row shows the recognition performance of the HRNet model developed based on the training data; Figure 6 The third row shows the recognition performance of the HRNet model developed based on training data and water image simulation methods.

[0143] By observing the water body detection results of real aerial images, the water body data simulation described in this embodiment of the invention can significantly improve the accuracy of water body identification in aerial images of different regions and different landforms.

[0144] (2.3) Quantitative Test of Test Data: This test demonstrates the quantitative performance of the water image simulation method combined with the HRNet model described in this embodiment of the invention on test data. The test metrics used were IoU (Intersection over Union) and accuracy to measure the model's performance.

[0145] The aerial images used in this test included 59 independent aerial images distributed across 19 different regions, including Beijing, Chengdu, Hong Kong, Yinchuan, Lanzhou, Deqing, Baotou, and Huanggang.

[0146] The table below shows that the water body data simulation described in this embodiment of the invention can significantly improve the accuracy of water body detection in aerial imagery, with an average IoU improvement of 9 points and a water body IoU improvement of 14 points. The water body identification accuracy can be improved from 0.9232 to 0.9679, and the average accuracy can be improved from 0.9539 to 0.9850.

[0147]

[0148] (3) Transfer Learning Test: This test demonstrates the effectiveness of the transfer learning combined with the HRNet model as described in the preceding embodiments. See also Figure 7 The diagram shown illustrates the cross-union ratio (CURRR) of a target water body detection model. Figure 7 In the testing experiment, three HRNet models were trained for 50 epochs each, and the cross-union ratio (IoU, vertical axis) of the models detecting water bodies was tested using test data at the 10th, 20th, 30th, 40th, and 50th epochs (horizontal axis in the figure). Figure 7 The left table shows the mean Intersection over Union (mIoU), and the right table shows the water body intersection over union. HRNet uses three different transfer learning strategies: a. No transfer learning, the model is trained from scratch (dotted lines in the figure); b. Global transfer learning, the model is trained globally based on a mature image classification model (dashed lines in the figure); c. Using the transfer learning provided in the aforementioned examples (thick solid lines in the figure).

[0149] from Figure 7 It can be observed that, firstly, the detection accuracy of the de novo trained model gradually decreases. This phenomenon indicates that the model is overfitting the training data. Because the test data setup places high demands on the model's generalization ability, the overfitting phenomenon of the de novo trained model is very pronounced on the test data. This also verifies the high detection difficulty of the test data. Secondly, the accuracy of the two models trained using the transfer learning strategy on the test data increases with the number of iterations, effectively avoiding model overfitting. Thirdly, the transfer learning method described in this paper is more effective than conventional transfer learning methods, with significantly higher average IoU and water body IoU compared to conventional transfer learning methods.

[0150] (4) Test Results of Body Detection: This section visualizes the detection results of the aerial image water body detection model developed based on this method on imagery of different regions, such as... Figure 8 Another aerial image illustration is shown.

[0151] In summary, the embodiments of this invention are applicable to water body detection in most aerial imagery. This method can fully utilize a reasonable number of labeled aerial images to train a widely applicable and highly accurate water body detection algorithm. It can provide fundamental technical support for fields such as water body detection, disaster assessment, and urban 3D reconstruction.

[0152] Regarding the training method for the water body detection model provided in the foregoing embodiments, this embodiment of the invention provides a training device for the water body detection model, see [link to relevant documentation]. Figure 9 The diagram shows a structural schematic of a training device for a water body detection model. The device mainly includes the following parts:

[0153] The training data acquisition module 902 is used to acquire the training dataset and extract a subset of the training dataset.

[0154] The first detection module 904 is used to extract spatial objects from the subset of the dataset if the current iteration training is not the first iteration training, and to perform water body detection on the subset of the dataset through the water body detection model to obtain water body detection results.

[0155] The judgment module 906 is used to determine whether to label water bodies based on spatial objects and water body detection results.

[0156] The calibration module 908 is used to dynamically calibrate the water body detection model when the judgment result of the judgment module is yes, and update the water body labels of the training dataset based on the spatial objects and water body detection results, so as to carry out the next round of iterative training based on the updated training dataset until the iteration stopping condition is met, and the target water body detection model is obtained.

[0157] The training device for the water body detection model provided in this embodiment of the invention updates the water body labels of the training dataset based on the spatial objects extracted from the extracted subset and the corresponding water body detection results output by the water body detection model during each iteration of training. Then, it continues to extract subsets for iterative training from the updated training dataset. In this embodiment of the invention, the water body labeling process automatically queries incomplete water body identification areas using the spatial characteristics of water bodies and water body detection results for water body labeling. It can automatically retrieve water body objects to be labeled and effectively avoid duplicate labeling of similar water bodies, realizing semi-automatic labeling of water body labels. This improves the efficiency of water body labeling and the effectiveness of water body samples, and significantly reduces the cost of producing training images. In addition, this embodiment of the invention can also make full use of a reasonable number of training images to train a target water body detection model with wide applicability and high accuracy.

[0158] In one implementation, the determination module 906 is further configured to:

[0159] For each training image in the subset, the detection results of the spatial objects and water bodies corresponding to that training image are superimposed to obtain the object overlap.

[0160] If the overlap of objects exceeds the preset overlap threshold, water body labeling will be performed.

[0161] If the overlap of objects is less than the preset overlap threshold, stop labeling water bodies.

[0162] In one implementation, the calibration module 908 is further configured to:

[0163] Training images with an overlap greater than a preset overlap threshold are identified as training images to be labeled.

[0164] Add water body labels to the unlabeled training images in the training dataset to update the water body labels in the training dataset.

[0165] In one embodiment, the water body detection model includes a water body detection encoder and a water body detection decoder connected in sequence, the water body detection encoder including basic feature units and abstract semantic feature units connected in sequence; the first detection module 904 is further configured to:

[0166] Basic features of training images in a subset of data are extracted using basic feature units.

[0167] Abstract semantic features of basic features are extracted through abstract semantic feature units;

[0168] The abstract semantic features are decoded by a water body detection decoder to obtain the water body detection results.

[0169] In one embodiment, the water body detection model further includes a context extraction unit connected to the water body detection decoder; the calibration module 908 is also used for:

[0170] Determine the output cross-entropy loss value of the water body detection model based on the water body detection results;

[0171] The context information of the water body detection results is extracted by the context extraction unit, and the context cross-entropy loss value of the water body detection model is determined based on the context information.

[0172] The target loss value is obtained by weighted summing of the output cross-entropy loss value and the context cross-entropy loss value.

[0173] The target loss value is used to dynamically calibrate the abstract semantic feature units.

[0174] In one implementation, the training data acquisition module 902 is further configured to:

[0175] Acquire raw aerial imagery data;

[0176] Spectral intensity simulation and / or spectral contrast simulation are performed based on aerial imagery data to obtain simulated aerial imagery data; wherein, spectral intensity simulation includes Gamma transformation simulation and / or linear transformation simulation, and spectral contrast simulation includes one or more of the following: extremum stretching, extremum shearing, mean and variance stretching, histogram equalization, and contrast-limited adaptive histogram equalization.

[0177] The training dataset is obtained by using raw aerial imagery data and simulated aerial imagery data as training images.

[0178] In one implementation, a training module is also included, for:

[0179] If the water body labeling is stopped based on the spatial object and the water body detection results, the water body detection model is dynamically calibrated, and the next round of iteration training is carried out based on the training dataset used in the previous iteration training process until the iteration stopping condition is met, and the target water body detection model is obtained.

[0180] Regarding the aerial imagery water body detection method provided in the foregoing embodiments, this invention provides an aerial imagery water body detection device, see [link to previous document]. Figure 10 The diagram shows a structural schematic of an aerial imaging water body detection device, which mainly includes the following parts:

[0181] Image data acquisition module 1002 is used to acquire aerial image data to be detected;

[0182] The second detection module 1004 is used to perform water body detection on the aerial image data to be detected using a pre-trained target water body detection model, and obtain the water body detection result corresponding to the aerial image data to be detected.

[0183] The target water body detection model is trained using the water body detection model training method.

[0184] The aerial image water body detection device provided in this embodiment of the invention uses a target water body detection model trained by a water body detection model training method, which has high applicability and accuracy. Therefore, the target water body detection model can be used to reliably detect water bodies in different geographical environments, thereby significantly improving the accuracy of water body detection results.

[0185] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0186] This invention provides an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.

[0187] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 100 includes: a processor 110, a memory 111, a bus 112, and a communication interface 113. The processor 110, the communication interface 113, and the memory 111 are connected through the bus 112. The processor 110 is used to execute executable modules, such as computer programs, stored in the memory 111.

[0188] The memory 111 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 113 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0189] Bus 112 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0190] The memory 111 is used to store programs. After receiving an execution instruction, the processor 110 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 110 or implemented by the processor 110.

[0191] Processor 110 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 110 or by instructions in software form. Processor 110 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 111, and processor 110 reads the information in memory 111 and, in conjunction with its hardware, completes the steps of the above method.

[0192] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the foregoing method embodiments. For specific implementation, please refer to the foregoing method embodiments, which will not be repeated here.

[0193] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0194] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for training a water body detection model, characterized in that, The method comprises the following steps: acquiring a training data set and extracting a sub-data set from the training data set; if the current iteration training is not the first iteration training, extracting a spatial object from the sub-data set, and performing water body detection on the sub-data set by a water body detection model to obtain a water body detection result; determining whether to perform water body label annotation based on the spatial object and the water body detection result, comprising: for each training image in the sub-data set, superimposing the spatial object and the water body detection result corresponding to the training image to obtain an object overlap degree; if the object overlap degree is in a preset threshold interval, it is determined to perform water body label annotation; if the object overlap degree is not in the preset threshold interval, it is determined to stop water body label annotation; if so, dynamically calibrating the water body detection model, and updating the water body label of the training data set based on the spatial object and the water body detection result, so as to perform the next round of iteration training based on the updated training data set, until the iteration stop condition is met, and a target water body detection model is obtained; updating the water body label of the training data set based on the spatial object and the water body detection result, comprising: determining the training image with the object overlap degree in the preset threshold interval as a to-be-annotated training image; adding a water body label to the to-be-annotated training image in the training data set to update the water body label of the training data set. 2.The method of claim 1, wherein, The water body detection model comprises a water body detection encoder and a water body detection decoder connected in sequence, and the water body detection encoder comprises a basic feature unit and an abstract semantic feature unit connected in sequence; performing water body detection on the sub-data set by the water body detection model to obtain a water body detection result, comprising: extracting the basic feature of the training image in the sub-data set by the basic feature unit; extracting the abstract semantic feature of the basic feature by the abstract semantic feature unit; decoding the abstract semantic feature by the water body detection decoder to obtain the water body detection result.

3. The method of claim 2, wherein, The water body detection model further comprises a context extraction unit connected with the water body detection decoder; dynamically calibrating the water body detection model, comprising: determining an output cross-entropy loss value of the water body detection model based on the water body detection result; extracting context information of the water body detection result by the context extraction unit, and determining a context cross-entropy loss value of the water body detection model based on the context information; performing weighted summation on the output cross-entropy loss value and the context cross-entropy loss value to obtain a target loss value; dynamically calibrating the abstract semantic feature unit by using the target loss value. 4.The method of claim 1, wherein, Acquiring a training data set, comprising: acquiring original aerial image data; performing spectral intensity simulation and / or spectral contrast simulation based on the aerial image data to obtain simulated aerial image data; wherein the spectral intensity simulation comprises Gamma transformation simulation and / or linear transformation simulation, and the spectral contrast simulation comprises one or more of maximum value stretching, maximum value clipping, mean value and variance stretching, histogram equalization, and limited contrast adaptive histogram equalization; The original aerial image data and the simulated aerial image data are taken as training images to obtain a training data set. 5.The method of claim 1, wherein, The method further comprises: If it is determined to stop water body label annotation based on the spatial object and the water body detection result, the water body detection model is dynamically calibrated, and the next round of iterative training is performed based on the training data set used in the previous iteration training until an iteration stop condition is met, to obtain a target water body detection model.

6. An aerial image water body detection method, characterized in that, Comprise: Obtaining aerial image data to be detected; Performing water body detection on the aerial image data to be detected by using a target water body detection model obtained through pre-training to obtain a water body detection result corresponding to the aerial image data to be detected; The target water body detection model is obtained through the training method of the water body detection model according to any one of claims 1-5. 7.A device for training a water body detection model, characterized in that, Comprise: A training data acquisition module is configured to acquire a training data set and extract a sub-data set from the training data set; A first detection module is configured to, if the current iteration training is not the first iteration training, extract a spatial object from the sub-data set and perform water body detection on the sub-data set by using a water body detection model to obtain a water body detection result; A judgment module is configured to judge whether to perform water body label annotation based on the spatial object and the water body detection result, including: for each training image in the sub-data set, superimposing the spatial object and the water body detection result corresponding to the training image to obtain an object overlap degree; if the object overlap degree is in a preset threshold interval, it is determined to perform water body label annotation; if the object overlap degree is not in the preset threshold interval, it is determined to stop water body label annotation; A calibration module is configured to, if the judgment result of the judgment module is yes, dynamically calibrate the water body detection model, update water body labels of the training data set based on the spatial object and the water body detection result, and perform the next round of iteration training based on the updated training data set until an iteration stop condition is met to obtain a target water body detection model; The calibration module is specifically configured to: determine a training image with the object overlap degree in the preset threshold interval as a training image to be labeled; and add water body labels to the training image to be labeled in the training data set to update the water body labels of the training data set.

8. An aerial image water body detection device, characterized in that, Comprise: An image data acquisition module is configured to acquire aerial image data to be detected; A second detection module is configured to perform water body detection on the aerial image data to be detected by using a target water body detection model obtained through pre-training to obtain a water body detection result corresponding to the aerial image data to be detected; The target water body detection model is obtained through the training method of the water body detection model according to any one of claims 1-5.

9. An electronic device, comprising: Comprise a processor and a memory, the memory stores computer executable instructions capable of being executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1-5 or 6.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions that, when invoked and executed by the processor, cause the processor to implement the method of any of claims 1-5 or claim 6.

Citation Information

Patent Citations

  • Multi-source remote sensing image water body detection method based on multi-view deep network iterative evolution

    CN111666849A

  • Method and device for training deep learning model, electronic equipment and storage medium

    CN115661582A