An Erosion Gully Segmentation Method Based on Multi-Scale Edge Perception

By combining the encoder, boundary detection module and multi-scale decoder of the Segformer algorithm, the problem of unclear boundary extraction under the complex geographical environment of erosion grooves is solved, and more accurate erosion groove segmentation is achieved, especially efficient detection of small erosion grooves.

CN119229441BActive Publication Date: 2025-08-01HEILONGJIANG PROVINCIAL HYDRAULIC RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411255755.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-08-01
Estimated Expiration
2044-09-09

AI Technical Summary

Technical Problem

When existing neural network algorithms deal with the complex geographical environment and characteristics of erosion grooves, it is difficult to accurately extract the boundaries of erosion grooves, especially the poor segmentation effect of small-scale erosion grooves.

Method used

The erosion groove segmentation method based on multi-scale edge sensing is adopted, combined with the encoder, boundary detection module and multi-scale decoder of the Segformer algorithm, the boundary map and feature map of the erosion groove are extracted through the boundary detection module, and the channel integration is used by the multi-scale decoder to enhance the boundary detection and context information extraction.

Benefits of technology

It significantly improves the accuracy and accuracy of erosion groove segmentation, especially the detection ability of small erosion grooves, reduces the missed detection and error detection rates, and improves the overall segmentation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229441B_ABST
    Figure CN119229441B_ABST
Patent Text Reader

Abstract

An erosion gully segmentation method based on multi-scale edge perception, which relates to the technical field of remote sensing image target extraction. The present invention is to solve the problem that due to the complex geographical environment and characteristics of erosion gullies, the boundary extraction of erosion gullies by general neural network algorithms is not clear. The erosion gully segmentation method based on multi-scale edge perception of the present invention adopts a boundary detection module and a multi-scale decoder. Among them, the edge detection module extracts the edge features of erosion gullies, enhances the ability to extract the boundary details of erosion gullies, and improves the overall segmentation accuracy of erosion gullies; the multi-scale decoder decodes the features of the encoder and the boundary detection module, makes full use of the context feature information extracted by the encoder, suppresses the loss of detail feature information, and improves the segmentation ability for fuzzy gullies and the overall segmentation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of remote sensing image target extraction. Background Art

[0002] Erosion gullies are gullies formed when surface soil is eroded by wind, water, etc. They can cause disasters such as soil loss, land degradation, and ecosystem damage. In recent years, due to the intensification of environmental pollution and the increasing number of extreme weather conditions, the number and formation speed of gullies have increased accordingly. Therefore, taking effective detection and prevention measures for erosion gullies can effectively protect land resources and maintain the sustainable development of the ecological environment. Therefore, regular monitoring of erosion gullies is crucial for understanding their evolution laws and formulating effective restoration strategies.

[0003] For the extraction of erosion gully disasters, traditional methods determine erosion gullies through manual field inspections or manual interpretation of satellite images. Although this method is accurate, it is time-consuming, labor-intensive, and costly. Later, through remote sensing images, manual visual interpretation or traditional machine learning methods were used to detect erosion gullies. Although the efficiency of this method has been improved, the accuracy is very low.

[0004] In recent years, with the emergence of deep learning neural network methods, supervised semantic segmentation methods based on convolutional neural networks have attracted extensive research. This method uses high-resolution satellite images as input, utilizes deep learning technology, and through a semantic segmentation neural network, obtains a binary segmentation result (background and gully), as Figure 1 shown. This method can automatically learn more powerful hierarchical feature representations from the original data, providing new possibilities for the automatic monitoring of erosion gullies. For example, Xu Zhaopeng et al. proposed a method based on a fully convolutional network for monitoring erosion gullies in the Chinese Loess Plateau. By combining remote sensing images with high-resolution digital terrain models and using the FCN network for semantic segmentation, the automatic monitoring of erosion gullies is realized. Zhou Jian et al. proposed an automatic extraction method based on a backpropagation neural network. Using the digital elevation model and based on the feature analysis of loess erosion gullies, accurate gully extraction results were obtained. Zhao Chunhui et al. proposed a semi-supervised semantic segmentation method based on a boundary-guided pseudo-label generation strategy and an adaptive loss function method, which can make full use of labeled historical data and the latest unlabeled monitoring data to obtain the latest erosion gully monitoring results.

