Erosion gully prediction method, device and equipment

CN121147113BActive Publication Date: 2026-08-21松辽水利委员会松辽流域水土保持监测中心站 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511169314.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-20
Publication Date
2026-08-21
Estimated Expiration
2045-08-20

AI Technical Summary

Technical Problem

然而,传统遥感影像目视解译以及人工实地调查方法耗费大量的人力、物力和时间,且调查范围有限,难以获取大面积、实时的侵蚀沟信息

Benefits of technology

[0008] The technical solution provided in this application includes the following method: determining a test sample set and a validation sample set; the test sample set and the validation sample set each include erosion gully images and corresponding erosion gully images; determining a predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully images in the test sample set and a preset image segmentation algorithm; determining the total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully image in the test sample set, and a preset loss function; updating the working parameters of the preset image segmentation algorithm based on a preset stochastic gradient descent algorithm and the total loss value, and determining the updated preset image segmentation algorithm; determining the index coefficients of the validation sample set based on the erosion gully images in the validation sample set and the updated preset image segmentation algorithm; and determining whether to select the updated preset image segmentation algorithm as the erosion gully prediction model based on the comparison result between the index coefficients and a preset threshold. Thus, by constructing an erosion gully prediction model, the corresponding erosion gully image can be automatically generated from the input erosion gully image, thereby improving the efficiency of drawing erosion gully images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147113B_ABST
    Figure CN121147113B_ABST
Patent Text Reader

Abstract

The application discloses an erosion groove prediction method, device and equipment, and the method comprises the following steps: determining a test sample set and a verification sample set; determining a predicted erosion groove image corresponding to an erosion groove image in the test sample set according to the erosion groove image and a preset image segmentation algorithm; determining a total loss value between the predicted erosion groove image and the erosion groove image in the test sample set according to the predicted erosion groove image, the erosion groove image and a preset loss function; updating the working parameter of the preset image segmentation algorithm according to the preset random gradient descent algorithm and the total loss value, and determining an updated preset image segmentation algorithm; determining an index coefficient of the verification sample set according to the erosion groove image in the verification sample set and the updated preset image segmentation algorithm; and determining whether the updated preset image segmentation algorithm is determined as an erosion groove prediction model according to the comparison result of the index coefficient and a preset threshold. Thus, the corresponding erosion groove image of the erosion groove prediction model is automatically generated by constructing the erosion groove prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of soil erosion monitoring, and more specifically, to a method, apparatus and equipment for predicting erosion gullies. Background Technology

[0002] As a major agricultural region, the soil erosion situation in the Northeast Black Soil Region has attracted much attention. The latest special survey results from the Ministry of Water Resources show that there are a total of 666,700 erosion gullies in the Northeast Black Soil Region, with a total length of 232,400 kilometers and a total area of ​​4,029.57 square kilometers. Nearly 90% of these are developing erosion gullies, mainly distributed on cultivated land. Soil erosion types and intensities exhibit distinct vertical zonation along slopes at the small watershed scale, and at the regional scale, they show latitudinal and longitudinal zonation that varies from north to south and east to west.

[0003] Currently, monitoring of gullies in black soil regions mainly relies on visual interpretation of remote sensing images and manual field surveys. However, traditional methods of visual interpretation of remote sensing images and manual field surveys are labor-intensive, resource-intensive, and time-consuming, and have limited survey coverage, making it difficult to obtain large-area, real-time information on gullies. Summary of the Invention

[0004] In view of the above problems, this application proposes a method, apparatus and equipment for predicting erosion gullies to solve the above problems.

[0005] In a first aspect, embodiments of this application provide a method for predicting erosion gullies. The method includes: determining a test sample set and a validation sample set; the test sample set and the validation sample set each include erosion gully images and corresponding erosion gully images; determining a predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully images in the test sample set and a preset image segmentation algorithm; determining a total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully image in the test sample set, and a preset loss function; updating the operating parameters of a preset image segmentation algorithm based on a preset stochastic gradient descent algorithm and the total loss value, and determining an updated preset image segmentation algorithm; determining an index coefficient for the validation sample set based on the erosion gully images in the validation sample set and the updated preset image segmentation algorithm; and determining whether to use the updated preset image segmentation algorithm as the erosion gully prediction model based on a comparison between the index coefficient and a preset threshold.

[0006] Secondly, embodiments of this application also provide an erosion gully prediction device, which includes: a sample set module for determining a test sample set and a validation sample set; the test sample set and the validation sample set respectively include erosion gully images of multiple erosion gullies and erosion gully images corresponding to the erosion gully images; a prediction module for determining a predicted erosion gully image corresponding to an erosion gully image in the test sample set based on the erosion gully images in the test sample set and a preset image segmentation algorithm; a loss determination module for determining a total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully image in the test sample set, and a preset loss function; an update module for updating the working parameters of a preset image segmentation algorithm based on a preset stochastic gradient descent algorithm and the total loss value, and determining the updated preset image segmentation algorithm; a validation module for determining the index coefficients of the validation sample set based on the erosion gully images in the validation sample set and the updated preset image segmentation algorithm; and a model determination module for determining whether to determine the updated preset image segmentation algorithm as the erosion gully prediction model based on the comparison result between the index coefficients and a preset threshold.

[0007] Thirdly, embodiments of this application also provide an erosion trench prediction device, including a processor, a memory, and one or more application programs; the one or more application programs are stored in the memory and configured to be executed by the processor to implement the above-described erosion trench prediction method.

[0008] The technical solution provided in this application includes the following method: determining a test sample set and a validation sample set; the test sample set and the validation sample set each include erosion gully images and corresponding erosion gully images; determining a predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully images in the test sample set and a preset image segmentation algorithm; determining the total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully image in the test sample set, and a preset loss function; updating the working parameters of the preset image segmentation algorithm based on a preset stochastic gradient descent algorithm and the total loss value, and determining the updated preset image segmentation algorithm; determining the index coefficients of the validation sample set based on the erosion gully images in the validation sample set and the updated preset image segmentation algorithm; and determining whether to select the updated preset image segmentation algorithm as the erosion gully prediction model based on the comparison result between the index coefficients and a preset threshold. Thus, by constructing an erosion gully prediction model, the corresponding erosion gully image can be automatically generated from the input erosion gully image, thereby improving the efficiency of drawing erosion gully images. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments and drawings obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0010] Figure 1 A flowchart illustrating an erosion gully prediction method provided in an embodiment of this application is shown.

