Mask R-CNN surface crack identification method combined with semi-supervised model

By combining the Mask R-CNN surface crack identification method with a semi-supervised model, using data intensity enhancement and pseudo-labeling, the RoiAlign module and loss function are improved, which solves the challenges of surface crack segmentation and labeling samples in complex large scenes, and achieves Highly accurate and low-cost crack identification.

CN118675048APending Publication Date: 2024-09-20GUONENG YILI ENERGY CO LTD HUANG YUCHUAN COAL MINE +1
View PDF 0 Cites 8 Cited by

Patent Information

Application Number
CN202410693706.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In complex large scenes, surface fracture segmentation is challenging, and existing deep learning models require a large number of labeled samples, resulting in high training costs and insufficient segmentation accuracy.

Method used

Using the Mask R-CNN surface crack identification method combined with a semi-supervised model, by introducing data strength enhancement and pseudo-labeling methods, using the consistency regularization assumption and improved RoiAlign module and loss function, only a small number of labeled samples are used to train F_Mask R- CNN network improves segmentation accuracy and generalization.

Benefits of technology

With a small number of labeled samples, the instance segmentation results of surface cracks are significantly improved, the model application cost is reduced, and the accuracy and generalization ability of remote sensing image segmentation are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118675048A
    Figure CN118675048A
Patent Text Reader

Abstract

The invention discloses a Mask R-CNN earth surface crack identification method combined with a semi-supervised model, and the method comprises the following steps: firstly collecting an unmanned plane flight image of a working surface, marking a small number of cracks, and constructing an earth surface mining-induced crack data set; and secondly, the idea of combining pseudo labels and consistency regularization in the semi-supervised model is applied to a Mask R-CNN network, a new instance segmentation network FMask R-CNN is constructed, and the principle is that sufficient pseudo labels are generated by using a semi-supervised method, consistency regularization processing is performed on the pseudo labels and a strong enhancement sample by using two training branches to obtain a loss function of an unsupervised part, and the loss function of the unsupervised part is used as an instance segmentation network. Inputting the original samples and the pseudo labels into an improved Mask R-CNN (Region-Convolutional Neural Network); according to the improvement of the Mask R-CNN, after a RoiAlgin module and feature extraction, improved classification, regression and segmentation loss functions are used for calculating a loss value. A classification and segmentation loss function is improved into a weighted cross entropy loss function, and a segmentation loss function is improved into a CIou loss function. And finally, outputting the category of the earth surface crack and the segmentation result of the detection frame and the pixels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for predicting ground cracks, and belongs to the field of instance segmentation in deep learning, which is a Mask R-CNN ground crack recognition method combined with a semi-supervised model. Background Art

[0002] With coal mining as the background, surface cracks are a common geological disaster. At present, there are many methods for detecting ground cracks at home and abroad, such as field surveys, synthetic aperture radar interferometry technology, satellite positioning technologies such as GPS and GNSS, laser scanning technology and remote sensing technology, but these methods all have some problems. GPS satellite positioning technology has high accuracy in field surveys and on-site mapping, but it is costly and labor-intensive; InSAR technology is easily affected by factors such as temporal incoherence and spatial incoherence, and phase unwrapping difficulties or phase decoherence may occur when the ground deformation is too large; laser scanning technology requires line of sight between the scanner and the target, and its scanning range is limited by terrain conditions. The monitoring cost is relatively high; satellite remote sensing technology obtains the distribution of ground cracks by interpreting ground remote sensing images, but manual interpretation of images takes a long time and consumes a lot of manpower; and the crack segmentation method based on deep learning can achieve automatic crack recognition after training the model with samples, and has high accuracy and generalization ability, so it has become a popular research direction at present.

[0003] At present, deep learning crack segmentation is effective in scenarios with a single or fixed background and has been applied in many fields, such as road crack detection, bridge crack detection, and metal crack detection in industry. However, in complex situations, such as mining crack detection, there are still certain challenges. The main reasons are: (1) The natural environment has rich background information, including a variety of geological environments, and the cracks have various shapes, which requires adjustments to the existing deep learning algorithms; (2) After remote sensing images are collected, there may be cracks blocked by ground objects, noise, different lighting conditions, etc., which puts higher requirements on the accuracy of the segmentation algorithm; (3) Many current deep learning models require a sufficient number of samples to achieve good segmentation effects, but sample labeling is time-consuming and labor-intensive, and the cost of producing a dataset that can be used for training is high, which limits the widespread application of deep learning crack segmentation. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] The technical problem to be solved by the present invention is: in view of the challenging crack segmentation of complex large scenes and the difficult problem that a large number of crack labeled samples are required for training the network, the present invention proposes a Mask R-CNN surface crack recognition method combining a semi-supervised model and a new data enhancement strategy, which can train the F_Mask R-CNN network with only a small number of labeled samples, reducing the application cost of the model and improving the accuracy and generalization of surface crack segmentation of remote sensing images.

