A rock structural plane trace prediction method based on an edge information-based trace segmentation network
Patent Information
- Application Number
- CN202410169096.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-02-06
AI Technical Summary
[0006]本发明的目的在于克服现有的针对岩石结构面迹线提取的语义分割模型存在迹线信息丢失严重、细长迹线捕捉捕捉能力弱以及特征学习过程解释性差等问题,提供一种基于边缘信息的迹线分割网络的岩石结构面迹线预测方法,实现对岩石结构面迹线的精准预测
[0068]1、首先从工程现场采集岩石表面图像数据集,并人工标注对应的岩石结构面迹线标签,再将数据集划分为训练集和测试集。进入编码阶段,模型通过卷积学习输入图片特征,通过边缘池化减小图片尺寸并减少边缘信息 的丢失,同时采用边缘语义增强结构对于编码器中的原始边缘信息进行增强。再进入解码阶段,模型通过卷积和上采样还原图像至原尺寸大小,同时在每个解码块加入基于边缘信息的通道空间注意力门,提高模型对于迹线的学习与捕捉能力,同时加快注意力的收敛速度,最后得到输入图片的岩石结构面迹线预测结果。
Smart Images

Figure CN117952950B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological engineering, and specifically discloses a method for predicting rock structural surface traces based on a trace segmentation network with edge information. Background Technology
[0002] Rock structural planes refer to fracture surfaces or bedding planes with a certain direction and dip in a rock mass. The characteristics of structural planes largely determine the mechanical properties of the rock mass. By extracting structural plane traces, rock tectonic features can be inferred and rock mass stability can be assessed, which is crucial for guiding engineering design and mineral exploration.
[0003] Traditional methods for acquiring rock structural surface traces primarily rely on contact-based manual measurement. While this method can accurately measure accessible rock structural surfaces, it is unsuitable for very steep or inaccessible rock masses. In recent years, lidar technology has been applied to rock structural surface detection. This technology can acquire high-precision 3D point cloud data of the rock surface without contact, thus achieving indirect detection of rock structural surfaces. However, it also has limitations in detecting complex rock surfaces, and lidar scanners are expensive (typically over 1 million RMB), resulting in high costs. Besides lidar, photogrammetry is also widely used in rock structural surface detection, and it is more cost-effective than lidar. Photogrammetry is also a non-contact detection method that uses digital image technology to identify the grayscale gradient of rock surface images to obtain the rock structural surface traces. Currently, the biggest problem with photogrammetry is the accuracy of structural surface detection. First, photogrammetry cannot accurately measure areas with indistinct textures or low contrast in rock structural surface images. In addition, due to the influence of natural factors such as lighting, the collected rock images often contain noise, which has a significant impact on the detection results of photogrammetry.
[0004] With the development of deep learning, image recognition technology based on deep neural networks has been applied to the geological field and achieved good results. Deep learning methods have many advantages over other technologies. On the one hand, due to the outstanding learning ability of deep neural networks, deep learning models can capture more subtle features. On the other hand, deep learning technology has strong robustness, which can reduce the impact of noise in the image on the prediction results. However, existing deep learning methods for extracting rock structure surface traces still have many problems and difficulties. First, based on the requirements for extracting rock structure surface traces, semantic segmentation models are usually used to complete this task. However, the downsampling process of semantic segmentation models suffers from severe trace information loss, which affects the model's learning and prediction of traces. Furthermore, rock structure surface traces are long, thin, and irregular, which traditional semantic segmentation models cannot fully learn. Attention mechanisms can enhance the model's ability to learn traces, but many subtle traces still cannot be captured by attention. This can lead to missed recognition in the prediction results. Finally, due to the black-box nature of deep learning models, the extraction process of rock structure surface trace features suffers from poor interpretability.
[0005] For rock structure surface trace detection, the traces are linear in shape with obvious edge features. Therefore, the learning and recognition of traces by the network largely involves learning and recognizing edge information. Thus, edge information can be fully utilized to improve the model's predictive performance. Furthermore, the use of edge information also enhances the model's interpretability. Therefore, this invention addresses the problems of existing deep learning models by providing a rock structure surface trace prediction method based on a trace segmentation network that integrates edge information, achieving accurate prediction of rock structure surface traces. Summary of the Invention
[0006] The purpose of this invention is to overcome the problems of severe trace information loss, weak ability to capture slender traces, and poor interpretability of feature learning in existing semantic segmentation models for extracting traces on rock structural surfaces. This invention provides a method for predicting traces on rock structural surfaces based on a trace segmentation network with edge information, thereby achieving accurate prediction of traces on rock structural surfaces.
[0007] The technical solution proposed in this invention is:
[0008] A method for predicting rock structure surface traces based on a trace segmentation network with edge information includes the following steps:
[0009] Step S1, rock dataset collection and creation: Based on the specific engineering environment and requirements, take pictures of the rock environment that needs to be extracted for structural surface traces to obtain a rock surface image dataset X of the same size;
[0010] ,
[0011] n is the number of samples collected;
[0012] For each image in dataset X, a rock structure surface trace label map is drawn to obtain the rock structure surface trace label dataset Y corresponding to dataset X;
[0013] ,
[0014] Where n is the number of samples collected, and the elements between X and Y correspond one-to-one;
[0015] Step S2, preprocessing the sampled rock dataset: perform data augmentation on the acquired images, and simultaneously perform the same processing on corresponding elements in datasets X and Y from step S1 to ensure that the augmented images correspond one-to-one with the labels; at this point, a new rock surface image dataset is obtained. , Rock structure surface trace label dataset , Where m is the number of samples after data augmentation;
[0016] The augmented dataset is randomly divided into training and test sets.
[0017]
[0018]
[0019]
[0020] ,
[0021] in, and Together they form the training set. and Together they form the test set. This represents the number of samples in the training set. The number of samples in the training set;
[0022] Step S3, model building and training, includes,
[0023] Step S31: Build the UNet network as the basic network structure, and use edge pooling instead of max pooling between coding blocks in the encoder.
[0024] Step S32: Use an edge-pooling-based edge semantic enhancement structure in the encoder to enhance the original edge information;
[0025] Step S33: In each decoding block of the decoder, channel spatial attention gates based on edge information are used to enhance the model's ability to capture traces;
[0026] Step S34: Construct and train a trace segmentation network model based on edge information;
[0027] Step S4, rock structure surface trace prediction, including,
[0028] Step S41, Data Acquisition and Trajectory Prediction,
[0029] Image data of rock surfaces were collected at the engineering site, and the trained model was used to predict the traces of rock structural surfaces.
[0030]
[0031] ,
[0032] in, It is a dataset of rock surface images collected from the engineering site; The results are the traces of rock contact surfaces predicted by the model. and The elements in the database correspond one-to-one;
[0033] Step S42: Denoising the prediction results. The predicted rock structure surface trace results are denoising processed to remove trace noise points with small areas in the results.
[0034] Furthermore, the data enhancement processing performed on the acquired image in step S2 includes, but is not limited to, random rotation, flipping, cropping, brightness adjustment, and noise addition.
[0035] Furthermore, step S31 specifically involves building a basic network structure based on the UNet network, including an encoder and a decoder. The encoder has a total of four encoding blocks, which are connected using edge pooling. In edge pooling, edge operators are used to obtain the edge intensity information of each pixel in the input feature map. Then, based on the edge intensity information, the softmax function is used to calculate the weight distribution. Finally, the pixel values of the pooling window are weighted and summed to obtain the pooling output. Edge pooling can retain more edge information during the pooling process, and since traces have obvious edge features, edge pooling can reduce the loss of trace information during the pooling process.
[0036] Furthermore, step S32 specifically involves using edge pooling to downsample the input image in the first coding layer three times to obtain an original edge information feature map with the same size as the subsequent three coding layers. Then, the original edge information feature map is expanded by convolution and then concatenated and fused with the input feature map of each coding block to enhance the original edge information in the encoder.
[0037] Further, step S33 specifically involves the following steps: the encoded feature map needs to be entered into the decoder and restored to its original size through convolution and upsampling. There are a total of four decoding blocks. In each decoding block, a channel spatial attention gate based on edge information is added to improve the model's ability to learn and capture traces. In the channel spatial attention gate based on edge information, the edge information of the input feature map is first calculated. Then, the channel attention and spatial attention are initialized based on the edge information and pixel information of the feature map. After multiple layers of convolution operations, the final channel attention and spatial attention are formed. Then, the channel attention and spatial attention are weighted and merged according to the ratio of channel and spatial information of the input feature map to obtain the channel spatial attention based on edge information. Finally, multiplying the channel spatial attention based on edge information with the input feature map can enhance the model's ability to capture traces.
[0038] Furthermore, step S34 specifically involves determining the network parameters and hyperparameters, and training a trace segmentation network model that integrates edge information.
[0039] Calculate the loss function of the model :
[0040] ,
[0041] Among them Authentic labels For predicting labels, TP is the number of pixels that predict the trace as a trace, FN is the number of pixels that predict the trace as background, FP is the number of pixels that predict the background as a trace, and s is a custom coefficient to prevent division by zero. The network parameters are updated using the backpropagation algorithm and the Adam algorithm, and the training of the model stops after reaching the maximum number of iterations R.
[0042] Furthermore, step S31 is specifically processed as follows:
[0043] The Scharr edge detection operator is used to process the input feature map to obtain the edge information intensity of the input feature map:
[0044] ,
[0045] ,
[0046] ,
[0047] in This represents the Scharr edge detection operator. Directional edge detection filter, This represents the Scharr edge detection operator. Directional edge detection filter, Indicates the input feature map, This represents the edge information intensity of the input feature map. Indicates that the input is The convolution kernel is Convolution operations;
[0048] The edge intensity information in the pooling window is normalized using softmax to obtain the edge intensity weights of each pixel in the pooling window. :
[0049] ,
[0050] The weighted sum of the pixels in the pooling window is used to obtain the pooling output:
[0051] ,
[0052] in The first pooled window represents the pooled window. 1 pixel express Corresponding edge information intensity weights; This indicates the output of the pooled window.
[0053] Furthermore, step S32 is specifically processed as follows:
[0054] Let the size of the input feature map be 512*512. First, the input image is downsampled three times consecutively based on edge pooling to obtain original edge information feature maps with sizes of 256*256, 128*128, and 64*64, respectively, which correspond to the input sizes of the three coding layers. Since the number of channels in the original edge information feature map is 3, while the number of input channels in the three coding layers are 64, 128, and 256, in order to prevent the information in the original edge information feature map from being overwhelmed, it is expanded by convolution before being concatenated and fused with the input feature maps of each lower coding layer.
[0055]
[0056] in Indicates input, O1 represents the input of the second coded block, and O1 represents the output of the first coded block. This indicates feature map splicing. This represents the convolution operation. This indicates edge pooling.
[0057] Furthermore, step S33 is specifically processed as follows:
[0058] For the feature map input to the attention gate, the edge information intensity of the feature map is first calculated using the edge detection operator. Then, channel attention initialization and spatial attention initialization are performed using formula F. Channel attention initialization is performed in the channel dimension, and spatial attention initialization is performed in the size dimension.
[0059]
[0060] in Indicates the maximum pixel value. Represents the average pixel value. This indicates the maximum value of the edge strength information. This represents the average value of the edge strength information;
[0061] After initialization, the attention is learned through convolution to obtain the actual attention. Then, the channel attention and spatial attention are weighted and summed according to the information content ratio of the channel and spatial aspects of the input feature map to obtain the final attention. The ratio of spatial attention to channel attention from bottom to top is 0.2:0.8, 0.4:0.6, 0.6:0.4, and 0.8:0.2, respectively, depending on the decoding block.
[0062] Furthermore, after step S34, the method further includes:
[0063] Step S35: Validate the model's predictive performance using test set data; the test set includes rock surface images and rock structure traces, respectively:
[0064]
[0065] ,
[0066] The trained model was used to predict structural surface traces on rock surface images in the test set. The prediction results were then compared with the ground truth labels. By comparison, we can determine the predictive performance of the model.
[0067] Compared with the prior art, the advantages of the present invention are as follows:
[0068] 1. First, a dataset of rock surface images was collected from the engineering site, and the corresponding rock structure surface trace labels were manually annotated. The dataset was then divided into training and testing sets. In the encoding stage, the model learns the features of the input image through convolution, reduces the image size and minimizes the loss of edge information through edge pooling, and enhances the original edge information in the encoder using an edge semantic enhancement structure. In the decoding stage, the model restores the image to its original size through convolution and upsampling. Simultaneously, a channel spatial attention gate based on edge information is added to each decoding block to improve the model's ability to learn and capture traces, while also accelerating the convergence speed of the attention. Finally, the predicted rock structure surface traces of the input image are obtained.
[0069] 2. This invention utilizes edge information to enhance the model's ability to learn and capture traces, which not only improves the accuracy of rock structure surface trace prediction, but also enhances the interpretability of the model for the feature learning process. Attached Figure Description
[0070] 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 accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0071] Figure 1 This is a flowchart illustrating an embodiment of the rock structure surface trace prediction method based on a trace segmentation network with edge information according to the present invention.
[0072] Figure 2 This is a schematic diagram of a trace segmentation network structure based on edge information in an embodiment of the present invention;
[0073] Figure 3 This is a schematic diagram of an edge pooling network structure in an embodiment of the present invention;
[0074] Figure 4 This is a schematic diagram of an edge semantic enhancement network structure based on edge pooling in an embodiment of the present invention;
[0075] Figure 5 This is a schematic diagram of an attention initialization network structure based on edge information in an embodiment of the present invention;
[0076] Figure 6 This is a schematic diagram of a channel spatial attention gate network structure based on edge information in an embodiment of the present invention;
[0077] Figure 7 This is a diagram showing the prediction results of rock structure surface traces in an embodiment of the present invention. Detailed Implementation
[0078] In the description of this invention, it should be noted that the structures, proportions, sizes, etc., illustrated in the accompanying drawings are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the invention can produce, should still fall within the scope of the technical content disclosed in this invention.
[0079] Example:
[0080] The technical solution provided by this invention not only improves the prediction accuracy of rock structure surface traces, but also enhances the interpretability of the model for the feature learning process, specifically including the following steps:
[0081] Step S1, Collection and creation of rock dataset:
[0082] Based on the specific engineering environment and requirements, a suitable industrial camera was selected to photograph and sample the rock environment where structural surface traces needed to be extracted, resulting in a dataset X of clear rock surface images of the same size. For each image in dataset X, a rock structural surface trace label map was manually drawn, resulting in a corresponding rock structural surface trace label dataset Y.
[0083] ,
[0084] ,
[0085] Where n is the number of samples collected, and the elements between X and Y correspond one-to-one;
[0086] Step S2: Preprocess the sampled rock dataset:
[0087] Data augmentation processing is performed on the acquired images, including random rotation, flipping, cropping, brightness adjustment, and noise addition. During data augmentation, corresponding elements in datasets X and Y described in S1 should undergo the same processing to ensure a one-to-one correspondence between the augmented images and their labels. This results in a new dataset of rock surface images. , Rock structure surface trace label dataset , Where m is the number of samples after data augmentation;
[0088] The augmented dataset is randomly divided into training and test sets.
[0089]
[0090]
[0091]
[0092] ,
[0093] in, and Together they form the training set. and Together they form the test set. This represents the number of samples in the training set. The number of samples in the training set;
[0094] Step S3, model building and training, includes,
[0095] Step S31: Construct the UNet network as the basic network structure, and use edge pooling instead of max pooling between coding blocks in the encoder to reduce the loss of trace information.
[0096] The basic network structure is built based on the UNet network, including an encoder and a decoder. The decoder has a total of four encoding blocks, which are connected by edge pooling. In edge pooling, edge operators are used to obtain the edge intensity information of each pixel in the input feature map. Then, based on the edge intensity information, the softmax function is used to calculate the weight distribution. Finally, the pixel values of the pooling window are weighted and summed to obtain the pooling output. Edge pooling can retain more edge information during the pooling process, and since traces have obvious edge features, edge pooling can reduce the loss of trace information during the pooling process.
[0097] Step S31 is processed in detail as follows:
[0098] The Scharr edge detection operator is used to process the input feature map to obtain the edge information intensity of the input feature map:
[0099] ,
[0100] ,
[0101] ,
[0102] in This represents the Scharr edge detection operator. Directional edge detection filter, This represents the Scharr edge detection operator. Directional edge detection filter, Indicates the input feature map, This represents the edge information intensity of the input feature map. Indicates that the input is The convolution kernel is The convolution operation.
[0103] The edge intensity information in the pooling window is normalized using softmax to obtain the edge intensity weights of each pixel in the pooling window. :
[0104]
[0105] The weighted sum of the pixels in the pooling window is used to obtain the pooling output:
[0106]
[0107] in The first pooled window represents the pooled window. 1 pixel express Corresponding edge information intensity weights; This indicates the output of the pooled window.
[0108] Step S32: Enhance the original edge information in the encoder using an edge pooling-based edge semantic enhancement structure:
[0109] Edge pooling is used to downsample the input image in the first coding layer three times to obtain the original edge information feature map with the same size as the following three coding layers. The original edge information feature map is then expanded by convolution and concatenated with the input feature map of each coding block to enhance the original edge information in the encoder.
[0110] Step S32 is processed in detail as follows:
[0111] Let the input feature map size be 512*512. First, the input image is downsampled three times consecutively based on edge pooling to obtain original edge information feature maps with sizes of 256*256, 128*128, and 64*64, corresponding to the input sizes of the three coding layers. Since the original edge information feature map has 3 channels, while the input channels of the three coding layers are 64, 128, and 256 respectively, to prevent the information in the original edge information feature map from being overwhelmed, it is expanded by convolution before being concatenated and fused with the input feature maps of each subsequent coding layer.
[0112]
[0113] in Indicates input, O1 represents the input of the second coded block, and O1 represents the output of the first coded block. This indicates feature map splicing. This represents the convolution operation. This indicates edge pooling.
[0114] Step S33: In each decoding block of the decoder, a channel-space attention gate based on edge information is used to enhance the model's ability to capture traces, while accelerating the convergence speed of attention.
[0115] After encoding, the feature map needs to be decoded and restored to its original size through convolution and upsampling. There are a total of four decoding blocks. In each decoding block, a channel-space attention gate based on edge information is added to improve the model's ability to learn and capture traces. In the edge-information-based channel-space attention gate, the edge information of the input feature map is first calculated. Then, channel attention and spatial attention are initialized based on the edge and pixel information of the feature map. After multiple convolution operations, the final channel attention and spatial attention are formed. Next, the channel attention and spatial attention are weighted and merged according to the ratio of channel and spatial information in the input feature map to obtain the edge-information-based channel-space attention. Finally, multiplying the edge-information-based channel-space attention with the input feature map can enhance the model's ability to capture traces. Step S33 is processed in detail as follows:
[0116] For the feature map input to the attention gate, the edge information intensity of the feature map is first calculated using the edge detection operator. Then, channel attention initialization and spatial attention initialization are performed using formula F. Channel attention initialization is performed in the channel dimension, and spatial attention initialization is performed in the size dimension.
[0117]
[0118] in Indicates the maximum pixel value. Indicates the pixel average value. This indicates the maximum value of the edge strength information. This represents the average value of the edge strength information;
[0119] After initialization, the attention is learned through convolution to obtain the actual attention. Then, the channel attention and spatial attention are weighted and summed according to the information content ratio of the channel and spatial aspects of the input feature map to obtain the final attention. The ratio of spatial attention to channel attention from bottom to top is 0.2:0.8, 0.4:0.6, 0.6:0.4, and 0.8:0.2, respectively, depending on the decoding block.
[0120] Step S34: Construct and train a trace segmentation network model that incorporates edge information.
[0121] Determine the network parameters and hyperparameters, and train a trace segmentation network model that incorporates edge information.
[0122] Calculate the loss function of the model :
[0123] ,
[0124] Among them Authentic labels For predicting labels, TP is the number of pixels that predict the trace as a trace, FN is the number of pixels that predict the trace as background, FP is the number of pixels that predict the background as a trace, and s is a custom coefficient to prevent division by zero. The network parameters are updated using the backpropagation algorithm and the Adam algorithm, and the training of the model stops after reaching the maximum number of iterations R.
[0125] The network parameters are updated using the backpropagation algorithm and the Adam algorithm, and the training of the model is stopped after reaching the maximum number of iterations R.
[0126] Step S34 is followed by:
[0127] Step S35: Validate the model's predictive performance using test set data; the test set includes rock surface images and rock structure traces, respectively:
[0128]
[0129] ,
[0130] The trained model was used to predict structural surface traces on rock surface images in the test set. The prediction results were then compared with the ground truth labels. By comparison, we can determine the predictive performance of the model.
[0131] Step S4, prediction of rock structure surface traces:
[0132] Step S41, Data Acquisition and Trajectory Prediction,
[0133] Image data of rock surfaces were collected at the engineering site, and the trained model was used to predict the traces of rock structural surfaces.
[0134]
[0135] ,
[0136] in, It is a dataset of rock surface images collected from the engineering site; The results are the traces of rock contact surfaces predicted by the model. and The elements in the database correspond one-to-one;
[0137] Step S42: Denoising the prediction results. The predicted rock structure surface trace results are denoising processed to remove trace noise points with small areas in the results.
[0138] In at least one embodiment, the flowchart is as follows: Figure 1 As shown, the following is a prediction of the rock structure surface traces:
[0139] Step (1): Collect 136 original rock surface images from the geological engineering site, adjust the images to the same size, and manually label the structural surface traces.
[0140] Step (2): Data augmentation is performed on the data collected in step (1), resulting in 816 images. 696 images are used for training, and 120 images are used for testing. The training and test sets are as follows:
[0141]
[0142]
[0143]
[0144]
[0145] in, and Together they constitute the training set; and Together they constitute the test set.
[0146] Step (3), as Figures 2-4 As shown, the input image is encoded as follows: After the image is input into the model, it first enters the encoding part, where it learns trace features through convolution and pooling, for a total of four encoding layers. Edge pooling is used between the encoding layers to reduce the image size and minimize the loss of edge information. At the same time, the encoding part uses an edge-pooling-based edge semantic enhancement structure to supplement the lost information.
[0147] The Scharr edge detection operator is used to process the input feature map to obtain the edge information intensity of the input feature map:
[0148] ,
[0149] ,
[0150] ,
[0151] in This represents the Scharr edge detection operator. Directional edge detection filter, This represents the Scharr edge detection operator. Directional edge detection filter, Indicates the input feature map, This represents the edge information intensity of the input feature map. Indicates that the input is The convolution kernel is The convolution operation.
[0152] The edge intensity information in the pooling window is normalized using softmax to obtain the edge intensity weights of each pixel in the pooling window. :
[0153]
[0154] The weighted sum of the pixels in the pooling window is used to obtain the pooling output:
[0155]
[0156] in The first pooled window represents the pooled window. 1 pixel express Corresponding edge information intensity weights; This indicates the output of the pooled window.
[0157] In the edge-pooling-based semantic enhancement structure, the input image of size 512*512 is first downsampled three times using edge pooling to obtain original edge information feature maps of sizes 256*256, 128*128, and 64*64, corresponding to the input sizes of the three coding layers. Since the original edge information feature map has 3 channels, while the input channels of the three coding layers are 64, 128, and 256 respectively, to prevent the information in the original edge information feature map from being overwhelmed, it is expanded by convolution before being concatenated and fused with the input feature maps of each subsequent coding layer.
[0158] Step (4), as Figures 5-6 As shown, the encoded feature map is decoded: the encoded feature map needs to enter the decoding part and be restored to its original size through convolution and upsampling. There are a total of four decoding layers. In each layer, a channel spatial attention gate based on edge information is added to improve the model's ability to learn and capture traces.
[0159] For the feature map input to the attention gate, the edge information intensity of the feature map is first calculated using the edge detection operator. Then, channel attention initialization and spatial attention initialization are performed using formula F. Channel attention initialization is performed in the channel dimension, and spatial attention initialization is performed in the size dimension.
[0160]
[0161] in Indicates the maximum pixel value. Indicates the pixel average value. This indicates the maximum value of the edge strength information. This represents the average value of the edge strength information;
[0162] After initialization, the attention is learned through convolution to obtain the actual attention. Then, the channel attention and spatial attention are weighted and summed according to the information content ratio of the channel and spatial aspects of the input feature map to obtain the final attention. The ratio of spatial attention to channel attention from bottom to top is 0.2:0.8, 0.4:0.6, 0.6:0.4, and 0.8:0.2, respectively, depending on the decoding block.
[0163] Step (5): Calculate the loss function of the model. :
[0164]
[0165] in For real labels, For predicting labels, TP is the number of pixels that predict the trace as a trace, FN is the number of pixels that predict the trace as background, FP is the number of pixels that predict the background as a trace, and s is a custom coefficient to prevent division by zero.
[0166] The network parameters are updated using the backpropagation algorithm and the Adam algorithm, reaching the maximum number of iterations. Then stop training the model.
[0167] Step (6): Validate the model's predictive performance using test set data. The test set data is as follows:
[0168]
[0169]
[0170] Input the rock surface images from the test set into the trained model to obtain the predicted rock structure surface traces:
[0171]
[0172] Using crossover and union ratio ( ), pixel accuracy ( Precision () Balanced F-score ( ) and other metrics are used as performance evaluation indicators:
[0173]
[0174]
[0175]
[0176]
[0177] Where TP is the number of samples that are predicted as positive; FN is the number of samples that are predicted as negative; and FP is the number of samples that are predicted as positive.
[0178]
[0179] Table 1. Predictive performance metrics of the five methods on the test set.
[0180] Prediction results are as follows Figure 7 As shown in Table 1, the performance evaluation metrics are as follows. It can be seen that the trace segmentation network based on fused edge information of this invention can predict rock structure surface traces more accurately than HRNet, PSPNet, Deeplabv3+, and U-Net, verifying the effectiveness of this invention.
[0181] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0182] 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 rock structure surface traces based on a trace segmentation network with edge information, characterized in that, Includes the following steps: Step S1, rock dataset collection and creation: Based on the specific engineering environment and requirements, take pictures of the rock environment that needs to be extracted for structural surface traces to obtain a rock surface image dataset X of the same size; ; n is the number of samples collected; For each image in dataset X, a rock structure surface trace label map is drawn to obtain the rock structure surface trace label dataset Y corresponding to dataset X; ; Where n is the number of samples collected, and the elements between X and Y correspond one-to-one; Step S2, preprocessing the sampled rock dataset: perform data augmentation on the acquired images, and simultaneously perform the same processing on corresponding elements in datasets X and Y from step S1 to ensure that the augmented images correspond one-to-one with the labels; at this point, a new rock surface image dataset is obtained. , Rock structure surface trace label dataset , Where m is the number of samples after data augmentation; The augmented dataset is randomly divided into training and test sets. ; ; ; ; in, and Together they form the training set. and Together they form the test set. This represents the number of samples in the training set. The number of samples in the training set; Step S3, model building and training, includes, Step S31: Build the UNet network as the basic network structure, and use edge pooling instead of max pooling between coding blocks in the encoder. In edge pooling, edge operators are used to obtain the edge intensity information of each pixel in the input feature map. Then, based on the edge intensity information, the softmax function is used to calculate the weight distribution. Finally, the pixel values of the pooling window are weighted and summed to obtain the pooling output. Step S32: Use an edge-pooling-based edge semantic enhancement structure in the encoder to enhance the original edge information; Edge pooling is used to downsample the input image in the first coding layer three times to obtain the original edge information feature map with the same size as the following three coding layers. The original edge information feature map is then expanded by convolution and concatenated with the input feature map of each coding block to enhance the original edge information in the encoder. Step S33: In each decoding block of the decoder, channel spatial attention gates based on edge information are used to enhance the model's ability to capture traces; Step S34: Construct and train a trace segmentation network model based on edge information; Step S4, rock structure surface trace prediction, including, Step S41, Data Acquisition and Trajectory Prediction, Image data of rock surfaces were collected at the engineering site, and the trained model was used to predict the traces of rock structural surfaces. ; ; in, It is a dataset of rock surface images collected from the engineering site; The results are the traces of rock contact surfaces predicted by the model. and The elements in the database correspond one-to-one; Step S42: Denoising the prediction results. The predicted rock structure surface trace results are denoising processed to remove trace noise points with small areas in the results.
2. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 1, characterized in that, The data enhancement processing performed on the acquired image in step S2 includes, but is not limited to, random rotation, flipping, cropping, brightness adjustment, and adding noise.
3. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 2, characterized in that, Step S31 specifically involves building a basic network structure based on the UNet network, including an encoder and a decoder. The encoder has a total of four coding blocks, which are connected using edge pooling.
4. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 2 or 3, characterized in that, Step S33 specifically involves the following steps: After encoding, the feature map needs to be entered into the decoder and restored to its original size through convolution and upsampling. There are a total of four decoding blocks. In each decoding block, a channel spatial attention gate based on edge information is added to improve the model's ability to learn and capture traces. In the channel spatial attention gate based on edge information, the edge information of the input feature map is first calculated. Then, the channel attention and spatial attention are initialized based on the edge information and pixel information of the feature map. After multiple layers of convolution operations, the final channel attention and spatial attention are formed. Then, the channel attention and spatial attention are weighted and merged according to the ratio of channel and spatial information of the input feature map to obtain the channel spatial attention based on edge information. Finally, multiplying the channel spatial attention based on edge information with the input feature map can enhance the model's ability to capture traces.
5. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to any one of claims 1-3, characterized in that, Step S34 specifically involves determining the network parameters and hyperparameters, and training a trace segmentation network model that integrates edge information. Calculate the loss function of the model : ; Among them Authentic labels For predicting labels, TP is the number of pixels that predict the trace as a trace, FN is the number of pixels that predict the trace as background, FP is the number of pixels that predict the background as a trace, and s is a custom coefficient to prevent division by zero. The network parameters are updated using the backpropagation algorithm and the Adam algorithm, and the training of the model stops after reaching the maximum number of iterations R.
6. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 3, characterized in that: The specific processing of step S31 is as follows: The Scharr edge detection operator is used to process the input feature map to obtain the edge information intensity of the input feature map: ; ; ; in This represents the Scharr edge detection operator. Directional edge detection filter, This represents the Scharr edge detection operator. Directional edge detection filter, Indicates the input feature map, This represents the edge information intensity of the input feature map. Indicates that the input is The convolution kernel is Convolution operations; The edge intensity information in the pooling window is normalized using softmax to obtain the edge intensity weights of each pixel in the pooling window. : ; The weighted sum of the pixels in the pooling window is used to obtain the pooling output: ; in The first pooled window represents the pooled window. 1 pixel express Corresponding edge information intensity weights; This indicates the output of the pooled window.
7. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 1, characterized in that: The specific processing of step S32 is as follows: Let the size of the input feature map be 512*512. First, the input image is downsampled three times consecutively based on edge pooling to obtain original edge information feature maps with sizes of 256*256, 128*128, and 64*64, respectively, which correspond to the input sizes of the three coding layers. Since the number of channels in the original edge information feature map is 3, while the number of input channels in the three coding layers are 64, 128, and 256, in order to prevent the information in the original edge information feature map from being overwhelmed, it is expanded by convolution before being concatenated and fused with the input feature maps of each lower coding layer. ; in Indicates input, O1 represents the input of the second coded block, and O1 represents the output of the first coded block. This indicates feature map splicing. This represents the convolution operation. This indicates edge pooling.
8. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 2 or 3, characterized in that: The specific processing of step S33 is as follows: For the feature map input to the attention gate, the edge information intensity of the feature map is first calculated using the edge detection operator. Then, channel attention initialization and spatial attention initialization are performed using formula F. Channel attention initialization is performed in the channel dimension, and spatial attention initialization is performed in the size dimension. ; in Indicates the maximum pixel value. Represents the average pixel value. This indicates the maximum value of the edge strength information. This represents the average value of the edge strength information; After initialization, the attention is learned through convolution to obtain the actual attention. Then, the channel attention and spatial attention are weighted and summed according to the information content ratio of the channel and spatial aspects of the input feature map to obtain the final attention. The ratio of spatial attention to channel attention from bottom to top is 0.2:0.8, 0.4:0.6, 0.6:0.4, and 0.8:0.2, respectively, depending on the decoding block.
9. The method for predicting rock structure surface traces based on trace segmentation networks with edge information according to claim 5, characterized in that: The process after step S34 also includes: Step S35: Validate the model's predictive performance using test set data; the test set includes rock surface images and rock structure traces, respectively: ; ; The trained model is used to predict structural surface traces on rock surface images in the test set. The prediction results are compared with the true labels to determine the model's prediction performance.