[0005] Although some achievements and progress have been made in the current monitoring of erosion gullies, most of the current methods simply apply some segmentation networks in the field of computer vision (such as FCN and U-Net, etc.) to the task of erosion gully extraction. However, compared with traditional visual images, due to the complex geographical environment and characteristics of erosion gullies, the representation of erosion gullies in remote sensing images is diverse, and the surrounding environmental characteristics are also different. This leads to unclear boundary extraction of erosion gullies by general neural network algorithms, especially for the extraction effect of small-scale erosion gullies, which is difficult to achieve the expected extraction effect. Summary of the Invention

[0006] The present invention is to solve the problem that due to the complex geographical environment and characteristics of erosion gullies, the boundary extraction of erosion gullies by general neural network algorithms is unclear. Now, a method for segmenting erosion gullies based on multi-scale edge perception is provided.

[0007] A method for segmenting erosion gullies based on multi-scale edge perception, inputting an erosion gully image into a semantic segmentation network to obtain an erosion gully and background segmentation image;

[0008] The semantic segmentation network includes: an encoder, a boundary detection module, and a multi-scale decoder;

[0009] The erosion gully image is respectively used as the input of the boundary detection module and the encoder. The boundary map of the erosion gully image is obtained through the boundary detection module, and the feature map of the erosion gully image is obtained through the encoder;

[0010] The multi-scale decoder is used to integrate the channels of the boundary map and the feature map to obtain the overall feature of the erosion gully image as the segmentation result, and complete the segmentation of the erosion gully image.

[0011] [[ID=2,0]]Further, the above-mentioned boundary detection module includes: two 3×3 convolutional layers, a regularization layer, and a 2×2 max pooling layer, and the features output by the previous layer are used as the input of the next layer.

[0012] Further, the output features of the four layers in the above-mentioned boundary detection module are respectively expressed as:

[0013]

[0014] Among them, R represents a real number, and H and W respectively represent the height and width of the erosion gully image.

[0015] Further, the above-mentioned boundary detection module further includes seven boundary enhancement modules, of which four constitute a first-level boundary enhancement module, and the remaining three constitute a second-level boundary enhancement module;

[0016] The output features of the four layers of the boundary detection module are respectively input into four first-level boundary enhancement modules. The output of the first-layer first-level boundary enhancement module and the output of the second-layer first-level boundary enhancement module are jointly used as the input of the second-layer second-level boundary enhancement module. The output of the second-layer second-level boundary enhancement module and the output of the third-layer first-level boundary enhancement module are jointly used as the input of the third-layer second-level boundary enhancement module. The output of the third-layer second-level boundary enhancement module and the output of the fourth-layer first-level boundary enhancement module are jointly used as the input of the fourth-layer second-level boundary enhancement module.

[0017] Further, the above-mentioned boundary enhancement module includes: a Sobel convolution layer, a normalization layer, an activation function layer, a 3×3 convolution layer, and a 1×1 convolution layer;

[0018] The input of the boundary enhancement module sequentially passes through the Sobel convolution layer, the normalization layer, the activation function layer, and the 3×3 convolution layer. The output of the 3×3 convolution layer and the input of the boundary enhancement module jointly pass through the 1×1 convolution layer and then output the boundary map of the erosion ditch image.

[0019] Further, the above-mentioned multi-scale decoder includes: two 1×1 convolution layers, a 3×3 convolution layer, two 3×3 dilated convolution layers, and a spatial attention module. The dilation rates of the two 3×3 dilated convolution layers are 2 and 3 respectively;

[0020] The boundary map and the feature map are jointly used as the input features of the multi-scale decoder. The input features respectively pass through a 1×1 convolution layer, a 3×3 convolution layer, and two 3×3 dilated convolution layers to obtain four output results. Another 1×1 convolution layer performs channel-level integration on the four output results, and then further enhances the features through the spatial attention module to obtain the overall features of the erosion ditch image.