[0006] (II) Technical solution

[0007] To achieve the above objectives, the present invention proposes a Mask R-CNN surface crack recognition method combined with a semi-supervised model. The main contents are as follows:

[0008] 1) Use drones to fly over the working surface, build a small amount of drone high-resolution image surface crack annotation datasets, retain a large amount of unlabeled data, perform data preprocessing, and divide the dataset into training set, validation set, and test set according to the proportion;

[0009] 2) Construct a Mask R-CNN network combined with a semi-supervised model, called the F_Mask R-CNN network, including: introducing methods of data strong and weak enhancement and pseudo-labeling, and introducing the consistency regularization hypothesis; the specific process is: first train the F_Mask R-CNN network with a small number of labeled samples, then put the unlabeled data into the F_Mask R-CNN for prediction, and use the samples predicted by the network in the weak enhancement branch that are higher than the confidence threshold as pseudo-labels, and the strong enhancement branch assumes that the pseudo-labels are real samples, and sets the weighted cross entropy loss function to make the prediction results of the strong enhancement branch close to the weak enhancement branch, and use the weighted cross entropy loss function to calculate the loss value and then back-propagate to update the network;

[0010] 3) Improve the RoiAlign module and loss function in the Mask R-CNN network, including: using the updated surface crack dataset with annotated labels and pseudo-labels to train the F_Mask R-CNN network, after the feature extraction stage, using the classification loss, regression loss and segmentation loss functions to decouple the features and calculate the loss values ​​respectively, fusing the loss functions of the unsupervised part and the supervised part, updating the F_Mask R-CNN network through back propagation, and outputting the detection box position, category and pixel segmentation results of the surface cracks.

[0011] (III) Beneficial effects

[0012] 1. The present invention discloses a method for identifying surface cracks using Mask R-CNN combined with a semi-supervised model, which combines pseudo-labeling and consistency regularization methods into the model. A method for enhancing data with strong and weak strengths is attached. The strong enhancement method innovatively selects three combinations from a given set of K images, and assigns different weights and different transformation levels to these three images. In the case of only a small number of labeled samples, the diversity of samples can be improved, so that the F_Mask R-CNN network can obtain better results for instance segmentation of surface cracks.

[0013] 2. The present invention changes the RoiAlign module in Mask R-CNN and improves the calculation formula of alignment features to be more suitable for cracks. The bilinear interpolation calculation method used in ROI mapping sampling in the RoiAlign module is changed to cubic convolution interpolation. Cubic convolution interpolation convolves the point on the feature layer with fifteen points in the neighborhood of the point to obtain the specific value of the point, which is more accurate than bilinear interpolation which only considers the convolution calculation of four points in the neighborhood of the point.

[0014] 3. The present invention modifies the regression loss and segmentation loss during feature decoupling. The regression loss uses the CIou loss function instead of the smoothL1 loss function, and the segmentation and classification loss uses the weighted cross entropy loss function instead of the cross entropy loss function. This improves the segmentation results of surface cracks. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a flow chart of a method for segmenting surface cracks using Mask R-CNN combined with a semi-supervised model in an embodiment of the present invention;

[0016] Figure 2 Schematic diagram of the F_Mask R-CNN network structure in an embodiment of the present invention;

[0017] Figure 3 This is a schematic diagram of a strong enhancement part in data enhancement in an embodiment of the present invention;

[0018] Figure 4 This is an example diagram of the segmentation results of the surface cracks in the coal mining area by F_Mask R-CNN in an embodiment of the present invention; DETAILED DESCRIPTION

[0019] like Figure 1 As shown, the present invention discloses a Mask R-CNN surface crack recognition method combined with a semi-supervised model, comprising the following steps:

[0020] 1) Fly the entire working surface, first build a small amount of UAV high-resolution image surface crack annotation dataset, retain a large amount of unlabeled data, perform data preprocessing, and divide the dataset into training set, validation set and test set according to the proportion, specifically including:

[0021] Step 1: First, use a drone to fly over the working surface to collect high-resolution image data with a resolution of 1 cm. After a period of time, collect the working surface image again to compare and mark the mining cracks. Photoscan preprocessing generates orthophotos. In this case, the coal mining subsidence area is used as the experimental area to produce a small amount of coal mining surface crack annotation data sets;