[0011] Figure 2 A schematic diagram of the structure of an erosion trench sample provided in an embodiment of this application is shown.

[0012] Figure 3 A schematic diagram of the structure of an erosion trench image provided in an embodiment of this application is shown.

[0013] Figure 4 A schematic diagram of the structure of an erosion gully prediction device provided in an embodiment of this application is shown.

[0014] Figure 5 This is a schematic diagram of the structure of an erosion gully prediction device provided in an embodiment of this application.

[0015] Figure 6 This illustration shows a schematic diagram of the structure of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0016] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0017] As a major agricultural region, the soil erosion situation in the Northeast Black Soil Region has attracted much attention. The latest special survey results from the Ministry of Water Resources show that there are a total of 666,700 erosion gullies in the Northeast Black Soil Region, with a total length of 232,400 kilometers and a total area of ​​4,029.57 square kilometers. Nearly 90% of these are developing erosion gullies, mainly distributed on cultivated land. Soil erosion types and intensities exhibit distinct vertical zonation along slopes at the small watershed scale, and at the regional scale, they show latitudinal and longitudinal zonation that varies from north to south and east to west.

[0018] Currently, monitoring of gullies in black soil regions mainly relies on visual interpretation of remote sensing images and manual field surveys. However, traditional methods of visual interpretation of remote sensing images and manual field surveys are labor-intensive, resource-intensive, and time-consuming, and have limited survey coverage, making it difficult to obtain large-area, real-time information on gullies.

[0019] In related technologies, convolutional neural networks are used to extract deep features of erosion gullies in the black soil region of Northeast China, thereby automatically identifying remote sensing images containing erosion gullies. By detecting and tracking image edges and flow direction in the remote sensing images, automatic extraction of erosion gullies has been achieved in the Loess Plateau.

[0020] Among other related technologies, gully extraction methods based on OBIA, LightGBM, and eCognition with object-oriented algorithms have achieved some success in identifying untreated gullies in the Northeast black soil region and treated gullies in non-forest areas.

[0021] Among other related technologies, the erosion trench identification model based on multi-scale dense dilated convolutional neural networks achieves higher extraction accuracy than classic deep learning models by aggregating multi-level spatial features of erosion trenches.

[0022] Among other related technologies, the erosion gully identification technology, which integrates topographic skeleton information and image features, uses a surface object segmentation method to obtain initial erosion gully identification results for the image, and then corrects the initial results based on the topographic skeleton information.

[0023] However, due to their sensitivity to changes in factors such as illumination and topography, erosion gully extraction methods based on flow-edge detection rely on high-precision topographic data, resulting in low accuracy and a tendency to produce false positives and false negatives in complex environments. Furthermore, machine learning based on remote sensing imagery suffers from low computational efficiency when processing high-resolution images, failing to meet the demands of rapid, large-area monitoring, and lacks sufficient ability to identify minute erosion gullies. Additionally, erosion gullies extracted by deep learning methods are often fragmented and discontinuous, with numerous false positives. They are also susceptible to interference from other land features similar to erosion gullies, and when erosion gullies and other land features coexist, the model's attention is diverted, necessitating post-processing methods to further refine the extraction results.

[0024] Moreover, since the aforementioned technologies are limited to a small spatial scale and are constrained by the number and diversity of samples, they cannot meet the requirements for automatic extraction of large-area rapid erosion trenches. Furthermore, no post-processing is performed on the automatically extracted erosion trenches, and a standardized erosion trench extraction process has not been formed, which would simplify and reduce the workload of monitoring personnel, improve monitoring efficiency, and reduce monitoring costs.

[0025] To address the aforementioned problems, this application provides a method, apparatus, and device for predicting erosion gullies. The method includes: determining a test sample set and a validation sample set; the test sample set and the validation sample set each include erosion gully images and corresponding erosion gully images; determining a predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully images in the test sample set and a preset image segmentation algorithm; determining a total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully image in the test sample set, and a preset loss function; updating the operating parameters of a preset image segmentation algorithm based on a preset stochastic gradient descent algorithm and the total loss value, and determining the updated preset image segmentation algorithm; determining the index coefficients of the validation sample set based on the erosion gully images in the validation sample set and the updated preset image segmentation algorithm; and determining whether to adopt the updated preset image segmentation algorithm as the erosion gully prediction model based on a comparison between the index coefficients and a preset threshold.

[0026] Therefore, by constructing an erosion gully prediction model, the corresponding erosion gully image can be automatically generated based on the input erosion gully image, thereby improving the efficiency of drawing erosion gully images.

[0027] Please see Figure 1 , Figure 1 This paper illustrates a flowchart of an erosion gully prediction method provided in an embodiment of this application. Figure 1 As shown, the method may include steps 110 to 160.

[0028] In step 110, the test sample set and the verification sample set are determined.

[0029] The test sample set and the validation sample set each include erosion gully images and corresponding erosion gully images, respectively. The erosion gully images are manually drawn based on the erosion gully images.

[0030] In some implementations, the erosion gully image corresponding to the erosion gully image is a binary image. That is, there is one erosion gully image for every erosion gully image.

[0031] For example, please refer to Figure 2 , Figure 2 This application provides a schematic diagram of the structure of an erosion trench sample, as shown in the embodiment. Figure 2 As shown, one erosion gully sample includes erosion gully image A1 and its corresponding erosion gully image A2; another erosion gully sample includes erosion gully image B1 and its corresponding erosion gully image B2.

[0032] Specifically, in some implementations, the test sample set and the verification sample set are determined based on a sample set. Specifically, the step "determining the test sample set and the verification sample set" may include the following steps:

[0033] (1) Using a preset pixel size as the standard, the sliding window is used to crop the erosion trench image and the erosion trench image in sequence to obtain the cropped erosion trench image and the drawn erosion trench image.

[0034] (2) The cropped erosion trench images and erosion trench pictures are divided into test sample set and verification sample set.