[0021] Further, the output of a 1×1 convolution layer is Y1 = Conv1*1(X);

[0022] The output of the 3×3 convolution layer is Y2 = Conv3*3(X);

[0023] The output of the 3×3 dilated convolution layer with a dilation rate of 2 is Y3 = DilatedConv3*3(X, 2);

[0024] The output of the 3×3 dilated convolution layer with a dilation rate of 3 is Y4 = DilatedConv3*3(X, 3);

[0025] X represents the input features, Conv1*1() represents the 1×1 convolution operation, Conv3*3(X) represents the 3×3 convolution operation, and DilatedConv3*3() represents the 3×3 dilated convolution operation.

[0026] Further, the above encoder is the encoder of the Segformer algorithm.

[0027] Further, the method for obtaining the above gully image is as follows:

[0028] Collect remote sensing images of the target area by satellite, and sequentially crop and scale-adjust the remote sensing images so that the remote sensing images can adapt to the processing conditions of the semantic segmentation network;

[0029] After that, normalize the adjusted remote sensing images to obtain gully images.

[0030] Further, the expression of the above normalization is as follows:

[0031]

[0032] where x′ represents the pixel value after normalization, and x i is the pixel value of the i-th pixel in the adjusted remote sensing image, i = 1, 2,..., N, and N is the total number of pixels in the adjusted remote sensing image, the average value of all pixels in the adjusted remote sensing image.

[0033] The present invention proposes a gully segmentation method based on multi-scale edge perception, which adopts a boundary detection module (Boundary Detection module, BDM) and a multi-scale decoder (Multiscale Perception Decoder, MPD). Among them, the edge detection module extracts the edge features of the gully, enhances the ability to extract the boundary details of the gully, and improves the overall segmentation accuracy of the gully; the multi-scale decoder decodes the features of the encoder and the boundary detection module, makes full use of the context feature information extracted by the encoder, suppresses the loss of detail feature information, and improves the segmentation ability for fuzzy gullies and the overall segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the method for segmenting gully images using deep learning technology described in the background art;

[0035] Figure 2 It is a schematic diagram of the architecture principle of the Segformer network;

[0036] Figure 3 It is a schematic diagram of the structure of the boundary detection module;

[0037] Figure 4 It is a schematic diagram of the structure of the boundary enhancement module;

[0038] Figure 5 It is a schematic diagram of the structure of the multi-scale decoder;

[0039] Figure 6 For the data pictures of the erosion gullies in the second specific implementation manner;

[0040] Figure 7 For the visualization result diagrams obtained by using different erosion gully segmentation algorithms;

[0041] Figure 8 The comparison diagram of the visualization results after improving the algorithm. Specific implementation manner

[0042] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention. It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other. Specific implementation manner one:

[0044] An erosion gully is a long, deep and steep gully formed during the soil erosion process. Its existence brings a series of harms to the soil, water resources and ecological environment. Formulating efficient erosion gully monitoring measures helps prevent soil erosion and achieve the sustainable development of land resources. The semantic segmentation method based on deep learning can automatically extract gullies from the remote sensing images of the area to be monitored and is generally considered the most advanced method. However, how to extract reliable gully results from a complex natural field environment is a challenging task. For this reason, this implementation manner proposes a semantic segmentation algorithm based on multi-scale edge perception. This method can obtain more detailed erosion gully segmentation results by effectively acquiring the detailed information and edge information between different terrains.

[0045] Refer to Figures 2 to 5 Specifically illustrate this implementation manner. An erosion gully segmentation method based on multi-scale edge perception described in this implementation manner collects remote sensing images of the target area through a satellite, and sequentially performs cropping and scaling adjustments on the remote sensing images so that the remote sensing images can adapt to the processing conditions of the semantic segmentation network. Then, the adjusted remote sensing images are standardized to obtain erosion gully images. The expression of the standardization is as follows:

[0046]