[0022] The F_Mask R-CNN proposed in this invention is applicable to the instance segmentation of any crack target, and only takes the mining cracks in coal mining areas as an example;

[0023] Step 2: Use the labeling software labelme to label a small number of collected orthophotos of ground cracks to determine the boundary information and location information of the cracks;

[0024] Step 3: Preprocess the dataset, crop the image to 640*640 size, convert the sample data from image and json format to the format of coco dataset, and divide the dataset into training set, validation set and test set in a ratio of 8:1:1;

[0025] 2) If Figure 1 As shown in the figure, we construct F_Mask R-CNN with semi-supervised methods, including: introducing the idea of ​​data enhancement and pseudo-labeling, and at the same time introducing the consistency regularization hypothesis. Improve the application process of the model. Specifically, it includes:

[0026] Step 1: First prepare batch = b of labeled data and batch = ub of unlabeled data, where u is the ratio of unlabeled data. First, supervise the training of F_Mask R-CNN with labeled data. The total loss of labeled data is denoted as ls;

[0027] Step 2: Apply weak enhancement and strong enhancement to the unlabeled data to obtain enhanced data. Weak enhancement flips the unlabeled data or translates it 15% along the x and y directions. The specific method of strong enhancement for data enhancement of unlabeled data is as follows: use a set of K image changes, taking k = 9 as an example, which are rotation, translation, brightness, sharpness, flip along the x-axis, flip along the y-axis, shear along the x-axis, shear along the y-axis, and color saturation. Select any three of them and determine the different amplitudes of each image transformation, with one to nine levels, and a 5% interval between each level. For example, flip along the x-axis, level 2, means flipping along the x-axis by 10%, and giving different weights to image transformations when generating new images. Strong enhancement consists of three main parameters: one is the selected enhancement transformation set, the second is the number of transformations, and the third is the weight of the proportion of different image transformations. The combination of these three parameters can significantly improve the diversity of samples when samples are lacking. In this way, the samples are amplified in the model after training and the cross entropy loss function is calculated with the weakly enhanced branch. After back propagation to update the model, the generalization ability of the network can be improved. See for details. Figure 3 ;

[0028] Step 3: First, put the weakly enhanced data into the F_Mask R-CNN model for prediction and set a confidence threshold, that is, to obtain a pseudo label by assigning the sample to the category with the highest confidence and above the confidence threshold. If the highest confidence does not reach the confidence threshold, the unlabeled sample is discarded. This can reduce the possibility of selecting the wrong pseudo label and reduce the probability of the model making mistakes;

[0029] Step 4: Integration of the consistency regularization hypothesis. The consistency regularization hypothesis is that if a certain disturbance is made to the input, the prediction results of the model should also be similar. This method is generally based on the prediction of the model output and does not require specific labels. It constructs the prediction results after adding disturbances on the unlabeled data. There is an unsupervised regularization loss term between the normal prediction result y to improve the generalization ability of the model. The specific mathematical principle is as follows:

[0030] D[P_model(y|Augment(x), θ), P_model(y|Augment(x), θ)#(1)

[0031] Among them, D is the metric function, Augment() is the data enhancement function, which will add some noise disturbance, and θ is the model parameter. In this example, consistency regularization mainly consists of two branches, which are reflected in the weighted cross entropy loss calculation of the result of putting the strongly enhanced data into the F_Mask R-CNN model and the pseudo-label obtained by the corresponding weak enhancement. The loss of unlabeled data is calculated by L u Indicates that the loss L S and L uCombined, the total loss function is the combination of the unsupervised part loss and the supervised part loss, and the formula is

[0032] L=L S +σL u #(2)

[0033] Where σ is the weight parameter.

[0034] 3) Improvements to the RoiAlign module and loss function in the Mask R-CNN network. The F_Mask R-CNN model is trained on the updated surface crack dataset with labeled labels and pseudo labels. After the feature extraction stage, the classification loss, regression loss, and segmentation loss functions are used to decouple the features and calculate the loss values ​​respectively. The loss functions of the unsupervised part and the supervised part are fused to merge the two models to back-propagate and update the model. The detection box position, category, and pixel segmentation results of the surface cracks are output, including:

[0035] Step 1: The input of ROIAlign (Region of interest Align) is the five scale features output by the convolution layer after the backbone of FPN+Resnet50 in Mask R-CNN and a series of candidate regions (RoIs) that may include targets output by the RPN layer. These RoIs may have different sizes or shapes. The role of ROIAlign is to improve the sampling problem in the ROI mapping process. The original ROIAlign uses bilinear interpolation to sample features in the ROI more finely. The following formula is the scale feature of the ROI corresponding to the convolution layer output