[0035] The erosion gully samples in the sample set consisting of erosion gully images and erosion gully pictures are processed accordingly. Specifically, each erosion gully sample is cropped according to a preset pixel size, the cropped sample vector is rasterized, and then the sample labels with all pixel values ​​being NaN are removed. Finally, the sample labels are divided into training sample set and validation sample set.

[0036] In some implementations, the preset pixel size can be 512 pixels * 512 pixels, that is, each erosion trench sample is cropped sequentially using a 512 pixel * 512 pixel standard sliding window.

[0037] By using the above-mentioned cropping method, the number of samples in the test sample set and the validation sample set can be increased, thereby improving the sample quantity and diversity, making the prediction results of the erosion gully prediction model trained on the test sample set in subsequent steps more accurate.

[0038] Further, in step 120, the predicted erosion gully image corresponding to the erosion gully image in the test sample set is determined based on the erosion gully image in the test sample set and the preset image segmentation algorithm.

[0039] The deep learning network model for automatic extraction of erosion trenches is trained using a preset image segmentation algorithm, which is used to train the erosion trench prediction model for subsequent steps. In some implementations, the preset image segmentation algorithm can be the U-Net network, which is an ideal choice for high-resolution remote sensing image segmentation tasks due to its efficient feature fusion, strong boundary preservation ability, and low computational requirements.

[0040] In other embodiments, the preset image segmentation algorithm can be the DeepLab series architecture. In other embodiments, the preset image segmentation algorithm can be the Mask R-CNN architecture. These architectures also exhibit good performance in semantic segmentation tasks and may achieve better erosion trench extraction results in certain situations. For example, the DeepLab series architecture has certain advantages in handling objects with blurred boundaries, while the Mask R-CNN architecture excels in instance segmentation; if the erosion trenches in the black soil region exhibit obvious instance features, this architecture may be more suitable.

[0041] Before generating predicted erosion trench images using the U-Net network, the samples in the test sample set need to be processed to increase the number and diversity of samples. In some implementations, the erosion trench prediction method further includes the following steps:

[0042] (1) The erosion gully images and erosion gully images in the test sample set are scaled to obtain scaled erosion gully images and erosion gully images.

[0043] (2) and / or, flip the scaled erosion gully image and erosion gully image to obtain the flipped erosion gully image and erosion gully image.

[0044] During the data loading process of cropped and rasterized erosion gully images and their corresponding erosion gully images, the cropped erosion gully images and their corresponding erosion gully images are randomly scaled, and the randomly scaled erosion gully images and their corresponding erosion gully images are flipped.

[0045] In one specific implementation, the cropped and rasterized erosion gully image and its corresponding erosion gully image are randomly scaled proportionally to 0.5 to 1.2 times the original size to enhance the adaptability of the erosion gully prediction model to erosion gully images of different scales (that is, when erosion gully images of different scales are input into the erosion gully prediction model, the erosion gully prediction model can generate its corresponding erosion gully image).

[0046] In one specific implementation, the erosion gully image and its corresponding erosion gully image are flipped horizontally with a 50% probability, and then flipped vertically with a 50% probability, thereby improving the robustness of the erosion gully prediction model to horizontally and vertically symmetrical erosion gully images.

[0047] After scaling and / or flipping the test sample set, data preprocessing of the test sample set is completed. Then, the erosion trench images from the processed test sample set are input into a preset image segmentation algorithm to generate predicted erosion trench images corresponding to the erosion trench images. Specifically:

[0048] In some implementations, the step "determining the predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully image in the test sample set and a preset image segmentation algorithm" may include the following steps:

[0049] (1) The target area is obtained by cropping the concentrated erosion gully image of the test sample.

[0050] (2) Normalize the pixel values ​​included in the target area to obtain RGB image blocks.

[0051] (3) Input the RGB image block into the preset image segmentation algorithm, and output the predicted erosion trench image after forward inference.

[0052] In one specific implementation, a 480×480 pixel sub-region is randomly cropped from the scaled and flipped erosion trench image. This sub-region can be used for local detail training and ensures that the size of the erosion trench image input to the next step is consistent. The cropped 480×480 pixel sub-region is then normalized to obtain a 480×480×3 tensor, i.e., an RGB image patch. The 480×480×3 tensor is used to accelerate convergence and stabilize training.

[0053] It is worth noting that since the erosion gully image itself is a binary image, there is no need to normalize the corresponding erosion gully image; only the erosion gully image needs to be normalized.

[0054] In one specific implementation, the cropped 480×480 pixel sub-region is converted into a tensor, and its pixel values ​​are linearly mapped from [0,255] to [0,1], and then normalization is performed on each band.

[0055] In one specific implementation, the normalization process can be represented as:

[0056]

[0057] Wherein, “in” represents the pixel value of the input sub-region, “mean” represents the average value of the image dataset of the input sub-region, and “std” represents the standard deviation of the image dataset.

[0058] Where mean = (0.338, 0.349, 0.259) and std = (0.091, 0.075, 0.066), the values ​​of "mean" and "std" are calculated from the statistical results of the training sample set. This section also supports the function of creating samples for specific regions. It allows inputting fishing net data and creating samples for attributes marked as 1 in the fishing net data; regions marked with other characters are automatically ignored.

[0059] Furthermore, the obtained 480×480×3 tensor is fed into the U-Net network, and then undergoes convolution, ReLU activation, and pooling operations in the U-Net encoder to extract semantic features at different scales. In the U-Net decoder, after each bilinear interpolation and convolutional upsampling, a skip link is established with the corresponding layer features in the U-Net encoder to preserve detailed information. Subsequently, the features are fused and reconstructed through an activation function to gradually restore the spatial resolution. Finally, the U-Net network outputs a 480×480×2 tensor (i.e., the predicted erosion trench image) after the last convolutional layer, which is used for erosion trench prediction, to predict the erosion trench image corresponding to the input erosion trench image.

[0060] After generating predicted erosion gully images corresponding to the erosion gully images in the test sample set using a preset image segmentation algorithm, subsequent steps compare the predicted erosion gully images with the erosion gully images in the test sample set to determine the error between them. The preset image segmentation algorithm is then updated based on this error, enabling it to generate more accurate predicted erosion gully images. Specifically:

[0061] In step 130, the total loss value between the predicted erosion gully image and the erosion gully image in the test sample set is determined based on the predicted erosion gully image, the erosion gully images in the test sample set, and the preset loss function.

[0062] The U-Net network feeds the output 480×480×2 tensor (i.e., the predicted erosion trench image) into a preset loss function in dictionary form, and calculates the error together with the corresponding erosion trench image in the test sample set.

[0063] Specifically, cross-entropy is used to calculate pixel-level classification error, measuring the difference between the prediction result of the preset image segmentation algorithm and its corresponding erosion trench image in the test sample set. Pixels with a value of 255 in the corresponding erosion trench image in the test sample set are ignored to eliminate interference from edge or filled regions.

[0064] To mitigate class imbalance, different weights are assigned to the foreground (erosion trenches) and background—the foreground has a weight of 10, and the background has a weight of 1. Next, when calculating the total loss, the erosion trench image is first converted to one-hot encoding. Then, the erosion trench prediction model and the one-hot label are input into DiceLoss, and their errors are added to the cross-entropy loss, thus balancing classification accuracy and region consistency. Finally, based on experience, the losses of the main branch and auxiliary branches are weighted to obtain the total loss value. This total loss value is used for backpropagation to update the operating parameters of the U-Net network.

[0065] In one specific implementation, the total loss value is obtained by weighting the losses of the main branch and the auxiliary branch based on experience, and can be expressed as:

[0066]

[0067] in, This represents the total loss value. The loss of the main branch; This is the loss for the auxiliary branch.

[0068] Further, in step 140, the working parameters of the preset image segmentation algorithm are updated according to the preset stochastic gradient descent algorithm and the total loss value, and the updated preset image segmentation algorithm is determined.

[0069] After calculating the average loss of the current mini-batch based on a preset loss function, a preset stochastic gradient descent algorithm with momentum (SGD with momentum) is used, and L2 regularization is introduced into the gradient term to achieve weight decay in updating the working parameters of the U-Net network. The momentum mechanism, by exponentially weighting and accumulating historical gradients, makes the update direction approximate the long-term gradient trend, thereby suppressing high-frequency oscillations and accelerating stable convergence in situations such as a narrow valley in the objective function. The weight decay mechanism is equivalent to adding a L2 norm penalty to the parameter in the objective function, imposing a continuous norm constraint on the parameters, thereby controlling the model capacity, limiting the weight amplitude, and reducing the risk of overfitting.

[0070] The two complement each other: momentum primarily improves optimization dynamics (direction estimation and convergence smoothing), while weight decay mainly handles structured regularization (norm control and generalization improvement). At the implementation level, weight decay typically only applies to the weight parameters of convolutional / linear layers, not to the bias terms and normalization layer parameters, to avoid introducing unnecessary biases. Let B be the minibatch samples in the t-th iteration. t Its average gradient can be expressed as:

[0071]

[0072] The momentum term and parameters are updated according to the following rules, and can be expressed as:

[0073] v t+1 =μv t +g t +λθ t

[0074] θ t+1 =θ t -η t v t+1

[0075] Among them, “θ t" is the parameter vector, "v t “ represents the momentum term (v0 = 0),” “μ” is the momentum factor, “λ” is the weighted decay coefficient, and “η” is the momentum term (v0 = 0). t "T" represents the learning rate at step t. The learning rate scheduling at step t is accomplished by a learning rate scheduler, which consists of two parts: a warm-up phase and a polynomial decay phase. During the warm-up phase, the learning rate is linearly increased from a small initial value to the base learning rate. During the warm-up phase (0 ≤ t ≤ T)... warm The formula is shown below:

[0076]

[0077] Among them, "T" warm "This is the number of preheating rounds multiplied by the number of steps per epoch. In one specific implementation, the number of preheating rounds is set to 5, and the batch_size is set to 8."

[0078] After preheating (t>T) warm There is a formula:

[0079] η t =η base [1-s(t)] p

[0080] in:

[0081]

[0082] Where "t" is the current global step index, "T" is the global step index. warm "This is the number of steps at the end of the preheating process;

[0083] “T” represents the total number of training steps, “η” represents the total number of training steps. base "Based learning rate (learning rate at the end of warm-up);

[0084] “p” represents the polynomial exponent, and in one specific implementation, the value of “p” is 0.9. Let clip(u,0,1) = min(max(u,0),1).

[0085] After each epoch, the model is evaluated on the validation set without participating in backpropagation. Specifically:

[0086] In step 150, the index coefficients of the verification sample set are determined based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm.

[0087] In some implementations, the index coefficient can be the Dice coefficient.

[0088] In some implementations, the index coefficients can be global accuracy, per-class accuracy, per-class intersection-over-union ratio, and Dice coefficient.

[0089] At the end of each training epoch, index coefficients are calculated on the validation sample set. This allows subsequent steps to verify the accuracy of the updated preset image segmentation algorithm based on the relationship between the index coefficients and a preset threshold, thereby determining whether the erosion trench prediction model has been successfully constructed. Specifically, in some implementations, this erosion trench prediction method may include the following steps:

[0090] (1) Based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm, a predicted binary mask is obtained.

[0091] (2) Construct a 2×2 confusion matrix based on the pixel-by-pixel comparison results between the predicted binary mask and the ground truth mask.

[0092] (3) Determine the index coefficients of the validation sample set based on the 2×2 confusion matrix.

[0093] For each erosion trench image in the validation sample set, the model predicts a segmentation map using the updated preset image segmentation algorithm. The watershed algorithm is used to predict the portion with a probability greater than 0.4 as the foreground, whose shape is the same as its corresponding erosion trench image in the validation sample set. A confusion matrix of size 2×2 is constructed, and its structure is shown in the table below.

[0094] Other (real) True negative examples (TN) False positives (FP) Erosion gully (real) False negatives (FN) True Positive Examples (TP)

[0095] In this context, rows represent the corresponding erosion trench images in the validation sample set, columns represent the predicted binary mask, true negative examples (TN) represent both the predicted binary mask and its corresponding erosion trench image in the validation sample set as "other", false positive examples (FP) represent the predicted binary mask as an erosion trench but its corresponding erosion trench image in the validation sample set as "other", false negative examples (FN) represent the corresponding erosion trench image in the validation sample set as an erosion trench but the predicted binary mask as "other", and true positive examples (TP) represent both the predicted binary mask and its corresponding erosion trench image in the validation sample set as erosion trenches.