[0047] where x′ represents the pixel value after standardization, and x i is the pixel value of the i-th pixel in the adjusted remote sensing image, i = 1, 2,..., N, and N is the total number of pixels in the adjusted remote sensing image. The average value of all pixels in the adjusted remote sensing image.

[0048] Input the erosion gully image into the semantic segmentation network to obtain the erosion gully and background segmentation image. The semantic segmentation network includes: an encoder, a boundary detection module, and a multi-scale decoder.

[0049] The erosion gully image is respectively used as the input of the boundary detection module and the encoder. The boundary map of the erosion gully image is obtained through the boundary detection module, and the feature map of the erosion gully image is obtained through the encoder.

[0050] Use the multi-scale decoder to perform channel integration on the boundary map and the feature map to obtain the overall feature of the erosion gully image.

[0051] Upsample the overall feature of the erosion gully image to obtain the erosion gully and background segmentation image with the same size as the erosion gully image.

[0052] 1. Semantic segmentation network

[0053] In recent years, many methods based on convolutional neural networks (CNNs) and Transformer architectures have emerged in the field of semantic segmentation. Convolutional neural networks (CNNs) have achieved remarkable success in semantic segmentation tasks. CNNs can effectively capture local and global features through convolutional operations and have hierarchical feature representation capabilities. In addition, methods based on Transformer architectures have also attracted wide attention in the field of semantic segmentation. Compared with CNN algorithms, Transformer architectures can better capture global information and have better long-range dependence modeling capabilities, showing more prominent performance in semantic segmentation tasks.

[0054] The prior art applies the core ideas and architectures of the Transformer model to pixel-level image segmentation tasks. Its main structural innovations are as follows:

[0055] Self-attention mechanism: The self-attention mechanism enables the model to weight according to the importance of each position in the input sequence to other positions when generating feature representations. In semantic segmentation tasks, the self-attention mechanism is applied to the spatial dimension of the image, enabling the model to model the correlation between different pixels.

[0056] Feed-Forward Network: The feed-forward neural network performs independent non-linear transformations on the features at each position. It is stacked with the self-attention mechanism in multiple layers to construct a deep network.

[0057] Multi-scale processing: Semantic segmentation algorithms based on Transformer usually introduce a multi-scale processing mechanism. By processing features at different levels, the algorithm can capture context information at different scales. Common methods include Pyramid Pooling and Multi-scale Attention, etc.

[0058] This embodiment adopts a semantic segmentation algorithm based on the Transformer structure - the Segformer algorithm. Compared with other semantic segmentation algorithms based on the Transformer structure, the SegFormer algorithm has advantages such as multi-scale processing ability, dual-stream decoder, cross-stage connection, and high efficiency and scalability in the erosion gully segmentation task, and can better cope with the challenges of the erosion gully segmentation task and obtain more accurate segmentation results.

[0059] The encoder part of the Segformer algorithm is composed of multiple Transformer blocks and an input embedding and encoding module. Each Transformer block contains a self-attention mechanism for calculating the attention weights between each position and other positions, and a feed-forward neural network for non-linearly transforming and extracting features. The input embedding and position encoding module is used to convert the pixel values in the input image into feature vector representations and add position information to each position in the input sequence, so that the model can distinguish features at different positions. Therefore, the encoder in this embodiment is the encoder of the Segformer algorithm.

[0060] 2. Boundary Detection Module

[0061] In the erosion gully landform, the surrounding environment is complex and there are various categories. The network usually performs poorly at the edges where the erosion gully meets the ground objects, which will lead to poor overall segmentation accuracy and inaccurate prediction. To address this problem, this embodiment designs a Boundary Detection module (BDM) to improve the detection ability of the erosion gully boundary by extracting the boundary features of the image. The structure of the edge detection module is as Figure 3 shown:

[0062] To enhance the extraction of image boundary features, after the erosion gully image is input into the boundary detection block, it passes through 4 convolutional blocks to extract features of different dimensions. The 4 convolutional blocks are two 3×3 convolutional layers, a regularization layer, and a 2×2 max pooling layer. The features output by the previous layer are used as the input of the next layer.

[0063] The output features of the four layers are respectively expressed as:

[0064]

[0065] Among them, R represents the real number, and H and W respectively represent the height and width of the gully image.

[0066] The boundary detection module further includes seven boundary enhancement modules, among which four constitute the first-level boundary enhancement module, and the remaining three constitute the second-level boundary enhancement module; the output features of the four layers of the boundary detection module are respectively input into the four first-level boundary enhancement modules. The output of the first-layer first-level boundary enhancement module and the output of the second-layer first-level boundary enhancement module are jointly used as the input of the second-layer second-level boundary enhancement module. The output of the second-layer second-level boundary enhancement module and the output of the third-layer first-level boundary enhancement module are jointly used as the input of the third-layer second-level boundary enhancement module. The output of the third-layer second-level boundary enhancement module and the output of the fourth-layer first-level boundary enhancement module are jointly used as the input of the fourth-layer second-level boundary enhancement module.

[0067] In this embodiment, the features of four sizes obtained by the four convolutional layers are respectively input into the corresponding boundary enhancement modules, and the BEM module is used to extract details from the edge space. The specific structure of the BEM module is as Figure 4 shown.

[0068] The boundary enhancement module includes: Sobel convolutional layer, normalization layer, activation function layer, 3*3 convolutional layer and 1*1 convolutional layer; a system with a residual structure is used to enhance the extraction of boundary features. The input extracts boundary features through the Sobel (Sobel operator) convolutional layer and 3*3 convolutional layer. After the residual, the 1*1 convolutional layer is used to reduce the feature volume to a single channel, and the boundary feature map is output. Specifically, the input of the boundary enhancement module sequentially passes through the Sobel convolutional layer, normalization layer, activation function layer and 3*3 convolutional layer. The output of the 3*3 convolutional layer and the input of the boundary enhancement module jointly pass through the 1*1 convolutional layer and then output the boundary map of the gully image. Richer edge features are obtained through the progressive superposition method, and finally the boundary detection result is reconstructed by feature interpolation to the original image size. Through the boundary detection module, the boundary information of the gully in the image can be effectively extracted, which helps the model to accurately segment the gully area.

[0069] 3. Multi-scale decoder

[0070] Although the boundary detection module performs well in the gully boundary segmentation, it still performs very poorly on some small gullies, often missing detections and misdetections. For these small gullies, the context information is very important for the segmentation of small-scale gullies. In view of this situation, this embodiment designs a multi-scale perception decoder, and its overall structure is as Figure 5As shown, the multi-scale decoder includes: two 1×1 convolutional layers, one 3×3 convolutional layer, two 3×3 dilated convolutional layers, and a spatial attention module. The dilation rates of the two 3×3 dilated convolutional layers are 2 and 3 respectively.

[0071] The overall decoder adopts a pyramid convolutional shape. The features extracted by the encoder pass through dilated convolutional layers and pooling layers with different dilation rates. The dilated convolution increases the receptive field of the decoder and extracts semantic information at different scales. The spatial pyramid pooling operation is applied to divide the feature map into sub-regions of different scales and perform pooling operations on each sub-region. This operation helps to extract richer semantic information while maintaining the spatial structure of the feature map. Finally, a 1*1 convolution is used to perform channel-level integration on the multi-layer features, and then a spatial attention module is used to further enhance the features to output the result.

[0072] Specifically, the boundary map and the feature map are jointly used as the input features of the multi-scale decoder. The input features pass through a 1×1 convolutional layer, a 3×3 convolutional layer, and two 3×3 dilated convolutional layers respectively to obtain four output results. The output channel numbers of the four layers are C1, C2, C3, and C4 respectively.

[0073] The output of one 1×1 convolutional layer is Y1 = Conv1*1(X);

[0074] The output of the 3×3 convolutional layer is Y2 = Conv3*3(X);

[0075] The output of the 3×3 dilated convolutional layer with a dilation rate of 2 is Y3 = DilatedConv3*3(X, 2);

[0076] The output of the 3×3 dilated convolutional layer with a dilation rate of 3 is Y4 = DilatedConv3*3(X, 3);