[0036]

[0037] Mask R-CNN uses ROI level calibration. k0 is a self-set hyperparameter with an initial value of 4. k represents the level corresponding to roi. There are five levels, corresponding to the five scale features output by the previous convolutional layer. Level = 2 means mapping back to feature P2, which is 1 / 4 of the original input image. Level 3 means mapping back to feature P3, which is 1 / 8 of the original input image. And so on. Because the image size is 640*640, and usually the larger the target, the deeper the semantics and feature layer required. In order to better extract cracks with mostly small targets, the original formula is changed to

[0038]

[0039] This will make roi=0.5 2The data is sampled and cropped at the P4 level. It is more suitable for samples with mostly small targets. The bilinear interpolation is changed to the cubic convolution interpolation method. Compared with the bilinear interpolation that only considers four points on the feature layer to interpolate the specific value of the point, the cubic convolution interpolation will convolve the point on the feature layer and the fifteen points in the neighborhood of the point to obtain the specific value of the point.

[0040] g(x,y)=(1-u)(1-v)f(i,j)+u(1-v)f(i+1,j)+(1-u)vf(i,j+1)+uvf(i+1,j+1)f#(5)

[0041]

[0042] F() is the value of the original image target point and the corresponding 15 domain points of the feature map, and S() is the convolution formula. This makes the sampling in the ROI mapping more accurate, but it also increases the amount of calculation;

[0043] Step 2: After the training set F_Mask R-CNN instance segmentation network is subjected to feature extraction, the loss function changes accordingly. Specifically, the loss function of the original Mask R-CNN network is L = L cls +L box +Lmask, where L cls For classification loss, the cross entropy loss function is used. The Lbox border loss function uses the smoothL1 loss function in the original Mask R-CNN. Lmask is the mask loss function and uses the cross entropy loss function. The smoothL1 loss function of Lbox is replaced with CIouLoss. When the smoothL1 loss function is used to calculate the bounding box of the target, the loss of the four points is independently calculated and then added to get the final Bounding Box Loss. Assuming that the four points of the bounding box are independent of each other, there is actually a certain correlation, and the actual evaluation box detection indicator is to use IOU (intersection-over-union ratio). The two are not equivalent. Multiple detection boxes may have the same smoothL1loss, but the IOU may vary greatly. Therefore, CiouLoss is introduced. CiouLoss directly minimizes the normalized distance between the predicted box and the target box, achieving a faster convergence speed. It takes into account three important geometric factors of the target box regression loss: overlapping area, center point distance, and aspect ratio. The lossd based on Iou is usually defined as:

[0044] L = 1 - IoU + R (B, B gt )#(7)

[0045] Where R(B, B gt ) is defined as the prediction box B and the target box B gt The penalty term of CiouLoss is expressed as:

[0046]

[0047] where b and b gt Respectively represent B and B gt The center point of , P() represents the Euclidean distance, and c represents the distance between B and B gt The diagonal distance of the minimum outer rectangle of the prediction box is taken into account by the impact factor av. Finally, the CIou loss function is defined as

[0048]

[0049] Replacing the smoothhl1 function in Mask R-CNN with this loss function can obtain more accurate regression results.

[0050] The classification and segmentation loss function of Mask R-CNN is changed to the cross entropy loss function. The defect of the cross entropy loss function is that when only the foreground and background are segmented, the number of foreground pixels is much smaller than the number of background pixels, which will cause the model to be seriously biased towards the background. The weighted cross entropy loss function adds weights to increase the participation of positive samples in loss calculation. The weighted cross entropy loss adds a weight hyperparameter w to weight fewer categories:

[0051] L WCE =-w + *y*logp(Y=1|X)-w - *y*logp(Y=0|X)#(10)

[0052] When Y=1, it is the target pixel (positive sample), and when Y=1, it is the background pixel (negative sample). Compared with the original cross entropy loss function, better results can be obtained when the number of samples is unbalanced.

