Drill hole image rock mass structure identification method based on transfer learning
Through multi-stage transfer learning training model, the data set production difficulty and model convergence problems in rock structure detection of drilling image are solved, the detection accuracy and robustness are improved, and efficient recognition of the structural surface features of drilling image is achieved.
Patent Information
- Application Number
- CN202411286027.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-06
AI Technical Summary
The existing drilling image rock structure detection method relies on low manual interpretation efficiency and poor accuracy, and the traditional image detection method has low detection accuracy and high false alarm rate. The neural network-based method has a difficult and small data volume, so the model is Difficult to restrain.
Using a transfer learning-based method, through multi-stage training and fine-tuning of the object detection model, gradually transition from conventional fracture features to sinusoidal curve features, and finally adapt to the structural surface features of the drilling image, and use the source domain, intermediate domain and target domain data set for migration. Learn to improve the detection accuracy and robustness of the model.
Through multi-stage training and fine-tuning, the model can have feature recognition capabilities on smaller data sets, reduce training time and resource consumption, improve detection accuracy and robustness, and avoid the problem of overfitting or difficulty converging of the model.
Smart Images

Figure CN119091229A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geological exploration technology, and in particular to a method for identifying rock mass structure in borehole images based on transfer learning. Background Art
[0002] my country has a vast territory and its geological structure is very complex and diverse. With the continuous development of economic construction and the continuous advancement of engineering technology, detailed understanding of the geological structure of underground rock mass has become an irreplaceable task in various types of construction, geotechnical, geological, water conservancy and other projects, which is of great significance for the rational selection of engineering methods and the safety of engineering.
[0003] Borehole imaging technology is a technical method that uses optical principles and related equipment to obtain borehole wall images in the borehole. Using borehole imaging technology to obtain borehole images can accurately and quickly obtain rock structure information in the borehole. However, the current method of interpreting the structural surface of borehole images mainly relies on manual recognition, which has the following problems.
[0004] (1) At present, the method of analyzing borehole images and obtaining in-situ geological body structural surface information is generally that technicians subjectively identify the structural surface in the borehole image, manually read the structural surface feature point information, and use a computer program to fit it into a standard curve, and calibrate the geometric parameters of the structural surface through the parameters of the curve. This method has a large workload and low efficiency; at the same time, it relies too much on the experience of technicians and has poor accuracy and reliability.
[0005] (2) Traditional image detection methods such as filter detection, edge extraction, and template matching have poor application effects in rock structure detection of borehole images, 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. Due to the particularity of borehole images, the existing borehole image data is small, the borehole images are highly ambiguous, and the data set preparation is difficult; and the structural surface in the borehole image has the characteristics of a sine curve, and other data sets are difficult to use directly. Therefore, these structural surface detection methods based on neural networks have the disadvantages of difficult data set preparation, low data set annotation accuracy, small data set volume, and difficult network convergence. Summary of the invention
[0007] In view of this, the present invention proposes a method for rock mass structure recognition based on transfer learning in borehole images, which uses the transfer learning method to perform progressive hierarchical training on the target detection model to achieve target detection on the structural surface on the borehole image, solving the technical problems that the structural surface detection algorithm based on the neural network requires a large data set, the borehole image structural surface data set is difficult to produce, the data volume is small, and the model convergence is difficult.
[0008] The technical solution of the present invention is achieved in this way:
[0009] The present invention provides a method for identifying rock mass structure in borehole images based on transfer learning, comprising the following steps:
[0010] S1: Build a target detection model, including the backbone network, regional network and classification network;
[0011] S2: Obtain a first data set, and use the first data set to perform a first iterative training on the target detection model until the model converges, thereby obtaining a preliminarily trained target detection model, and retaining a weight parameter of the model as a first weight parameter;
[0012] S3: Obtain a second data set, use the first weight parameter as the initial parameter for the second training, use the second data set to perform a second iterative training on the model until the model converges, obtain a second-trained target detection model, and save the weight parameter at this time as the second weight parameter;
[0013] S4: obtaining a third data set, using the second weight parameter as the initial parameter for the third training, and performing a third iterative training on the model using the third data set until the model converges, thereby obtaining a final target detection model;
[0014] S5: Acquire the borehole image, use the final target detection model to identify the borehole image, and obtain the rock structure recognition result.
[0015] On the basis of the above technical solution, preferably, the first data set is a general data set in the source domain, the second data set is a related data set in the intermediate domain, and the third data set is a task data set in the target domain.
[0016] On the basis of the above technical solution, preferably, the backbone network includes a first convolutional layer, a pooling layer, a first residual block, a second residual block, a third residual block and a fourth residual block, which are used to extract a feature map of the input data;
[0017] The regional network includes a second input layer, an RPN layer and a region generation layer, which is used to generate candidate regions;
[0018] The classification network includes ROI pooling layer, fully connected layer and task layer. The task layer is divided into classification layer and boundary regression layer. The classification network is used for target detection, target positioning and classification.
[0019] Based on the above technical solution, preferably, step S2 includes:
[0020] Collecting image data containing conventional cracks, where the conventional cracks include ground cracks, rock cracks, and concrete cracks, annotating the image data, annotating the locations and categories of the conventional cracks, and obtaining a first data set;
[0021] Load the pre-trained target detection model, use the weight parameters of the pre-trained target detection model as the initial weight parameters, input the first data set into the pre-trained target detection model, and perform the first iterative training. During training, freeze the weight parameters of the first convolutional layer, the first residual block, the second residual block, and the third residual block, train the fourth residual block, the regional network, and the classification network until the loss function remains unchanged, then output the initially trained target detection model, and retain the weight parameters of the model as the first weight parameters.
[0022] Based on the above technical solution, preferably, step S3 includes:
[0023] Using a computer program to generate an artificially synthesized image data set including one or more sinusoidal curves of different widths, annotating the artificially synthesized image data set, annotating the positions of the sinusoidal curves, and obtaining a second data set;
[0024] Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for a second iterative training. During training, the weight parameters of the first convolutional layer and the first residual block are frozen, and the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged. Then, the second trained target detection model is output, and the weight parameters of the model are retained as the second weight parameters.
[0025] On the basis of the above technical solution, preferably, step S4 includes:
[0026] Collecting borehole image data containing borehole image cracks, marking the borehole image data, marking the locations and categories of the cracks, and obtaining a third data set;
[0027] Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for the second iterative training. During training, the weight parameter of the first convolutional layer is frozen, and the first residual block, the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged, and the final target detection model is output.
[0028] On the basis of the above technical solution, preferably, in three trainings, the learning rate of the first training>the learning rate of the second training>the learning rate of the third training.
[0029] Based on the above technical solution, preferably, the loss function is as follows:
[0030] L i =L1+λ i L2
[0031] Where L1 is the classification loss, L2 is the regression loss, i=1,2,3,L i represents the loss function used in the i-th training, λ i represents the weight coefficient in the i-th training, λ1>λ2 and λ2<λ3.
[0032] Based on the above technical solution, preferably, the number of the first data set>the number of the second data set>the number of the third data set.
[0033] Based on the above technical solution, preferably, in step S5, the final target detection model processes the drilling image as follows:
[0034] Input the drilling image to the backbone network, process it in sequence through the first convolutional layer, the first residual block, the second residual block, the third residual block, and the fourth residual block to extract low-level to high-level features and output a high-dimensional feature map;
[0035] The drilling image is input into the regional network at the same time, an m*m sliding window is set on the drilling image, a series of initial candidate regions are generated, multiple anchor frames are generated at each initial candidate region position, each anchor frame is identified to determine whether it contains foreground or background, and bounding box regression is performed on the anchor frame containing the foreground, the position and size of the anchor frame are adjusted, and the candidate region with the anchor frame is output;
[0036] The high-dimensional feature map and the candidate region with the anchor box are input into the classification network, and each candidate region is mapped to the feature map using the ROI pooling layer, and the candidate region is converted into a feature vector of a preset size. The feature vector of the preset size is processed into a high-dimensional feature vector based on the fully connected layer, and the high-dimensional feature vector is processed using the task layer. The category of the candidate region is obtained according to the classification layer, and the bounding box of the candidate region is obtained according to the boundary regression layer. The target detection result is output, including the classification result and the target box.
[0037] The system of the present invention has the following beneficial effects compared with the prior art:
[0038] The first training of the present invention is a comprehensive training starting from the pre-trained model, focusing on allowing the model to learn the characteristics of various conventional cracks. The second training is based on the first training, and the model obtained is fine-tuned, mainly to increase the model's adaptability to sinusoidal curve characteristics. The third training is based on the model obtained from the second training. Further fine-tuning, focusing on adapting the model to the structural surface characteristics in a specific borehole image, through this gradual training and fine-tuning, the model can gradually transition from learning conventional crack characteristics to learning sinusoidal curve characteristics, and finally adapt to the specific borehole image structural surface characteristics;
[0039] Through multi-stage training, the model of the present invention can have a certain feature recognition ability in the initial stage, reducing the training time and resource consumption on the new data set. By gradually introducing new data sets and features, the model can better adapt to different types of data and tasks, and improve the detection accuracy and robustness on specific tasks. On a borehole image data set with a small amount of data, direct training may cause the model to overfit or be difficult to converge. Through transfer learning, the model can make full use of previously learned knowledge on a smaller data set to improve the training effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 is a flow chart of the method of the present invention;
[0042] Figure 2 is a network structure diagram of the present invention;
[0043] Figure 3 Schematic diagram of the migration process of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] See also Figure 1 The present invention provides a method for identifying rock mass structure in borehole images based on transfer learning, comprising the following steps:
[0046] S1: Build a target detection model, including the backbone network, regional network and classification network;
[0047] S2: Obtain a first data set, and use the first data set to perform a first iterative training on the target detection model until the model converges, thereby obtaining a preliminarily trained target detection model, and retaining a weight parameter of the model as a first weight parameter;
[0048] S3: Obtain a second data set, use the first weight parameter as the initial parameter for the second training, use the second data set to perform a second iterative training on the model until the model converges, obtain a second-trained target detection model, and save the weight parameter at this time as the second weight parameter;
[0049] S4: obtaining a third data set, using the second weight parameter as the initial parameter for the third training, and performing a third iterative training on the model using the third data set until the model converges, thereby obtaining a final target detection model;
[0050] S5: Acquire the borehole image, use the final target detection model to identify the borehole image, and obtain the rock structure recognition result.
[0051] In one embodiment of the present invention, the backbone network includes a first convolutional layer, a pooling layer, a first residual block, a second residual block, a third residual block and a fourth residual block, which are used to extract a feature map of input data;
[0052] The regional network includes a second input layer, an RPN layer and a region generation layer, which is used to generate candidate regions;
[0053] The classification network includes ROI pooling layer, fully connected layer and task layer. The task layer is divided into classification layer and boundary regression layer. The classification network is used for target detection, target positioning and classification.
[0054] like Figure 2 As shown in the figure, the present invention designs a target detection model. First, a picture of any size is input into the backbone feature extraction network to obtain a feature map. The original picture is searched to obtain the region proposal box, 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, and a fixed-size feature vector is obtained through the fully connected layer. Softmax classification and bbox regression are performed respectively to obtain the target classification and target box.
[0055] Specifically, Figure 3As shown, the present invention adopts the idea of transfer learning, and adopts a multi-stage training strategy from conventional crack data sets to sinusoidal data sets and then to actual borehole image data sets, which helps to solve the problem of network convergence difficulties and improve the detection accuracy of the model. After each stage of training, the network weights are retained and training is continued in the next stage. This method helps to gradually accumulate and optimize the feature recognition ability of the model.
[0056] Specifically, the first data set is the source domain general data set, which refers to the conventional crack detection data set. Using this data set to train the model is actually to let the model learn the general crack features in the source domain. After the training is completed and the model converges at this stage, the network weights at this time are retained. These weights contain a lot of information about crack features and represent the model's knowledge of conventional crack detection. The second data set is the intermediate domain related data set, which refers to the artificially generated sinusoidal image data set. On the basis of retaining the training weights of the conventional crack data set, the model is further trained using an artificial data set containing sinusoidal features. At this time, the network can not only inherit the previously learned crack features, but also learn the sinusoidal features through the new data set. After the training is completed and the model converges again at this stage, the network weights at this time are retained. This weight combines two parts of knowledge: conventional crack features and sinusoidal features. The third data set is the target domain task data set, which refers to the annotated borehole image data set. Based on the weights obtained in the first two stages, a specially annotated borehole image data set is used for fine-tuning. The training in this stage is mainly to allow the model to further adapt to the particularities of borehole images (such as structural surface features) based on the features learned in the first two stages, and to improve the detection accuracy in practical applications. After the training is completed in this stage and the model converges again, the final weights are generated, which can well adapt to the detection task of borehole images.
[0057] Through multi-stage training, the model of the present invention can have a certain feature recognition ability in the initial stage, reducing the training time and resource consumption on the new data set. By gradually introducing new data sets and features, the model can better adapt to different types of data and tasks, and improve the detection accuracy and robustness on specific tasks. On a borehole image data set with a small amount of data, direct training may cause the model to overfit or be difficult to converge. Through transfer learning, the model can make full use of previously learned knowledge on a smaller data set to improve the training effect.
[0058] Specifically, in one embodiment of the present invention, step S2 includes:
[0059] Collecting image data containing conventional cracks, where the conventional cracks include ground cracks, rock cracks, and concrete cracks, annotating the image data, annotating the locations and categories of the conventional cracks, and obtaining a first data set;
[0060] Load the pre-trained target detection model, use the weight parameters of the pre-trained target detection model as the initial weight parameters, input the first data set into the pre-trained target detection model, and perform the first iterative training. During training, freeze the weight parameters of the first convolutional layer, the first residual block, the second residual block, and the third residual block, train the fourth residual block, the regional network, and the classification network until the loss function remains unchanged, then output the initially trained target detection model, and retain the weight parameters of the model as the first weight parameters.
[0061] In this embodiment, step S3 includes:
[0062] Using a computer program to generate an artificially synthesized image data set including one or more sinusoidal curves of different widths, annotating the artificially synthesized image data set, annotating the positions of the sinusoidal curves, and obtaining a second data set;
[0063] Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for a second iterative training. During training, the weight parameters of the first convolutional layer and the first residual block are frozen, and the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged. Then, the second trained target detection model is output, and the weight parameters of the model are retained as the second weight parameters.
[0064] In this embodiment, step S4 includes:
[0065] Collecting borehole image data containing borehole image cracks, marking the borehole image data, marking the locations and categories of the cracks, and obtaining a third data set;
[0066] Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for the second iterative training. During training, the weight parameter of the first convolutional layer is frozen, and the first residual block, the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged, and the final target detection model is output.
[0067] Among them, in the three trainings, the learning rate of the first training> the learning rate of the second training> the learning rate of the third training. The number of the first data set> the number of the second data set> the number of the third data set. The loss function is as follows:
[0068] L i =L1+λ i L2
[0069] Where L1 is the classification loss, L2 is the regression loss, i=1,2,3,L i represents the loss function used in the i-th training, λ irepresents the weight coefficient in the i-th training, λ1>λ2 and λ2<λ3.
[0070] Let's take a specific example to illustrate:
[0071] First, the network is trained on a conventional crack detection dataset until convergence. The crack detection dataset contains annotated common crack images, including rock cracks, concrete cracks, etc. After the model training converges, the network can detect the damage characteristics of conventional cracks and retain the network weights at this time.
[0072] This embodiment can construct a new target detection model for training, or load a pre-trained model for initialization, such as a target detection model pre-trained on ImageNet, use the weight parameters of the pre-trained model as the initial weight parameters, use the first data set for the first training, the loss function is the cross entropy loss and the smoothed L1 loss, introduce the weight coefficient λ1, divide the first data set into a training set and a validation set at a ratio of 7:3, monitor the loss and accuracy on the validation set during training, and consider the model converged when the loss on the validation set no longer decreases significantly and the accuracy is stable. Specifically, in the first training, the hyperparameters are set as follows:
[0073] The initial learning rate is set to 0.001, and the learning rate decay is performed. The optimizer uses the stochastic gradient descent optimizer, the batch size is 16, and the number of training rounds is set to 30 epochs.
[0074] The freezing strategy used during training is: freeze the weight parameters of the first convolutional layer, the first residual block, the second residual block, and the third residual block, and train the fourth residual block, the regional network, and the classification network. The reason for freezing these layers is that they contain lower-level general features, such as edges and textures, which are applicable to a wide range of visual tasks. When training on a regular crack dataset, the high-level convolutional layers learn higher-level features, such as the shape of the crack, the curvature of the crack edge, etc. By classifying and regressing cracks, the model learns to identify cracks in different backgrounds and predict their locations. The model learns general features for general crack detection at this stage, including various texture and shape features. These general features provide a solid foundation for subsequent stages, allowing the model to effectively use the learned low-level and mid-level features for refinement.
[0075] The structural surface cracks in the borehole image have obvious sinusoidal characteristics. The network trained on the conventional crack data set cannot detect such cracks with sinusoidal characteristics. In order to enable the model to detect this mathematical feature, some pictures are artificially generated using a computer program. The pictures contain one or more sinusoidal curves of different widths and are labeled with the positions of the curves to form a data set. On this data set, the network weights obtained from the first training are used to start training until the model converges. The converged network can detect both the destructive characteristics of the cracks and the sinusoidal characteristics of the cracks in the borehole image. The network weights at this time are retained.
[0076] The second training is performed using the second dataset. The loss functions are cross entropy loss and smooth L1 loss. The weight coefficient λ2 is introduced. The second dataset is divided into a training set and a validation set at a ratio of 7:3. The loss and accuracy on the validation set are monitored during the training process. When the loss on the validation set no longer decreases significantly and the accuracy is stable, the model is considered to have converged. Specifically, in the second training, the hyperparameters are set as follows:
[0077] The initial learning rate is set to 0.0005, and the learning rate decay is performed. The optimizer uses the stochastic gradient descent optimizer, the batch size is 16, and the number of training rounds is set to 15 epochs.
[0078] The freezing strategy used during training is: freeze the weight parameters of the first convolutional layer and the first residual block, and train the second residual block, the third residual block, the fourth residual block, the regional network, and the classification network. The reason for freezing these layers is that low-level features (such as edges and corners) are relatively common and basically do not require major changes. When training on the sine curve dataset, the mid-to-high-level convolutional layers will adjust the weights and focus more on identifying regular sinusoidal features. The learned features include the peaks, troughs, and arc features of the sine curve. The classification and regression heads are also slightly adjusted to adapt to the more regular sine curves. By fine-tuning the sine curves, the model retains the common features in regular cracks while learning more specialized geometric features. The model gradually adapts to more regular and specific shapes, which helps to identify structural surfaces in complex backgrounds.
[0079] The rock mass structural surfaces are marked on a certain number of borehole images to form a data set. On this data set, the weights obtained from the second training are used to start training until convergence. At this point, the network can detect structural surface targets on the borehole images very well.
[0080] The third training was performed using the third dataset. The loss functions were cross entropy loss and smooth L1 loss. The weight coefficient λ3 was introduced. The second dataset was divided into a training set and a validation set at a ratio of 7:3. The loss and accuracy on the validation set were monitored during the training process. When the loss on the validation set no longer decreased significantly and the accuracy was stable, the model was considered to have converged. Specifically, in the third training, the hyperparameters were set as follows:
[0081] The initial learning rate is set to 0.0001, and the learning rate decay is performed. The optimizer uses the stochastic gradient descent optimizer, the batch size is 16, and the number of training rounds is set to 15 epochs.
[0082] The freezing strategy used during training is: freeze the weight parameters of the first convolutional layer, train the first residual block, the second residual block, the third residual block, the fourth residual block, the regional network, and the classification network. The reason for freezing these layers is that the low-level features are still relatively general and occupy the first few layers of the model, and these features do not need major changes. When training on the borehole image dataset, the mid-to-high-level convolutional layers will further adjust the weights so that they can recognize specific structural surface features in the borehole image. The learned features include: crack morphology, local features, local environment and contextual information in the borehole. The classification and regression heads will be further fine-tuned so that they can perform well in the final application scenario. By fine-tuning on the dataset of the target domain, the model not only retains the features learned in the previous two stages, but also adapts to the borehole image features in specific application scenarios. In this way, the model can more accurately identify the structural surface in the borehole image while retaining the general crack recognition ability.
[0083] Specifically, this embodiment adopts staged feature migration and fine-tuning. The fine-tuning process of each stage is actually to optimize the high-level convolutional layer and classification head so that they gradually adapt to the feature distribution of the new data set. Through gradual adjustment, the model can avoid overfitting or underfitting during the migration process. The fine-tuning data set in each stage has a specific task background and data distribution, which helps the model to adapt and optimize in specific application scenarios, thereby improving the accuracy and robustness in the target domain. Low-level features are generally applicable, and medium and high-level features are gradually refined and adjusted so that the model can adapt to task-specific feature distributions and application scenarios. This method ensures that the model continuously accumulates and adjusts features during the learning process at different stages, thereby achieving efficient transfer learning.
[0084] Specifically, in each training stage, data enhancement techniques such as random cropping, rotation, scaling, and color jitter are used to increase data diversity. After the third training, the model is pruned and quantized to reduce the number of model parameters and calculations and improve the inference speed.
[0085] Specifically, in another embodiment of the present invention, in order to increase the application value of the model, a specific anchor frame generation and adjustment strategy is adopted when generating the anchor frame, which is more suitable for the detection of long and thin targets such as cracks:
[0086] When generating anchor frames, add anchor frames with aspect ratios of 1:3, 1:5, etc. that are suitable for crack shapes. Generate anchor frames at different scales to accommodate cracks of different sizes. In RPN, add specific adjustment strategies for long and thin targets, such as adding regression terms for aspect ratios. In the post-processing stage, when using non-maximum suppression (NMS), consider the characteristics of long and thin targets and adjust the threshold of NMS.
[0087] After obtaining the final target detection model, the model can be used to identify the borehole image and obtain the rock structure recognition result. The model processing process is as follows:
[0088] The drilling image is input to the backbone network, and processed in sequence by the first convolutional layer, the first residual block, the second residual block, the third residual block, and the fourth residual block to extract low-level to high-level features and output a high-dimensional feature map; the details are as follows:
[0089] The first convolutional layer: performs convolution operations to extract low-level texture features. Conv1 = Conv (Input Image).
[0090] The first residual block: further extracts features while retaining input information through residual connections. ResBlock1 = ResidualBlock(Conv1).
[0091] Second residual block: extracting intermediate features. ResBlock2 = ResidualBlock (ResBlock1).
[0092] The third residual block: extracts deeper features. ResBlock3 = ResidualBlock (ResBlock2).
[0093] The fourth residual block: extracts the highest-level features and outputs a high-dimensional feature map.
[0094] ResBlock4=ResidualBlock(ResBlock3).
[0095] The drilling image is input into the regional network at the same time, an m*m sliding window is set on the drilling image, a series of initial candidate regions are generated, multiple anchor frames are generated at each initial candidate region position, each anchor frame is identified to determine whether it contains foreground or background, and bounding box regression is performed on the anchor frame containing the foreground, the position and size of the anchor frame are adjusted, and the candidate region with the anchor frame is output;
[0096] Specifically, the sliding window is 3*3. The foreground is the target, and whether the anchor frame contains the foreground is determined, that is, whether there is a crack in the anchor frame.
[0097] The high-dimensional feature map and the candidate region with the anchor box are input into the classification network, and each candidate region is mapped to the feature map using the ROI pooling layer, and the candidate region is converted into a feature vector of a preset size. The feature vector of the preset size is processed into a high-dimensional feature vector based on the fully connected layer, and the high-dimensional feature vector is processed using the task layer. The category of the candidate region is obtained according to the classification layer, and the bounding box of the candidate region is obtained according to the boundary regression layer. The target detection result is output, including the classification result and the target box.
[0098] Specifically, ROI pooling layer: maps each candidate region to a high-dimensional feature map and converts it into a feature vector of a preset size.
[0099] ROIPooled Features=ROIPooling(ResBlock4,Proposals).
[0100] Fully connected layer processing: The feature vector of preset size is passed through the fully connected layer to further extract high-dimensional features.
[0101] FC Features=Fully Connected Layer(ROIPooled Features).
[0102] Task layer processing:
[0103] Classification layer: Based on the feature vector, the upper classification layer obtains the category of each candidate region.
[0104] Class Scores=Classification Layer(FC Features).
[0105] Boundary regression layer: Get the bounding box of each candidate region again.
[0106] Refined Boxes=Bounding Box Regression Layer (FC Features).
[0107] The output object detection results include classification results and precise object boxes, which are used to identify the crack locations and categories in the drilling images.
[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 in the protection scope of the present invention.
Claims
1. A method for rock structure recognition in borehole images based on transfer learning, It is characterized in that The steps include: S1: Build a target detection model, including the backbone network, regional network and classification network; S2: Obtain a first data set, and use the first data set to perform a first iterative training on the target detection model until the model converges, thereby obtaining a preliminarily trained target detection model, and retaining a weight parameter of the model as a first weight parameter; S3: Obtain a second data set, use the first weight parameter as the initial parameter for the second training, use the second data set to perform a second iterative training on the model until the model converges, obtain a second-trained target detection model, and save the weight parameter at this time as the second weight parameter; S4: obtaining a third data set, using the second weight parameter as the initial parameter for the third training, and performing a third iterative training on the model using the third data set until the model converges, thereby obtaining a final target detection model; S5: Acquire the borehole image, use the final target detection model to identify the borehole image, and obtain the rock structure recognition result.
2. The method for identifying rock mass structure in borehole images based on transfer learning according to claim 1, It is characterized in that The first dataset is a general dataset in the source domain, the second dataset is a related dataset in the intermediate domain, and the third dataset is a task dataset in the target domain.
3. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 2, Features: The backbone network includes a first convolutional layer, a pooling layer, a first residual block, a second residual block, a third residual block and a fourth residual block, which are used to extract a feature map of the input data; The regional network includes a second input layer, an RPN layer and a region generation layer, which is used to generate candidate regions; The classification network includes ROI pooling layer, fully connected layer and task layer. The task layer is divided into classification layer and boundary regression layer. The classification network is used for target detection, positioning and classification of targets.
4. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 3, It is characterized in that Step S2 includes: Collecting image data containing conventional cracks, where the conventional cracks include ground cracks, rock cracks, and concrete cracks, annotating the image data, annotating the locations and categories of the conventional cracks, and obtaining a first data set; Load the pre-trained target detection model, use the weight parameters of the pre-trained target detection model as the initial weight parameters, input the first data set into the pre-trained target detection model, and perform the first iterative training. During training, freeze the weight parameters of the first convolutional layer, the first residual block, the second residual block, and the third residual block, train the fourth residual block, the regional network, and the classification network until the loss function remains unchanged, then output the initially trained target detection model, and retain the weight parameters of the model as the first weight parameters.
5. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 4, It is characterized in that Step S3 includes: Using a computer program to generate an artificially synthesized image data set including one or more sinusoidal curves of different widths, annotating the artificially synthesized image data set, annotating the positions of the sinusoidal curves, and obtaining a second data set; Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for a second iterative training. During training, the weight parameters of the first convolutional layer and the first residual block are frozen, and the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged. Then, the second trained target detection model is output, and the weight parameters of the model are retained as the second weight parameters.
6. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 5, It is characterized in that Step S4 includes: Collecting borehole image data containing borehole image cracks, marking the borehole image data, marking the locations and categories of the cracks, and obtaining a third data set; Using the first weight parameter as the initial weight, the second data set is input into the initially trained target detection model for the second iterative training. During training, the weight parameter of the first convolutional layer is frozen, and the first residual block, the second residual block, the third residual block, the fourth residual block, the regional network and the classification network are trained until the loss function remains unchanged, and the final target detection model is output.
7. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 6, It is characterized in that In the three trainings, the learning rate of the first training > the learning rate of the second training > the learning rate of the third training.
8. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 6, It is characterized in that The loss function is as follows: L i =L 1 +λ i L 2 Where, L 1 is the classification loss, L 2 is the regression loss, i=1,2,3,L i represents the loss function used in the i-th training, λ i represents the weight coefficient in the i-th training, λ 1 >λ 2 And 2 <λ 3 .
9. The method for identifying rock mass structure in borehole images based on transfer learning according to claim 1, It is characterized in that The number of the first data set > the number of the second data set > the number of the third data set.
10. The method for identifying rock mass structure in borehole images based on transfer learning as claimed in claim 3, It is characterized in that In step S5, the final target detection model processes the drilling image as follows: Input the drilling image to the backbone network, process it in sequence through the first convolutional layer, the first residual block, the second residual block, the third residual block, and the fourth residual block to extract low-level to high-level features and output a high-dimensional feature map; The drilling image is input into the regional network at the same time, an m*m sliding window is set on the drilling image, a series of initial candidate regions are generated, multiple anchor frames are generated at each initial candidate region position, each anchor frame is identified to determine whether it contains foreground or background, and bounding box regression is performed on the anchor frame containing the foreground, the position and size of the anchor frame are adjusted, and the candidate region with the anchor frame is output; The high-dimensional feature map and the candidate region with the anchor box are input into the classification network, and each candidate region is mapped to the feature map using the ROI pooling layer, and the candidate region is converted into a feature vector of a preset size. The feature vector of the preset size is processed into a high-dimensional feature vector based on the fully connected layer, and the high-dimensional feature vector is processed using the task layer. The category of the candidate region is obtained according to the classification layer, and the bounding box of the candidate region is obtained according to the boundary regression layer. The target detection result is output, including the classification result and the target box.
Citation Information
Patent Citations
Mark detection model training and mark detection method based on multi-stage transfer learning
CN111062885A
Cited By
Data processing method and device based on multistage contrast learning, equipment and medium
CN120544204A