[0077] X represents the input feature, Conv1*1() represents the 1×1 convolution operation, Conv3*3(X) represents the 3×3 convolution operation, and DilatedConv3*3() represents the 3×3 dilated convolution operation.

[0078] Another 1×1 convolutional layer performs channel-level integration on the four output results, and then further enhances the features through the spatial attention module to obtain the overall features of the erosion ditch image.

[0079] The number of channels C Out for the final input to the spatial attention module is:

[0080] C Out = C1 + C2 + C3 + C4.

[0081] Through the multiscale perception decoder, it is able to effectively perceive and extract the context information and detailed information in the features, strengthening the model's ability to extract small gullies.

[0082] In summary, this embodiment generally adopts the architecture of the Segformer network. A boundary detection module (BDM) is added to the encoder part in parallel with the original encoder, aiming to extract the edge information in the image and generate a boundary map, so that the features extracted by the model can obtain more boundary information of erosion gullies. In the decoder part, by adding a multiscale perception decoder (MPD), the feature information extracted by the encoder is extracted at multiple scales, maintaining the context information and detailed edge information, capturing more details of fuzzy gullies, and thus assisting the model in performing a more detailed erosion gully segmentation task. Specific Embodiment 2:

[0084] The erosion gully data used in this embodiment is the data taken by the GF-2 satellite in Huachuan County, Heilongjiang Province. The data band is 3, and more than 1,000 384*384 slices are obtained by cutting the processed data pictures. The data pictures containing erosion gullies are manually labeled, and the labeled categories are: erosion gullies and background, and different colors are used for distinction. More than a thousand pictures are randomly divided into a training set and a test set in a ratio of 7:3. The data pictures are as Figure 6 shown.

[0085] There are mainly two evaluation criteria for erosion gully segmentation. Pixel accuracy Acc: Pixel accuracy refers to the proportion of the number of pixels correctly predicted by the model to the total number of pixels. It is a simple and intuitive evaluation index, but it may not be able to reflect the situation of class imbalance. The second is the mean intersection over union (mIoU): The mean intersection over union is a commonly used evaluation criterion. It calculates the intersection over union (IoU) of each category, and then takes the average of all categories. IoU is the ratio of the intersection area to the union area between the prediction result and the true label, which can measure the accuracy and correctness of the prediction result.

[0086] The specific calculation formulas are as follows:

[0087]

[0088] Among them, TP represents the number of pixels correctly predicted as erosion gullies, TN represents the number of pixels correctly predicted as non-erosion gullies, FP represents the number of pixels wrongly predicted as erosion gullies for non-erosion gullies, and FN represents the number of pixels wrongly predicted as non-erosion gullies for erosion gullies.

[0089] On the Huachuan erosion gully dataset, in this embodiment, a variety of classical semantic segmentation algorithms are used to train and test the dataset, and the following results are obtained as shown in Table 1:

[0090] Table 1: Results of Classical Semantic Segmentation Algorithms

[0091]

[0092] It can be seen from the table that due to the complex geomorphic environment of the erosion gullies, the accuracy of most traditional CNN semantic segmentation methods is relatively low, with the IoU around 40, and the best HrNet reaches 43.14. The reason for the low CNN segmentation accuracy may be that traditional CNN semantic segmentation algorithms are difficult to accurately capture the different scales and shapes of erosion gullies, and information is missing when dealing with small-scale details. For the segmentation algorithms based on the Transformer structure, the accuracy is generally higher than that of the semantic segmentation algorithms with the CNN structure. Because it has a certain control over multi-scale details and can capture the small-scale information of erosion gullies to a certain extent. Among the segmentation algorithms based on the Transformer structure, the Segformer algorithm has the highest accuracy, with the IoU reaching 50.34.