[0096] In one specific implementation, the global accuracy calculated using the confusion matrix can be expressed as:

[0097]

[0098] In one specific implementation, the accuracy of each class is calculated using the confusion matrix, which can be expressed as:

[0099]

[0100] Wherein, "Acc1" represents the accuracy rate for each category of other categories, and "Acc2" represents the accuracy rate for each category of erosion gullies.

[0101] In one specific implementation, the intersection-union ratio (IUR) of each class is calculated using the confusion matrix, which can be expressed as:

[0102]

[0103] Wherein, "IoU1" represents the crossover ratio for each of the other categories, and "IoU2" represents the crossover ratio for each of the erosion gullies.

[0104] In one specific implementation, the Dice coefficient is calculated using the confusion matrix, which can be expressed as:

[0105]

[0106] The accuracy of the updated preset image segmentation algorithm is measured from multiple perspectives by calculating four metrics: global accuracy, per-class accuracy, per-class intersection-over-union ratio, and / or Dice coefficient using the confusion matrix. This determines whether the updated preset image segmentation algorithm can generate high-accuracy erosion trench images based on the input erosion trench images, thereby eliminating the need for manually standardized erosion trench images and improving work efficiency. Specifically:

[0107] In step 160, based on the comparison results between the index coefficient and the preset threshold, it is determined whether to use the updated preset image segmentation algorithm as the erosion trench prediction model.

[0108] In one specific implementation, if the Dice coefficient exceeds a preset threshold, the model weights, optimizer state, learning rate scheduler state, current epoch, and training parameters are packaged into a dictionary and saved as "baseline model weights_<timestamp>.pth". Simultaneously, after each training epoch, key metrics such as training loss, current learning rate, Dice coefficient, global accuracy, average accuracy for each class, Intersection over Union (IoU), and Mean IoU are appended to a text file for real-time monitoring of training progress. This completes the construction of the erosion trench prediction model.

[0109] In one specific implementation, the trained erosion trench prediction model achieved a global accuracy of 85.0%, with each class having an accuracy of 83.5% for the background and 72.1% for the foreground, an IoU of 81.6% for the background and 70.5% for the foreground, and a Dice coefficient of 0.82.

[0110] For example, please refer to Figure 3 , Figure 3This illustration shows a structural diagram of an erosion gully image provided in an embodiment of this application. After the erosion gully image is input into the erosion gully prediction model, the erosion gully prediction model automatically labels the erosion gullies in the erosion gully image to generate an image as shown below. Figure 3 The image shown is of an erosion trench.

[0111] However, current gully prediction models cannot accurately predict the distribution characteristics of gullies in different regions. They are also unsuitable for areas with varying geomorphic features and gully distributions, resulting in low accuracy of the generated gully images after inputting gully images into the current model. In other words, the current gully prediction model is only applicable to the regions corresponding to the test and validation sample sets.

[0112] To adapt the current gully prediction model to regions with different geomorphic features and gully erosion distributions, this gully prediction method employs frozen training to fine-tune the model, thereby obtaining a regional model that adapts to different geomorphic features and gully erosion distributions. Specifically, by optimizing samples and iteratively freezing the upsampling portion of the training model, a new regional model is generated for prediction and accuracy evaluation, ultimately achieving the expected accuracy in the prediction results. In some implementations, this gully prediction method further includes the following steps:

[0113] (1) Freeze the working parameters of the target structural layer in the erosion gully prediction model, and train the working parameters of the structural layer to be optimized in the erosion gully prediction model to obtain the updated erosion gully prediction model.

[0114] (2) Input the target erosion gully image into the updated erosion gully prediction model to obtain the target predicted erosion gully image corresponding to the target erosion gully image.

[0115] (3) The erosion gullies in the target prediction erosion gully image are supplemented according to the preset region growth algorithm to generate a complete target prediction erosion gully image.

[0116] (4) Using a variety of vector editing and quality inspection tools, the target predicted erosion gully image is corrected to obtain the final target predicted erosion gully.

[0117] In some implementations, the target structural layer can be the initial convolutional layer and downsampling portion of the U-Net network. This prevents the initial convolutional layer and downsampling portion from being altered during training by freezing all their operating parameters.

[0118] In some implementations, a preset region growing algorithm refers to starting from a certain pixel and gradually adding neighboring pixels that meet similarity criteria according to certain rules. Region growing terminates when a growth stopping condition is met. The similarity criteria can be image information such as pixel grayscale values, colors, and texture features.

[0119] In some implementations, the modified erosion trench data described above is used to optimize the operating parameters of the U-Net network. The layers to be optimized can be the decoding end (upsampling path) and the output layer parameters. By re-selecting the operating parameters of the layers to be optimized, training is performed only on the layers to be optimized that have not been frozen (decoding end (upsampling path) and output layer parameters).

[0120] In one specific implementation, since the working parameters and sample size for frozen training are reduced accordingly, the learning rate, momentum coefficient, and learning rate decay coefficient are adjusted to 0.0001, 0.7, and 0.00001, respectively. The fine-tuned model is then saved in the format 'Fine-tuned model weights + <timestamp>.pth'.

[0121] Based on the updated gully prediction model, a windowing prediction strategy is adopted for the input target gully image to solve problems such as insufficient computing memory and stitching. The gully vector results are automatically extracted from the target gully image (i.e., the gullies in the target gully image are extracted and their corresponding gully images are generated).

[0122] In some implementations, this gully prediction method also removes patches with an area smaller than 200 square meters and interfering patches (such as patches within paddy fields), ultimately retaining only valid target gully images. This reduces interference with subsequent gully image generation.

[0123] In one specific implementation, the step of "inputting the target erosion gully image into the updated erosion gully prediction model to obtain the target predicted erosion gully image corresponding to the target erosion gully image" may include the following steps:

[0124] (1) The target erosion trench image is cropped according to the preset pixel size to obtain multiple sub-images corresponding to the target erosion trench image.

