A borehole image rock mass structure identification method
Patent Information
- Application Number
- CN202411286021.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2044-09-13
AI Technical Summary
这种方式工作量大,效率低;同时过于依赖技术人员经验,准确性和可靠性差
[0039]By introducing adaptive learning into the object detection task, an efficient model training and update strategy is achieved while improving detection accuracy and robustness.
Smart Images

Figure CN119091228B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geological exploration technology, and in particular to a method for identifying rock mass structure from borehole images. Background Technology
[0002] my country has a vast territory and a highly complex and diverse geological structure. With the continuous development of economic construction and the advancement of engineering technology, a detailed understanding of the geological structure of underground rock masses has become an irreplaceable task in various construction, geotechnical, geological, and water conservancy projects. It is of great significance for the rational selection of engineering methods and the safety of engineering projects.
[0003] Borehole imaging technology is a technique that utilizes optical principles and related equipment to acquire images of the borehole wall. By using borehole imaging technology to obtain borehole images, accurate and rapid information about the rock mass structure within the borehole can be obtained. However, current methods for interpreting the structural surfaces of borehole images mainly rely on manual identification, which presents the following problems.
[0004] (1) Currently, the method for analyzing borehole images and obtaining in-situ geological structure information generally involves technicians subjectively identifying the structure in the borehole images, manually reading the characteristic points of the structure, and then using a computer program to fit it into a standard curve. The geometric parameters of the structure are then calibrated using the parameters of the curve. This method is labor-intensive and inefficient; at the same time, it relies too much on the experience of technicians, resulting in poor accuracy and reliability.
[0005] (2) Traditional image detection methods based on filtering detection, edge extraction, and template matching have poor performance in the detection of rock mass structures in borehole images, with low detection accuracy and high false alarm rate. Due to the large differences between different borehole images, traditional image detection methods require manual definition of many hyperparameters. The hyperparameters vary greatly between boreholes, and the parameters need to be manually determined before detection. This method is difficult to improve detection efficiency and accuracy.
[0006] (3) In recent years, a series of structural surface detection methods based on neural networks have also emerged. Because geological conditions in the same region are similar, the rock mass structures reflected in borehole images obtained from engineering surveys also exhibit similar characteristics in terms of lithology, failure modes, and occurrence. This characteristic helps improve the accuracy and precision of rock mass structure identification. Current borehole image rock mass structure identification methods do not take this feature into account. Summary of the Invention
[0007] In view of this, the present invention proposes a method for identifying rock mass structures in borehole images. Based on deep learning, the method performs target detection on structural surfaces in borehole images and adopts an adaptive learning approach to make full use of the similar features of rock mass structural surfaces in the same area to improve the accuracy of target detection.
[0008] The technical solution of this invention is implemented as follows:
[0009] This invention provides a method for identifying rock mass structure in borehole images, comprising the following steps:
[0010] S1 constructs an object detection network model, including a backbone network, regional networks, adaptive networks, and a classification network;
[0011] S2 collects borehole image datasets, labels the target bounding boxes and categories of rock mass structures, and creates a sample set;
[0012] S3 initializes the target detection network model;
[0013] S4 freezes the adaptive network, uses the sample set to initially train the target detection network model, and iteratively updates the backbone network, region network and classification network according to the loss function until the model converges, thus obtaining the initially trained target detection network model.
[0014] S5 acquires a set of borehole images and uses the initially trained target detection network model to perform recognition tasks on the borehole images. After completing a preset number of tasks, the adaptive network is unfrozen, and the entire model is iteratively trained using the borehole images until the model converges, resulting in the final target detection network model.
[0015] Based on the above technical solution, preferably, the borehole image task set and the sample set are image data from the same region and the same batch.
[0016] Based on the above technical solution, preferably, the backbone network adopts the ResNet-50 network with the last fully connected layer and softmax layer removed, the region network includes convolutional layers, anchor box generators, bounding box regression layers, target scoring layers and ROI pooling layers, the adaptive network includes hidden layer A and hidden layer B, and the classification network includes fully connected layers, classification layers and bounding box regression layers.
[0017] Based on the above technical solution, preferably, in the adaptive network, the weight matrices and bias vectors of hidden layer A and hidden layer B are represented as follows:
[0018]
[0019]
[0020] In the formula, W A Let b be the weight matrix of hidden layer A. A Let W be the bias vector of hidden layer A. B Let b be the weight matrix of hidden layer B. B Let d be the bias vector of hidden layer B, R denotes the real number field, and dinput d represents the dimension of the input feature vector. A d represents the number of neurons in hidden layer A. B This indicates the number of neurons in hidden layer B.
[0021] Based on the above technical solution, preferably, when initializing the target detection network model, the weight matrix W of the hidden layer A is... A The weight matrix W of hidden layer B B All are initialized to a matrix of all 1s.
[0022] Based on the above technical solution, preferably, in each training iteration, the target detection network model uses forward propagation to calculate the output of each layer to obtain the prediction result. Based on the forward propagation, the gradient of the loss function with respect to the network parameters is calculated, and backpropagation is performed to update the weight matrix and bias vector of each layer. Through continuous iteration of forward and backpropagation, the model is determined to have converged until the value of the loss function reaches the minimum.
[0023] Based on the above technical solution, preferably, during forward propagation, the outputs of hidden layer A and hidden layer B are:
[0024] a = h A (W A ·x)
[0025] b = h B (W B ·a)
[0026] h A (z) = max(0,z)
[0027] h B (z) = sigmoid(z)
[0028] In the formula, a represents the output of hidden layer A, b represents the output of hidden layer B, and W A Let W be the weight matrix of hidden layer A. B Let h be the weight matrix of hidden layer B. A Let h represent the activation function of hidden layer A. B Let x represent the activation function of hidden layer B, x represent the input feature vector, and z represent the input value of the activation function.
[0029] Based on the above technical solution, preferably, in each training iteration, the gradient calculation method for the loss function with respect to hidden layer A and hidden layer B is as follows:
[0030]
[0031] In the formula, W represents the weight matrix W of the loss function L with respect to the hidden layer A.A The partial derivatives, W represents the weight matrix W of the loss function L with respect to the hidden layer B. B The partial derivatives, The bias vector b represents the bias of the loss function L with respect to the hidden layer A. A The partial derivatives, The vector b represents the bias of the loss function L with respect to the hidden layer B. B The partial derivatives, This represents the partial derivative of the loss function L with respect to the output a of the hidden layer A. W represents the weight matrix W of hidden layer A with respect to the output a of hidden layer A. A The partial derivatives, This represents the partial derivative of the loss function L with respect to the output b of the hidden layer B. The weight matrix W of hidden layer B represents the output b of hidden layer B. B The partial derivatives, This represents the bias vector b of the output a of hidden layer A with respect to hidden layer A. A The partial derivatives, This represents the bias vector b of the output b of hidden layer B with respect to hidden layer B. B The partial derivatives of, where, and Calculated via backpropagation and It is the derivative of the activation function, and its value depends on the inputs of hidden layer A and hidden layer B.
[0032] Based on the above technical solution, the preferred update formulas for hidden layer A and hidden layer B are as follows:
[0033]
[0034] In the formula, α represents the learning rate.
[0035] Based on the above technical solution, the preferred formula for calculating the loss function is:
[0036]
[0037] In the formula, L represents the loss function, N is the batch size of the data, C is the number of classes, and y i,j For the true result, when the i-th data belongs to the j-th class, y i,j =1, otherwise, y i,j =0, The prediction result is the probability that the model predicts the i-th data point belongs to the j-th class.
[0038] The system of the present invention has the following advantages over the prior art:
[0039] By introducing adaptive learning into the object detection task, an efficient model training and update strategy is achieved while improving detection accuracy and robustness.
[0040] By adding two fully connected hidden layers and designing an adaptive learning strategy for them, the similarity features of rock mass structural surfaces in the same area are fully utilized, significantly improving the accuracy and robustness of target detection.
[0041] Using an adaptive learning strategy, the model parameters can be adjusted according to new data, so that the model maintains high recognition performance in different batch tasks and has strong adaptability.
[0042] Freezing the initial stage of the hidden layer can stabilize the training of other layers, which not only speeds up the model convergence speed, but also avoids the overfitting problem when there is insufficient data. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a flowchart of the method of the present invention;
[0045] Figure 2 This is a model architecture diagram of the present invention;
[0046] Figure 3 This is a training diagram of the model for this invention. Detailed Implementation
[0047] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0048] Please see Figure 1 The borehole image rock mass structure recognition method provided by the present invention includes the following steps:
[0049] S1 constructs an object detection network model, including a backbone network, regional networks, adaptive networks, and a classification network;
[0050] S2 collects borehole image datasets, labels the target bounding boxes and categories of rock mass structures, and creates a sample set;
[0051] S3 initializes the target detection network model;
[0052] S4 freezes the adaptive network, uses the sample set to initially train the target detection network model, and iteratively updates the backbone network, region network and classification network according to the loss function until the model converges, thus obtaining the initially trained target detection network model.
[0053] S5 acquires a set of borehole images and uses the initially trained target detection network model to perform recognition tasks on the borehole images. After completing a preset number of tasks, the adaptive network is unfrozen, and the entire model is iteratively trained using the borehole images until the model converges, resulting in the final target detection network model.
[0054] like Figure 2 As shown, the technical implementation process of this invention is as follows: A target detection network model is designed, including a backbone network, a region network, an adaptive network, and a classification network. The backbone network uses a ResNet-50 network with the last fully connected layer and softmax layer removed. The region network includes convolutional layers, anchor box generators, bounding box regression layers, target scoring layers, and ROI pooling layers. The adaptive network includes hidden layers A and B. The classification network includes fully connected layers, classification layers, and bounding box regression layers. First, an image of arbitrary size is input into the backbone feature extraction network to obtain a feature map. The original image is searched to obtain region proposals, and each corresponding feature box is found in the feature map. In the ROI pooling layer, each feature box is pooled to a uniform size. Then, the data sequentially passes through two fully connected hidden layers A and B. These are additional hidden layers added in the proposed scheme to utilize the similarity of target features in the same region's structural surface for adaptive learning of the network. Finally, the data undergoes softmax classification and bounding box regression to obtain target classification and target boxes.
[0055] Specifically, such as Figure 3 As shown, in one embodiment of the present invention, the training strategy of the model is as follows:
[0056] Create a dataset of rock mass structure surfaces from borehole images. Rock mass structure surfaces are manually labeled on a certain number of borehole images; these are the recognition targets. Training is then conducted on this dataset.
[0057] First, freeze hidden layers A and B, keeping their weights unchanged at their initial values. Then, use batch gradient descent to update the weights of other layers in the network and train the network until the model converges.
[0058] This model is used to perform borehole image recognition tasks from the same region and batch. After a certain number of tasks are completed, hidden layers A and B are unfrozen, and their weights are updated using the data from that batch of tasks. This method enables adaptive learning of the model.
[0059] Because geological conditions in the same region are similar, the rock mass structures reflected in the borehole images obtained from engineering surveys also exhibit similar characteristics in terms of lithology, failure modes, and occurrence. Therefore, the borehole image task set and sample set collected in this invention are image data from the same region and batch.
[0060] Let's take a specific example as an illustration:
[0061] 1. Collect borehole image datasets, label the target bounding boxes and categories of rock mass structures, and create a sample set.
[0062] 2. Initialize the object detection network model, and set the weight matrix W of hidden layer A. A The weight matrix W of hidden layer B B All are initialized to matrices of all 1s. To simplify the model and avoid learning the same features across layers, the bias vectors of hidden layer A and hidden layer B can be initialized to vectors of all 0s to help the network update parameters more smoothly at the beginning of training.
[0063] 3. Initially train the object detection network model using the sample set. At this time, freeze hidden layers A and B (i.e., do not update their weights and biases), and train the remaining layers normally. Freezing hidden layers A and B can prevent the model from overfitting the data during the initial training phase.
[0064] In each training iteration, forward propagation is used to calculate the output of each layer to obtain the prediction result. Based on the forward propagation, the gradient of the loss function with respect to the network parameters is calculated, and backpropagation is performed to update the weight matrix and bias vector of each layer. Through continuous iteration of forward and backpropagation, the loss function value is minimized, and the model is considered to have converged.
[0065] During forward propagation, the input image is passed through a feature extraction network to obtain a feature map. Region Proposals (RoIs) are searched, and their corresponding bounding boxes are found on the feature map. ROI pooling is then performed to pool the bounding boxes to a uniform size. The feature data is passed through two fully connected hidden layers A and B. During this process, the weights and biases are not updated; this is to ensure that the model learns some basic features first, unaffected by the influence of hidden layers A and B.
[0066] The weight matrices and bias vectors of hidden layer A and hidden layer B are represented as follows:
[0067]
[0068]
[0069] In the formula, W A Let b be the weight matrix of hidden layer A. A Let W be the bias vector of hidden layer A. B Let b be the weight matrix of hidden layer B. B Let d be the bias vector of hidden layer B, R denotes the real number field, and d input d represents the dimension of the input feature vector. A d represents the number of neurons in hidden layer A. B This indicates the number of neurons in hidden layer B.
[0070] The outputs of hidden layer A and hidden layer B are:
[0071] a = h A (W A ·x)
[0072] b = h B (W B ·a)
[0073] h A (z) = max(0,z)
[0074] h B (z) = sigmoid(z)
[0075] In the formula, a represents the output of hidden layer A, b represents the output of hidden layer B, and W A Let W be the weight matrix of hidden layer A. B Let h be the weight matrix of hidden layer B. A Let h represent the activation function of hidden layer A. B Let x represent the activation function of hidden layer B, x represent the input feature vector, and z represent the input value of the activation function.
[0076] Then, classification and bounding box (bbox) regression were performed.
[0077] The loss is calculated using the following loss function:
[0078]
[0079] In the formula, L represents the loss function, N is the batch size of the data, C is the number of classes, and y i,j For the true result, when the i-th data belongs to the j-th class, y i,j =1, otherwise, y i,j =0, The prediction result is the probability that the model predicts the i-th data point belongs to the j-th class.
[0080] Calculate the partial derivatives of the loss function L with respect to all non-frozen layer parameters (backbone network, region networks, and classification network), and perform backpropagation. Update the weights and biases of all non-frozen layers using gradient descent. Continue until the model converges on the sample set.
[0081] 4. Obtain the borehole image task set. In one embodiment, the borehole image task set is labeled, so supervised learning is used to further train the model. Labeled data can directly tell the model what the correct output is, thus enabling more accurate parameter updates. In another embodiment, the borehole image task set is unlabeled. In this case, unsupervised or semi-supervised learning strategies are used. Unsupervised learning: The initially trained model is used to predict on the unlabeled data, generating pseudo-labels. These pseudo-labels are then used as temporary labels for continued supervised training. Semi-supervised learning: Similar to the pseudo-label method, the model makes inferences on unlabeled data and then uses the high-confidence prediction results as new training data. This method gradually improves model performance through iteration.
[0082] 5. Set task quantity intervals, such as checking whether adaptive learning and retraining are needed after completing a batch or a certain number of recognition tasks.
[0083] By periodically assessing task phases, the model can adaptively update itself. After completing a certain number of tasks, new batches of data expose the model to more new features, unfreezing it and retraining hidden layers A and B. This allows the weights and biases to be actively adjusted, better fitting the new task requirements. By switching training strategies in stages, the model can be continuously optimized, gradually improving its performance and accuracy on specific tasks. Retraining the hidden layers after each phase allows them to absorb and adapt to the features contained in the new data, preventing the model from becoming overly reliant on the initial weight settings.
[0084] 6. Adaptive Learning Phase. Unfreeze the hidden layers A and B, allowing their weights and biases to be updated. Train the entire model using a borehole image task set.
[0085] Specifically, during training, the forward propagation process is as follows: the input image generates a feature map through a feature extraction network, passes through a ROI pooling layer, then through two fully connected hidden layers A and B, and finally through the classification and regression layers, where the loss is calculated. The weight matrices and bias vectors of hidden layers A and B are represented as follows:
[0086]
[0087] In the formula, W A Let b be the weight matrix of hidden layer A. A Let W be the bias vector of hidden layer A. B Let b be the weight matrix of hidden layer B. BLet d be the bias vector of hidden layer B, R denotes the real number field, and d input d represents the dimension of the input feature vector. A d represents the number of neurons in hidden layer A. B This indicates the number of neurons in hidden layer B.
[0088] The outputs of hidden layer A and hidden layer B are:
[0089] a = h A (W A ·x)
[0090] b = h B (W B ·a)
[0091] h A (z) = max(0,z)
[0092] h B (z) = sigmoid(z)
[0093] In the formula, a represents the output of hidden layer A, b represents the output of hidden layer B, and W A Let W be the weight matrix of hidden layer A. B Let h be the weight matrix of hidden layer B. A Let h represent the activation function of hidden layer A. B Let x represent the activation function of hidden layer B, x represent the input feature vector, and z represent the input value of the activation function.
[0094] Then, classification and bounding box (bbox) regression were performed.
[0095] The loss is calculated using the following loss function:
[0096]
[0097] In the formula, L represents the loss function, N is the batch size of the data, C is the number of classes, and y i,j For the true result, when the i-th data belongs to the j-th class, y i,j =1, otherwise, y i,j =0, The prediction result is the probability that the model predicts the i-th data point belongs to the j-th class.
[0098] Calculate the partial derivatives of the loss function with respect to the weights and biases of all layers (including hidden layers A and B), and update the parameters through backpropagation.
[0099] The gradients of the loss function for hidden layer A and hidden layer B are calculated as follows:
[0100]
[0101]
[0102] In the formula, W represents the weight matrix W of the loss function L with respect to the hidden layer A. A The partial derivatives, W represents the weight matrix W of the loss function L with respect to the hidden layer B. B The partial derivatives, The bias vector b represents the bias of the loss function L with respect to the hidden layer A. A The partial derivatives, The vector b represents the bias of the loss function L with respect to the hidden layer B. B The partial derivatives, This represents the partial derivative of the loss function L with respect to the output a of the hidden layer A. W represents the weight matrix W of hidden layer A with respect to the output a of hidden layer A. A The partial derivatives, This represents the partial derivative of the loss function L with respect to the output b of the hidden layer B. The weight matrix W of hidden layer B represents the output b of hidden layer B. B The partial derivatives, This represents the bias vector b of the output a of hidden layer A with respect to hidden layer A. A The partial derivatives, This represents the bias vector b of the output b of hidden layer B with respect to hidden layer B. B The partial derivatives of, where, and Calculated via backpropagation and It is the derivative of the activation function, and its value depends on the inputs of hidden layer A and hidden layer B.
[0103] The update formulas for hidden layer A and hidden layer B are:
[0104]
[0105] In the formula, α represents the learning rate.
[0106] Repeat the above steps for iterative training until the model converges.
[0107] This invention employs a phased training approach. During initial training, the weights of hidden layers A and B are frozen. The goal is to allow other layers to be fully trained until the model converges, improving the stability and accuracy of the initial training. After performing a certain number of tasks, when using the model on the same region, the weights of hidden layers A and B are unfrozen, and these layers are updated using the batch of data. This operation allows the model to fine-tune for new data, further improving detection accuracy through adaptive learning.
[0108] 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.
Claims
1. A method for identifying rock mass structure from borehole images, characterized in that, Includes the following steps: S1 Constructs an object detection network model, including a backbone network, regional networks, adaptive networks, and classification networks; S2 collects borehole image datasets, labels the target bounding boxes and categories of rock mass structures, and creates a sample set; S3 Initialize the object detection network model; S4 Freeze the adaptive network, use the sample set to initially train the target detection network model, and iteratively update the backbone network, region network and classification network according to the loss function until the model converges, and obtain the initially trained target detection network model. S5 acquires the borehole image task set, uses the initially trained target detection network model to perform recognition tasks on the borehole image task set, and after completing the preset number of tasks, unfreezes the adaptive network and uses the borehole image task set to iteratively train the entire model until the model converges, thus obtaining the final target detection network model. In the adaptive network, the weight matrices and bias vectors of hidden layer A and hidden layer B are represented as follows: In the formula, WA is the weight matrix of hidden layer A, bA is the bias vector of hidden layer A, WB is the weight matrix of hidden layer B, bB is the bias vector of hidden layer B, R represents the real number field, dinput represents the dimension of the input feature vector, dA represents the number of neurons in hidden layer A, and dB represents the number of neurons in hidden layer B. In each training iteration, the target detection network model uses forward propagation to calculate the output of each layer to obtain the prediction result. Based on the forward propagation, it calculates the gradient of the loss function with respect to the network parameters and performs backpropagation to update the weight matrix and bias vector of each layer. Through continuous iteration of forward and backpropagation, the model is determined to have converged when the value of the loss function reaches its minimum.
2. The borehole image rock mass structure recognition method as described in claim 1, characterized in that, The borehole image task set and sample set are image data from the same region and batch.
3. The borehole image rock mass structure recognition method as described in claim 1, characterized in that, The backbone network uses a ResNet-50 network with the last fully connected layer and softmax layer removed. The region network includes convolutional layers, anchor box generators, bounding box regression layers, target scoring layers, and ROI pooling layers. The adaptive network includes hidden layers A and B. The classification network includes fully connected layers, classification layers, and bounding box regression layers.
4. The borehole image rock mass structure identification method as described in claim 1, characterized in that, When initializing the object detection network model, the weight matrix of hidden layer A is... and the weight matrix of hidden layer B All are initialized to a matrix of all 1s.
5. The borehole image rock mass structure identification method as described in claim 1, characterized in that, During forward propagation, the outputs of hidden layer A and hidden layer B are: In the formula, a represents the output of hidden layer A, and b represents the output of hidden layer B. Let A be the weight matrix of hidden layer A. Here is the weight matrix of hidden layer B. This represents the activation function of hidden layer A. This represents the activation function of hidden layer B. Let z represent the input feature vector, and z represent the input value of the activation function.
6. The borehole image rock mass structure recognition method as described in claim 5, characterized in that, In each training iteration, the gradients of the loss function with respect to hidden layer A and hidden layer B are calculated as follows: In the formula, The weight matrix of loss function L with respect to hidden layer A The partial derivatives, The weight matrix of loss function L with respect to hidden layer B The partial derivatives, This represents the bias vector of the loss function L with respect to the hidden layer A. The partial derivatives, This represents the bias vector of the loss function L with respect to the hidden layer B. The partial derivatives, This represents the partial derivative of the loss function L with respect to the output a of the hidden layer A. This represents the weight matrix of the output 'a' of hidden layer A with respect to hidden layer A. The partial derivatives, This represents the partial derivative of the loss function L with respect to the output b of the hidden layer B. This represents the weight matrix of the output b of hidden layer B with respect to hidden layer B. The partial derivatives, This represents the bias vector of the output 'a' of hidden layer A with respect to hidden layer A. The partial derivatives, This represents the bias vector of the output b of hidden layer B with respect to hidden layer B. The partial derivatives of, where, and Calculated via backpropagation , , and It is the derivative of the activation function, and its value depends on the inputs of hidden layer A and hidden layer B.
7. The borehole image rock mass structure recognition method as described in claim 6, characterized in that, The update formulas for hidden layer A and hidden layer B are: In the formula, This represents the learning rate.
8. The borehole image rock mass structure recognition method as described in claim 6, characterized in that, The formula for calculating the loss function is: In the formula, L represents the loss function, N is the batch size of the data, and C is the number of classes. For the true result, when the i-th data belongs to the j-th class, ,otherwise, , The prediction result is the probability that the model predicts the i-th data point belongs to the j-th class.
Citation Information
Patent Citations
Deep learning and transfer learning-based rock stratum structure intelligent detection and classification method
CN112836075A
Target detection method for remote sensing image noise labeling based on adaptive weight
CN116343050A