[0093] Due to the complex geomorphic environment of the erosion gullies, the classical traditional semantic segmentation algorithms have a poor segmentation effect on the gullies. The Segformer algorithm based on the Transformer structure performs better, but there are still many problems in its visualization results. The visualization results are as Figure 7 shown. Red pixels represent misdetections, and blue pixels represent missed detections. It can be seen from the visualization results that for the relatively obvious gullies in (a), (b), and (c), some CNN methods still have large missed detection problems, and the segmentation results of the gullies are not accurate enough. The Transformer algorithm performs better than the CNN algorithm, but there are still some missed detection phenomena. It can be seen from the method of this embodiment that the segmentation of these simple gullies is relatively accurate, and the phenomena of missed detection and misdetection are less. For the complex large gullies in (d) and (e), it can be seen that the results of the CNN method have a large number of missed detections and misdetections, resulting in broken segmentation results, and the Transformer method does not perform well either. However, it can be seen from the method of this embodiment that the segmentation continuity and accuracy of the erosion gullies reach a relatively high level, which is particularly prominent in Figure (e).

[0094] In order to improve the erosion gully segmentation accuracy, enhance the boundary segmentation effect, and reduce the missed detection rate, in this embodiment, Segformer is used as the base algorithm, and the boundary segmentation module is connected in parallel with the original encoder to enrich the feature information extracted by the encoder. The decoder part adopts a multi-scale perception decoder to enrich the model's extraction of multi-scale information. Ablation experiments are carried out on the original dataset, and the results are shown in Table 2:

[0095] Table 2: Experimental accuracy after improvement

[0096]

[0097] As shown in Table 2, when the boundary detection module and the multi-scale decoder are added separately, the accuracy of the model is improved by 3.71% and 2.5% respectively. When both are added, the accuracy improvement is the most obvious, reaching 6.76%. This shows that the multi-scale decoder can extract the features extracted by the boundary detection module more accurately, assist the model in segmentation, and obtain more accurate segmentation results. After adding the boundary detection module and the multi-scale perception decoder, (1) the model's detection ability for small erosion gullies is significantly enhanced, and the missed detection of small erosion gullies in the original results is improved in the improved algorithm, which can be seen in the results of (a) and (b), effectively improving the segmentation accuracy of erosion gullies. (2) In the edge areas of some large erosion gullies, due to the addition of the boundary detection block, the segmentation effect has been significantly improved, and the edge segmentation is more detailed and accurate. This improvement can be found in the results of (a) and (c). Generally speaking, compared with the results of traditional semantic segmentation algorithms, Base+EDM+MPD can effectively improve the segmentation accuracy of erosion gully boundaries, improve the missed detection phenomenon of small erosion gullies, effectively improve the segmentation accuracy, and provide reliable technical support for obtaining the disaster information of erosion gullies and formulating effective prevention and control plans.

[0098] The data images in this embodiment are input into the network. The encoder cooperates with the boundary detection module to extract the feature information of the images, and the multi-scale decoder is combined to perform deeper decoding on the feature information to obtain more accurate erosion gully detection results. Among them, the boundary detection module EDM proposed in the semantic segmentation method can improve the model's detection effect on erosion gully boundaries, and the accuracy is improved by 3.71% compared with the base network after adding it. The proposed multi-scale perception decoder MPD can improve the model's detection ability for small erosion gullies, and the model accuracy is improved by 2.5% after adding it. When both are added to the network, the improvement reaches 6.76%. Compared with other traditional algorithms, the method proposed in this paper can effectively improve the difficult problems in erosion gully detection, improve the segmentation accuracy of the erosion gully detection task, and provide effective information for the prevention and control of erosion gullies.

[0099] Although the present invention has been described herein with reference to particular embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. Accordingly, it should be understood that numerous modifications may be made to the exemplary embodiments, and other arrangements may be devised, without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the different dependent claims and the features described herein may be combined in ways different from those described in the original claims. It should also be understood that the features described in connection with separate embodiments may be used in other described embodiments.

Claims