[0125] (2) Input multiple sub-maps into the updated erosion gully prediction model to obtain multiple prediction images corresponding to each sub-map.

[0126] (3) Based on the location information of multiple sub-images, multiple predicted images are stitched together to determine the target predicted erosion gully image.

[0127] The target erosion trench image is cropped row by row and column by column according to a window size of preset pixel size and filled with 128 pixels of reflection around it. This ensures that each sub-image contains complete context and has a uniform size. Each sub-image is fed into the pre-trained updated erosion trench prediction model (i.e., segmentation network) to obtain a binarized prediction (i.e., prediction image). Then, the fill edges are removed, and all sub-images are seamlessly stitched back to the original image size according to their original coordinate positions. This generates a segmentation mask that is completely aligned with the target erosion trench image, thus obtaining the target predicted erosion trench image.

[0128] In one specific implementation, the preset pixel size can be 1024×1024 pixels. It is understood that this application does not limit the specific size of the preset pixel size.

[0129] After obtaining the target erosion gully image corresponding to the target erosion gully image, a preset region-growing algorithm is used to supplement the erosion gullies that were missed in the updated erosion gully prediction model. Specifically, in some embodiments, the step "supplementing the erosion gullies in the target predicted erosion gully image according to the preset region-growing algorithm to generate a complete target predicted erosion gully image" may include the following steps:

[0130] (1) Based on the superimposed image of the target erosion gully and the predicted target erosion gully, determine the growth seed point.

[0131] (2) Determine the pixel value of the growth seed point based on the similar points located around the growth seed point, and determine the complete target prediction erosion trench image.

[0132] The vector patch results of the target predicted erosion gully image are superimposed on the target erosion gully image. Feature points (i.e., seed points) are selected in the local areas that were missed in extraction. The extraction threshold of similar points is set to further extract and generate supplementary erosion gully vector surface results, so as to improve the completeness of the generated target predicted erosion gully image.

[0133] In some implementations, through human-computer interaction, on the target erosion gully image and the layer map overlaid with the target predicted erosion gully image, the erosion gully areas that were missed or under-extracted are manually identified by visual inspection, and control points, i.e. seed points, are set by clicking with the mouse, and their pixels are set to (x0, y0).

[0134] In some implementations, the 4-neighborhood or 8-neighborhood of the seed point (x0, y0) is considered as the growth criterion, that is, only points within a range of 4 or 8 pixels around the seed point (x0, y0) can be considered similar points.

[0135] In some implementations, all pixels (x, y) in the neighborhood are searched sequentially with the seed point (x0, y0) as the center. If a pixel (x, y) is within 4 or 8 pixels, it is merged with the seed point (x0, y0) (within the same region) and the pixel (x, y) is pushed onto the stack.

[0136] In some implementations, a pixel is retrieved from the stack and returned as a growth seed point (x0, y0), and the process continues iterating. When the stack is empty, other growth seed points are determined. Growth ends when every point in the image has a designated location.

[0137] In other words, the growth criterion is set as follows: after determining the seed point, the number of pixels in the eight directions surrounding the seed point can be set as similar points by manual visual inspection, and then the pixel width is set as the threshold of the growth model. Then, the erosion groove pixels selected based on the region growth model are converted from raster to vector to generate the erosion groove surface vector.

[0138] The erosion gullies in the target predicted erosion gully image are supplemented by a preset region growing algorithm to generate a complete target predicted erosion gully image. Then, vector editing and quality inspection tools such as patch explosion, patch deletion, patch drawing, feature hole filling, feature merging, feature erasure, feature reshaping, feature segmentation, feature connection, and feature smoothing are used in sequence to obtain the final target predicted erosion gully.

[0139] In some implementations, the erosion trench prediction method also includes quality control tools such as topology checks and logic checks to post-process the final target predicted erosion trench, thereby obtaining an accurate and complete final target predicted erosion trench.

[0140] In the vector editing and quality control tool for exploded patches: based on the target, predict the multi-part features (MultiPolygon) included in the erosion gully image and output a set of single-part features (Polygon).

[0141] In the vector editing and quality control tool for polygon deletion: In the single-component feature set, delete the non-eroded trench features to obtain an updated single-component feature set. Select the non-eroded trench features through manual visual inspection and human-computer interaction, and then perform the deletion operation.

[0142] In the vector editing and quality control tool for patch drawing and feature filling: missing polygonal features and internal gaps in the updated single-part feature set are filled to generate erosion gully features, and the single-part feature set is updated again. New polygons are drawn through human-computer interaction to expand the missing edges, thereby generating complete erosion gully features.

[0143] In the vector editing and quality control tools for merging, erasing, and reshaping features: broken polygon features in the updated single-component feature set are merged, areas exceeding the boundary in the erosion groove features are erased, and existing erosion groove features with regular edge depressions are supplemented to generate complete erosion groove features.

[0144] Among them, multiple broken polygons can be identified as a continuous and complete erosion gully area in the visual interpretation of the target predicted erosion gully image; the target polygon is erased by drawing eraser polygons; and the two ends of the depression are connected by drawing connecting polylines to generate complete erosion gully surface features.

[0145] In the vector editing and quality control tools for feature segmentation: within a complete erosion gully feature, adjacent but unconnected erosion gully features are connected and merged to generate a new, complete erosion gully feature. This results in two or more independent erosion gully features.

[0146] The two adjacent but not connected polygons in the initially extracted erosion gully vector surface are connected and merged. By drawing a center connecting line inside the two polygons and setting the buffer distance of the connecting line, the two elements are finally merged to generate a new complete erosion gully surface element.

[0147] In the vector editing and quality control tool for feature smoothing: the new, complete erosion gully surface features are smoothed to obtain the final target predicted erosion gully. This reduces the "jagged" appearance of the erosion gully surface vector extracted from the target predicted erosion gully image.

[0148] The topology inspection quality control tool is used to detect and highlight topological errors such as polygon self-intersections in the erosion gully surface vector results of the target predicted erosion gully image. The logic inspection quality control tool is used to detect and highlight logical errors that may occur in the target predicted erosion gully image's erosion gully surface vector results during interactive editing operations.