[0053] The specific embodiments described further illustrate the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific 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 Mask R-CNN surface crack recognition method combined with a semi-supervised model, characterized in that The network is trained with a small number of real samples, and sufficient pseudo samples are obtained through strong and weak data enhancement methods. Mask R-CNN is improved to enhance its detection performance of surface cracks, and can more accurately identify the characteristics of cracks, solving the original Mask R-CNN's dependence on a large number of samples. Improving the robustness and accuracy of surface crack identification includes the following steps: 1) Use drones to fly over the working surface, build a small amount of drone high-resolution image surface crack annotation datasets, retain a large amount of unlabeled data, perform data preprocessing, and divide the dataset into training set, validation set, and test set according to the proportion; 2) Construct a Mask R-CNN network combined with a semi-supervised model, called the F_Mask R-CNN network, including: introducing methods of data strong and weak enhancement and pseudo-labeling, and introducing the consistency regularization hypothesis; the specific process is: first train the F_Mask R-CNN network with a small number of labeled samples, then put the unlabeled data into the F_Mask R-CNN network for prediction, and use the samples predicted in the weak enhancement branch that are higher than the confidence threshold as pseudo-labels, and the strong enhancement branch assumes that the pseudo-labels are real samples. Set a weighted cross entropy loss function to make the prediction results of the strong enhancement branch close to the weak enhancement branch, and use the weighted cross entropy loss function to calculate the loss value and then back-propagate to update the network; 3) Improve the RoiAlign module and loss function in the Mask R-CNN network, including: using the updated surface crack dataset with annotated labels and pseudo-labels to train the F_Mask R-CNN network, after the feature extraction stage, using the classification loss, regression loss and segmentation loss functions to decouple the features and calculate the loss values ​​respectively, fusing the loss functions of the unsupervised part and the supervised part, updating the F_Mask R-CNN network through back propagation, and outputting the detection box position, category and pixel segmentation results of the surface cracks.

2. According to claim 1, a small amount of UAV high-resolution image surface crack annotation dataset is constructed, and data preprocessing is performed, and the dataset is divided into a training set, a validation set and a test set according to a proportion, characterized in that: The following steps are included: Step 1: Taking the coal mining area as an example, the present invention uses a drone to collect high-resolution surface images of the working face. After a period of time, the surface image of the working face is collected again. The two collected images are compared, and a small number of samples of newly generated cracks are annotated to produce an annotated data set. Step 2: Use the labeling software labelme to label the newly generated cracks in the collected image area and determine the boundary information and location information of the cracks; Step 3: Preprocess the dataset, crop the image to 640*640 size, convert the sample data from image and json format to the format of coco dataset, and divide the dataset into training set, validation set and test set;.

3. The Mask R-CNN surface crack identification method combined with a semi-supervised model according to claim 1, comprising: The method of data enhancement and pseudo labeling is introduced, and the consistency regularization hypothesis is introduced, which is characterized by including the following steps: Step 1: Prepare labeled data and unlabeled data, and use a small amount of labeled data to train the F_Mask R-CNN network; Step 2: Apply weak enhancement and strong enhancement to the unlabeled data to obtain enhanced data, where weak enhancement is to translate the original image by 15% or flip the original image; strong enhancement is to select any three of the given K image transformations, assign different weights to these three image transformations, and grade the transformation strength. The purpose of this step is to obtain the cross entropy loss function after strong and weak data enhancement, and improve the generalization ability of the model when back-propagating to update the model; Step 3: First, put the weakly enhanced data into the F_Mask R-CNN model trained with a small number of labeled samples to obtain the segmentation results. After setting the confidence threshold, the categories above the confidence threshold are labeled with pseudo labels. Step 4: The consistency regularization assumption is reflected in the weighted cross-entropy loss calculation of the result of putting the strongly enhanced data into the F_Mask R-CNN network and the corresponding pseudo-label obtained by weak enhancement, and then back-propagating to update the network;.

4. The improvement of the Mask R-CNN network RoiAlign module and loss function according to claim 1, characterized in that: The following steps are included: Step 1: Improve the formula for calculating the corresponding feature layer in the RoiAlign module to make it more suitable for the extraction of crack targets. Specifically, the calculation method for mapping the ROI (region of interest) in the RoiAlign module to the feature map is changed from bilinear interpolation to cubic convolution interpolation, so as to sample features on the ROI more finely. Step 2: Improve the loss function of the Mask R-CNN instance segmentation network. Specifically, L cls is the classification loss function, L mask is the mask loss function, L cls and L mask Improved to weighted cross entropy loss function. box The loss function is improved to Ciou loss function.

Citation Information

Cited By

  • Geological interval velocity modeling method and device, medium and equipment

    CN119148206A

  • Leukocyte morphological category identification method and device

    CN120219833A

  • Method for identifying unknown working condition of froth flotation based on pseudo label contrast learning

    CN120580560A

  • A Method for Identifying Unknown Operating Conditions in Foam Flotation Based on Pseudo-Label Comparative Learning

    CN120580560B

  • LED chip detection method, system and equipment

    CN121391725A