1. A method for eroded gully segmentation based on multi-scale edge perception, which inputs an eroded gully image into a semantic segmentation network to obtain an eroded gully and background segmentation image; It is characterized in that The semantic segmentation network includes: an encoder, a boundary detection module, and a multi-scale decoder; The eroded gully image is respectively used as the input of the boundary detection module and the encoder. The boundary map of the eroded gully image is obtained through the boundary detection module, and the feature map of the eroded gully image is obtained through the encoder; The multi-scale decoder is used to perform channel integration on the boundary map and the feature map to obtain the overall feature of the eroded gully image as the segmentation result, and complete the segmentation of the eroded gully image; The boundary detection module includes: two 3×3 convolutional layers, a regularization layer, and a 2×2 max pooling layer. The features output by the previous layer are used as the input of the next layer; The output features of the four layers in the boundary detection module are respectively expressed as: where R represents a real number, and H and W respectively represent the height and width of the eroded gully image; The boundary detection module further includes seven boundary enhancement modules, among which four constitute a first-level boundary enhancement module, and the remaining three constitute a second-level boundary enhancement module; The output features of the four layers of the boundary detection module are respectively input into the four first-level boundary enhancement modules. The output of the first-layer first-level boundary enhancement module and the output of the second-layer first-level boundary enhancement module are jointly used as the input of the second-layer second-level boundary enhancement module. The output of the second-layer second-level boundary enhancement module and the output of the third-layer first-level boundary enhancement module are jointly used as the input of the third-layer second-level boundary enhancement module. The output of the third-layer second-level boundary enhancement module and the output of the fourth-layer first-level boundary enhancement module are jointly used as the input of the fourth-layer second-level boundary enhancement module; The boundary enhancement module includes: a Sobel convolutional layer, a normalization layer, an activation function layer, a 3*3 convolutional layer, and a 1*1 convolutional layer; The input of the boundary enhancement module sequentially passes through the Sobel convolutional layer, the normalization layer, the activation function layer, and the 3*3 convolutional layer. The output of the 3*3 convolutional layer and the input of the boundary enhancement module jointly pass through the 1*1 convolutional layer and then output the boundary map of the eroded gully image.

2. The method for eroded gully segmentation based on multi-scale edge perception according to claim 1, wherein The multi-scale decoder includes: two 1×1 convolutional layers, a 3×3 convolutional layer, two 3×3 dilated convolutional layers, and a spatial attention module. The dilation rates of the two 3×3 dilated convolutional layers are 2 and 3 respectively; The boundary map and the feature map are jointly used as the input features of the multi-scale decoder. The input features respectively pass through a 1×1 convolutional layer, a 3×3 convolutional layer, and two 3×3 dilated convolutional layers to obtain four output results. Another 1×1 convolutional layer performs channel-level integration on the four output results, and then further enhances the features through the spatial attention module to obtain the overall feature of the eroded gully image.

3. The method for eroded gully segmentation based on multi-scale edge perception according to claim 2, wherein The output of a 1×1 convolutional layer is Y1 = Conv1*1(X); The output of the 3×3 convolutional layer is Y2 = Conv3*3(X); The output of the 3×3 dilated convolutional layer with a dilation rate of 2 is Y3 = DilatedConv3*3(X, 2); The output of the 3×3 dilated convolutional layer with a dilation rate of 3 is Y4 = DilatedConv3*3(X, 3); X represents the input feature, Conv1*1() represents the 1×1 convolution operation, Conv3*3(X) represents the 3×3 convolution operation, and DilatedConv3*3() represents the 3×3 dilated convolution operation.

4. The erosion gully segmentation method based on multi-scale edge perception according to claim 1, characterized in that, The encoder is the encoder of the Segformer algorithm.

5. A gully segmentation method based on multi-scale edge perception according to claim 1, characterized in that The method for obtaining the gully image is as follows: Collect the remote sensing image of the target area by satellite, and successively crop and scale-adjust the remote sensing image so that the remote sensing image can adapt to the processing conditions of the semantic segmentation network; After that, standardize the adjusted remote sensing image to obtain the gully image.

6. A method for gully segmentation based on multi-scale edge perception according to claim 5, characterized in that, The expression of the standardization is as follows: where x′ represents the normalized pixel value, and x i is the pixel value of the i-th pixel in the adjusted remote sensing image, where i = 1, 2,..., N, and N is the total number of pixels in the adjusted remote sensing image. is the average value of all pixels in the adjusted remote sensing image.