[0149] In some implementations, historical erosion gully vector surface data is imported, and a historical coding inheritance tool is used to encode and extend the automatically extracted and post-processed target prediction erosion gully vector results, further obtaining coded and unique erosion gully vector results. Specifically:

[0150] Among them, the historical erosion gully vector surface results usually refer to the erosion gully results vector of the year preceding the year to which the target erosion gully belongs. This is an archived result that meets the project requirements through machine and manual quality inspection, and contains the vector result of the unique code BM information of the erosion gully.

[0151] Historical encoding inheritance means that for newly extracted target erosion gully vectors (i.e., target predicted erosion gullies), the unique encoding information of historical erosion gully vectors should be inherited. This is done by traversing the newly extracted target erosion gully vector features, searching for historical erosion gully features that spatially intersect or even overlap with them, obtaining the unique encoding BM value of each historical erosion gully feature, and then assigning it to the target erosion gully vector feature. If no spatially intersecting or overlapping historical erosion gully features can be found, the encoding continues based on the existing encoding information of the historical erosion gully features, assigning a new BM value to the target erosion gully vector feature.

[0152] Based on the encoded erosion gully vector surface results, the centerline extraction tool is used to further perform operations such as main gully merging and encoding, tributary gully merging and encoding, and tributary gully segmentation with input DEM data, and finally achieve the layered export of standardized result layers such as area, gully, number, and length.

[0153] Among them, centerline extraction is used to extract the centerlines of the encoded erosion gully vector surface features, that is, to extract the center connecting lines of the erosion gully surface features and generate centerline vector results. These vector results inherit all the attributes of the erosion gully vector surface.

[0154] The main gully merging coding is based on the extracted centerline vector results. DEM data is imported, and the centerline vector elements of the erosion gullies are traversed sequentially. The corresponding DEM elevation values ​​of the elements are extracted, and coding starts from the main gully centerline with the smallest elevation value (the main gully is usually the longest). Secondary coding is performed based on the inherited BM attributes. Usually, a 3-digit sequence code is added to the 11-digit BM code.

[0155] Branch ditch merging coding is based on the result line vector of the main ditch merging coding. The uncoded branch ditch vectors are merged and coded. The coding rules are the same as those for the main ditch merging coding. At the same time, branch ditches with a length of less than 50m are removed.

[0156] Branch gully segmentation involves importing the erosion gully surface vector and the line vector after branch gully merging and encoding, and then segmenting the erosion gully surface vector into branch gullies to generate logically complete main gully and branch gully surface vectors.

[0157] Layered export involves importing the vector layer after the tributary ditch segmentation and DEM data, and generating standardized result layers containing type names such as area, gully, number, and length, in accordance with the standard input data requirements stipulated in the Technical Guidelines for Dynamic Monitoring of Soil and Water Conservation formulated by the Ministry of Water Resources.

[0158] Please see Figure 4 , Figure 4This illustration shows a schematic diagram of an erosion gully prediction device provided in an embodiment of this application. The erosion gully prediction device 200 includes: a sample set module 210, a prediction module 220, a loss determination module 230, an update module 240, a verification module 250, and a model determination module 260. Specifically:

[0159] The sample set module 210 is used to determine the test sample set and the verification sample set; the test sample set and the verification sample set respectively include erosion gully images of multiple erosion gullies and erosion gully images corresponding to the erosion gully images.

[0160] The prediction module 220 is used to determine the predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully image in the test sample set and a preset image segmentation algorithm.

[0161] The loss determination module 230 is used to determine the total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully images in the test sample set, and a preset loss function.

[0162] The update module 240 is used to update the working parameters of the preset image segmentation algorithm based on the preset stochastic gradient descent algorithm and the total loss value, and to determine the updated preset image segmentation algorithm.

[0163] The verification module 250 is used to determine the index coefficients of the verification sample set based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm.

[0164] The model determination module 260 is used to determine whether to determine the updated preset image segmentation algorithm as the erosion trench prediction model based on the comparison results between the index coefficients and the preset threshold.

[0165] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0166] In the several embodiments provided in this application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or other forms.

[0167] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0168] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of an erosion gully prediction device provided in an embodiment of this application. The erosion gully prediction device 300 in this application may include one or more of the following components: processor 310, memory 320, and one or more application programs, wherein one or more application programs may be stored in memory 320 and configured to be executed by one or more processors 310, and one or more programs are configured to perform the erosion gully prediction method as described in the foregoing method embodiments.

[0169] The processor 310 may include one or more processing cores. The processor 310 connects to various parts within the erosion trench prediction device 300 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 320, and by calling data stored in the memory 320. Optionally, the processor 310 may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 310 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 310 and may be implemented separately using a communication chip.

[0170] The memory 320 may include random access memory (RAM) or read-only memory (ROM). The memory 320 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 320 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created during the use of the erosion trench prediction device 300.

[0171] Please see Figure 6 , Figure 6The diagram shows a computer-readable storage medium 400 provided in an embodiment of this application. The computer-readable storage medium 400 stores program code, which can be called by a processor to execute the erosion trench prediction method described in the above method embodiment.

[0172] The computer-readable storage medium 400 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 400 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 400 has storage space for program code 410 that performs any of the method steps described above. This program code can be read from or written to one or more computer program devices. The program code 410 may be compressed, for example, in a suitable form.

[0173] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications 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 this application.

Claims

1. A method for predicting erosion gullies, characterized in that, The method includes: Determine the test sample set and the verification sample set; the test sample set and the verification sample set respectively include erosion gully images of multiple erosion gullies and erosion gully images corresponding to the erosion gully images. Based on the erosion gully images in the test sample set and a preset image segmentation algorithm, a predicted erosion gully image corresponding to the erosion gully image in the test sample set is determined; the preset image segmentation algorithm is... network; Based on the predicted erosion trench image, the erosion trench images in the test sample set, and a preset loss function, the total loss value between the predicted erosion trench image and the erosion trench images in the test sample set is determined; when calculating the total loss value, the preset loss function assigns a weight of 10 to the foreground pixels of the erosion trench and a weight of 1 to the background pixels. Based on the preset stochastic gradient descent algorithm and the total loss value, update the working parameters of the preset image segmentation algorithm, and determine the updated preset image segmentation algorithm; Based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm, the index coefficients of the verification sample set are determined. Based on the comparison results between the index coefficients and the preset threshold, it is determined whether the updated preset image segmentation algorithm is selected as the erosion trench prediction model. The working parameters of the target structural layer in the erosion gully prediction model are frozen, and the working parameters of the structural layer to be optimized in the erosion gully prediction model are trained to obtain the updated erosion gully prediction model; the target structural layer is the... The initial convolutional layer and downsampling portion in the network; the structure layer to be optimized consists of the decoding end and output layer parameters; Input the target erosion gully image into the updated erosion gully prediction model to obtain the target predicted erosion gully image corresponding to the target erosion gully image; The erosion gullies in the target predicted erosion gully image are supplemented according to a preset region growing algorithm to generate a complete target predicted erosion gully image; The target predicted erosion gully image is corrected using a variety of vector editing and quality inspection tools to obtain the final target predicted erosion gully.

2. The erosion gully prediction method according to claim 1, characterized in that, The method further includes: The erosion gully images and erosion gully pictures in the test sample set are scaled to obtain scaled erosion gully images and erosion gully pictures; And / or, the scaled erosion gully image and erosion gully image are flipped to obtain a flipped erosion gully image and erosion gully image.

3. The erosion gully prediction method according to claim 1, characterized in that, The step of determining the predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully image in the test sample set and a preset image segmentation algorithm includes: The target area is obtained by cropping the concentrated erosion trench images of the test samples; The pixel values ​​included in the target region are normalized to obtain RGB image blocks; The RGB image block is input into the preset image segmentation algorithm, and the predicted erosion trench image is output after forward inference.

4. The erosion gully prediction method according to claim 3, characterized in that, The step of determining the index coefficients of the verification sample set based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm includes: Based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm, a predicted binary mask is obtained; A 2×2 confusion matrix is ​​constructed based on the pixel-by-pixel comparison results between the predicted binary mask and the ground truth mask; The index coefficients of the verification sample set are determined based on the 2×2 confusion matrix.

5. The method for predicting erosion gullies according to claim 1, characterized in that, The step of inputting the target erosion gully image into the updated erosion gully prediction model to obtain the target predicted erosion gully image corresponding to the target erosion gully image includes: The target erosion trench image is cropped according to a preset pixel size to obtain multiple sub-images corresponding to the target erosion trench image; The multiple sub-images are input into the updated erosion gully prediction model to obtain multiple predicted images corresponding to the multiple sub-images respectively; Based on the location information of the multiple sub-images, the multiple predicted images are stitched together to determine the target predicted erosion gully image.

6. The erosion gully prediction method according to claim 1, characterized in that, The step of supplementing the erosion gullies in the target predicted erosion gully image according to a preset region growing algorithm to generate a complete target predicted erosion gully image includes: Based on the superimposed image of the target erosion gully and the predicted target erosion gully, seed points are determined. The pixel value of the growth seed point is determined based on similar points located around the growth seed point, and the complete target predicted erosion trench image is determined.

7. The method for predicting erosion gullies according to claim 1, characterized in that, The process of using various vector editing and quality control tools to correct the target predicted erosion gully image to obtain the final target predicted erosion gully includes: Based on the target, predict the multi-component features included in the erosion gully image and output a single-component feature set; In the single component element set, the non-erosion trench surface elements are deleted to obtain the updated single component element set; Fill in the missing edges and internal gaps of polygons in the updated single-component feature set to generate erosion trench features, and update the single-component feature set again. The broken polygon features in the updated single component feature set are merged, the areas of the erosion groove features that exceed the boundary are erased, and the existing erosion groove features with regular edge depressions are supplemented to generate the complete erosion groove features. In the complete erosion gully surface features, adjacent but unconnected erosion gully surface features are connected and merged to generate new complete erosion gully surface features. The new, complete erosion gully surface features are smoothed to obtain the final target predicted erosion gully.

8. An erosion gully prediction device, characterized in that, The device includes: The sample set module is used to determine the test sample set and the verification sample set; the test sample set and the verification sample set respectively include erosion gully images of multiple erosion gullies and erosion gully images corresponding to the erosion gully images. The prediction module is used to determine a predicted erosion gully image corresponding to the erosion gully image in the test sample set based on the erosion gully image in the test sample set and a preset image segmentation algorithm; the preset image segmentation algorithm is... network; The loss determination module is used to determine the total loss value between the predicted erosion gully image and the erosion gully image in the test sample set based on the predicted erosion gully image, the erosion gully images in the test sample set, and a preset loss function; when calculating the total loss value, the preset loss function assigns a weight of 10 to the foreground pixels of the erosion gully and a weight of 1 to the background pixels. The update module is used to update the operating parameters of the preset image segmentation algorithm based on the preset stochastic gradient descent algorithm and the total loss value, and to determine the updated preset image segmentation algorithm. The verification module is used to determine the index coefficients of the verification sample set based on the erosion trench images in the verification sample set and the updated preset image segmentation algorithm. The model determination module is used to determine whether to determine the updated preset image segmentation algorithm as the erosion trench prediction model based on the comparison results between the index coefficients and the preset threshold. The device is further configured to: freeze the operating parameters of the target structural layer in the erosion gully prediction model, and train the operating parameters of the structural layer to be optimized in the erosion gully prediction model to obtain an updated erosion gully prediction model; the target structural layer is the... The initial convolutional layer and downsampling portion in the network; the structure layer to be optimized consists of the decoding end and output layer parameters; Input the target erosion gully image into the updated erosion gully prediction model to obtain the target predicted erosion gully image corresponding to the target erosion gully image; The erosion gullies in the target predicted erosion gully image are supplemented according to a preset region growing algorithm to generate a complete target predicted erosion gully image; The target predicted erosion gully image is corrected using a variety of vector editing and quality inspection tools to obtain the final target predicted erosion gully.

9. An erosion trench prediction device, characterized in that, include: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the erosion trench prediction method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Regional enhanced mining area erosion gully multi-temporal three-dimensional monitoring method

    CN118015494A

  • Obstetrical image-based image segmentation method and system

    CN118097141A

  • Lightweight crack segmentation method and device, terminal equipment and storage medium

    CN118097154A