Intelligent Algorithm for Rock Core RQD Based on Object Detection and Image Segmentation to Suppress Noise and Vibration

,


Introduction
In the construction of the civil engineering infrastructure, the noise and vibration are affected by the geological conditions, adopting specific construction techniques based on the geological conditions is of great significance in suppressing the noise and vibration caused by the construction [1][2][3][4].To classify and evaluate the rock mass quality, Deere [5] introduced the rock quality designation (RQD), including the measurement of the lengths of the drilling core pieces and the calculation of RQD.RQD is convenient to evaluate the rock mass quality quantitatively; consequently, RQD is adopted widely in the geological and mining engineering [6][7][8][9][10][11]. Based on the properties of the rock mass, Bieniawski [6] improved the engineering classification of the rock mass.To overcome the limitations of the previous empirical relations, Zhang and Einstein [9] built the new relation between the rock mass deformation modulus and RQD.When properly carried out, Lucian and Wangwe [10] reported that RQD was a basic index to determine the rock mass strength in the geological and mining engineering.To determine the deformation modulus of the rock mass, Zhang [11] evaluated the empirical methods and outlined the essential aspects on the evaluation of RQD.
To obtain RQD, traditionally, the measurement of the lengths of the drilling core pieces and the calculation of RQD are conducted manually, which is labor-expensive and time-consuming [12][13][14][15].For example, Chen et al. [13] presented a new method of obtaining RQD of the rock mass, where the error was reduced and the rock mass properties were reflected.However, the discontinuity data of the rock mass needs to be recorded manually, which is laborious.
With the development of the computational power, the image treatment driven by the artificial intelligence algorithm is adopted frequently in the geological and mining engineering [16][17][18][19][20][21][22][23][24][25][26][27].For example, under different light source positions, Saricam and Ozturk [16] located the positions of the fractures in terms of the shadows, segmented the drilling core pieces, and calculated the RQD value.By segmenting the image edges and extracting the fracture locations, Li and Du [20] developed an automatic RQD analysis method.To determine the boundaries of the drilling core pieces, Jin et al. [23] segmented the drilling core pieces with the deep learning algorithm and calculated the lengths of the drilling core pieces.
Though the image treatment with the aid of the intelligent algorithm is popular, there are some shortcomings.For example, in the method proposed by Saricam and Ozturk [16], the light source locations are required, and the equipment to capture the image is expensive; consequently, the method is difficult to adopt in the engineering site.In the approach developed by Li and Du [20], the specialized and expensive systems and equipment are required.In the framework provided by Liu et al. [25], the engineering environment is complex, for example, the shooting conditions are limited; consequently, the image is distorted by the shooting condition, which would affect the image analysis significantly.
To overcome the above shortcomings, the present work expects to develop an automatic image treatment process of RQD under the aid of the object detection and the image segmentation, including the perspective correction of the original drilling core images, segmentation of the drilling core pieces, object detection algorithm, and calculation of RQD.To demonstrate the feasibility of the proposed framework, 10 boreholes from Shapingba Railway Comprehensive Reconstruction Project are adopted to conduct the case study.The proposed framework creates a potential approach to obtain RQD automatically, which is helpful to improve the level of intelligence in geological and mining engineering.

Methodology
2.1.Perspective Correction.Limited by the shooting condition, the perspective of the original image does not meet our needs, to correct the perspective of the original image, the perspective correction is conducted.In the present study, to correct the shooting angles of the original images, the perspective correction is adopted.To conduct the perspective correction, a 2D image is projected onto a 3D viewing space, after the projection, it is converted to a 2D coordinate system.The transformation equation of the perspective correction is as follows: where ðx; y; 1Þ: is the pixel coordinates in the 2D plane before the perspective correction, M is the perspective correction matrix, ðx * ; y * ; z * Þ: is the 3D pixel indexes after the perspective correction, and ðx ¼ x * =z * ; y ¼ y * =z * Þ: is the 2D pixel indexes after the perspective correction.In the present study, the perspective correction process is conducted with the aid of the image treatment program.Figure 1 compares the drilling core images before and after the perspective correction.Compared to the original image before the perspective correction, the image after the perspective correction is easier to be treated by the computer program.At the same time, the edge of the box is cut, and the extra disturbance is eliminated.

Object Detection.
Next, we describe the object detection algorithm, where the segment anything model (SAM) is adopted.As illustrated in Figure 2, the object detection algorithm is consisted of three parts, namely, an image encoder, a prompt encoder, and a mask decoder [28][29][30].First, the original image is processed by the image encoder, where the characteristics of the original image are extracted.After the image encoder, the image embedding is conducted.
After the image embedding, the prompt encoder is carried out, where the characteristics of the drilling core pieces are coded.After the mask decoder, the drilling core pieces are extracted from the original image, and the drilling core pieces are output.

Image Segmentation.
After the drilling core pieces are extracted from the original image, it is necessary to segment 2 Advances in Civil Engineering each drilling core piece.To segment each drilling core piece from the drilling core pieces, the YOLOv8 algorithm [31,32] is adopted in the present work.YOLOv8 is the latest member of the YOLO algorithm [33], as shown in Figure 3.The data sets are consisted of numerous original images recording the drilling core pieces.After the model training, the characteristics of the fractures between the drilling core pieces are extracted, which is learning by the deep learning model.The drilling core pieces are separated from each other, and each drilling core pieces is obtained.

Calculation of RQD.
To classify and evaluate the rock mass quality quantitatively, RQD is introduced, which is the summation of lengths of drilling core pieces greater than 10 cm divided by the length of the core run, namely: Lengths of drilling core pieces greater than 10 cm Length of the core run : After the image segmentation, each drilling core piece is separated, to calculate the RQD value, the key aspect is to measure the length of each drilling core piece.To obtain the length of the drilling core piece, we need to know the real length of each pixel.Since the box size is known, by summing the number of the pixel of the box length, we can know the length of each pixel.After knowing the length of each pixel, we sum the number of the pixel of each drilling core piece, and the length of each drilling core piece is calculated, as shown in Figure 4. Knowing the length data, the RQD value is calculated, and the formula is as follows: where l i is the length of the ith drilling core piece greater than 10 cm, l is the length of the core run, and β is the scale coefficient, depending on the size of the image.

Application
It is necessary to verify the effectiveness of the developed approach for automatic calculation of RQD, the boreholes from the Shapingba Railway Comprehensive Reconstruction Project was identified.The project is a large-scale comprehensive hub project renovated on the former Shapingba Railway Station, which is a key construction project of the Chongqing Municipal Government, which is essential to upgrade the appearance of the city.The whole project site area is flat, the terrain slope angle is small.Figure 5 shows four original drilling core photographs.
To make the image treatment more accurate, the perspective correction of the original core images is conducted.After the perspective correction, the core images are more accurate and reliable.Next, with the object detection algorithm, the segmentation of drilling core pieces is implemented, as shown in Figure 6.
The main difficulty in object detection is dealing with data sets whose interclass variance is low, namely, the similarity of a few classes is high.Figure 7 shows the figure of the normalized confusion matrix.It seems that the model is most likely to misclassify some labels, which represents that the similarity of different classes is low.Furthermore, Figure 8 shows the F1-confidence, precision-confidence, precision-recall, and recall-confidence curves of the model.It is observed that the precision of the model increases with the confidence increasing, which means that the model is reliable.Importantly, at high precision, the recall rate is small, namely, the model is accurate.
The segmentation of drilling core pieces is the essence of the model, which is the basis of the calculation of RQD.After the segmentation of drilling core pieces, to obtain RQD, the lengths of the drilling core pieces need to be calculated.Traditionally, the lengths of the drilling core pieces are measured manually, which is labor-expensive and time-consuming.To improve the level of intelligence in geological engineering, the lengths of the drilling core pieces are calculated automatically.Sometimes, the drilling core is not always composed of rock, there is something else, for example, soil.Therefore, the rock in the drilling core is labeled first, as shown in Figure 9.After labeling the rock in the drilling core, the lengths of the

Advances in Civil Engineering
drilling core pieces are measured automatically, as shown in Figure 10.
To test the performance of the proposed approach, 10 boreholes from Shapingba Railway Comprehensive Reconstruction Project are adopted to conduct the case study.Compared to the traditional manual approach, RQD obtained by the proposed approach is relatively accurate, namely, the maximum error is less than 10%, and the average error is around 5%, as listed in Table 1.More importantly, the present approach is much more efficient, compared to the traditional manual measure, the time consumed by the present approach is less than 70%.

Discussion
The present work provides an automatic approach to calculate RQD, which is accurate and efficient.We should point out that there are some points to be improved in the future, including: (1) Sometimes, the fractures are not natural, they may be mechanical fractures caused by the drilling process, which is difficult to be accurately recognized by the segmentation model.Consequently, the mechanical fractures are classified into the natural fractures,  Advances in Civil Engineering leading to the incorrect segmentation of the drilling core pieces, the lengths of the drilling core pieces become smaller, as a result, the obtained RQD value is smaller by the image treatment process.We should point out that mechanical fractures do not always affect the RQD calculation significantly.The RQD value is the sum of the lengths of the drilling core pieces greater than 10 cm divided by the length of the core run, the lengths of the drilling core pieces less than 10 cm are irrelevant to the calculation of the RQD value.Only when the mechanical fractures appear between the drilling core pieces greater than 10 cm, the calculation of the RQD value is affected, namely, the RQD value becomes smaller, otherwise, the RQD value is not affected.As shown in Figure 11, the length of the drilling core piece is 30 cm, which is greater than 10 cm, and a mechanical fracture appears between the drilling core piece, with the segmentation model, the drilling core piece is divided into two parts, one part 9 cm, less than 10 cm, and the other part 21 cm, greater than 10 cm, thus, the calculated RQD value becomes smaller than the realistic one.(2) Sometimes, the two drilling core pieces are very close, and it is very difficult to segment them for the segmentation algorithm, as a result, the two drilling core pieces are recognized to be a single drilling core piece.The two and more short drilling core pieces less than 10 cm are recognized to be a single drilling core piece, and the length of the grouped drilling core piece may be greater than 10 cm, thus, the calculated RQD value may be greater than the realistic one.It should be pointed out that it is not always leading to a greater RQD value, when the lengths of the two drilling core pieces are greater than 10 cm, the result is not affected.
Only when the lengths of the two adjacent drilling core pieces are both less than 10 cm, or one of them less than 10 cm, at the same time, the length of the group is greater than 10 cm, the calculated RQD value is greater than the true value.As shown in Figure 12, the two adjacent drilling core pieces are too close, and the segmentation model is unable to segment them.It is clear that the lengths of the two drilling core pieces are both less than 10 cm; however, as they are recognized to be a single piece, the length of the grouped piece is greater than 10 cm, consequently, the calculated RQD value becomes greater.(3) To acquire the original image of the drilling cores, sometimes, a marking paper piece masks the drilling core, the length of the drilling core piece covered by the marking paper is misunderstood; consequently, there are errors in the RQD calculation.As shown in Figure 13, a drilling core piece at the bottom right core of the box is covered partly by a paper piece.Actually, the length of the drilling core piece is represented by the red line, which is greater than 10 cm.Since a part of the drilling core piece is covered, the object detection model is unable to recgonized it, as a result, the length represented by the green line is used to calculate the RQD value, obviously, it is smaller than the actual RQD value.
The object detection model needs to be developed further, which is able to remove the cover, though it is difficult at the present.One feasible way is that the image should be taken carefully, namely, the drilling core pieces should not be covered by other things.

Conclusions
In the construction of the civil engineering infrastructure, the noise and vibration are affected by the geological conditions, adopting specific construction techniques based on the geological   Advances in Civil Engineering conditions is of great significance in suppressing the noise and vibration caused by the construction.A new image treatment process to calculate RQD automatically with the aid of the object detection and image segmentation is developed.The proposed framework includes four parts, namely, perspective correction, object detection, segmentation of the drilling core pieces, and calculation of RQD.By inputting the original core images from the engineering sites, the image treatment process can calculate the value of RQD automatically, and the accuracy can meet the engineering needs, where the average difference is less than 5%.More importantly, the automatic image treatment process is much more efficient, namely, the time consumed is less than 70%, where much labor work is saved.The proposed framework provides an alternative approach for geological engineers to obtain RQD accurately and efficiently, which can improve the level of intelligence in the geological and mining engineering.However, to acquire accurate RQD values in the practice, some cautions should be conducted: (1) avoiding the mechanical fractures of the drilling cores artificially, which may decrease the calculated RQD values, (2) keeping the two adjacent drilling core pieces apart, namely, avoiding them too close to be segmented, the calculated RQD values may be greater, and (3) taking the original images of the drilling cores carefully, avoiding the drilling cores to be covered by other things.
Due to the complexity of the engineering site, this algorithm still has some limitations, such as difficulty in distinguishing between artificial cracks and natural cracks, insufficient recognition of very close rock core fragments, and unsuitable RQD calculation for drilling core cake.In future work, we will continue to improve the algorithm and continuously enhance the level of automated identification of drilling cores.

FIGURE 1 :
FIGURE 1: Drilling core images before (a) and after (b) the perspective correction.

FIGURE 2 :FIGURE 5 :
FIGURE 2: SAM has three components, namely, an image encoder, a flexible prompt encoder, and a fast mask decoder.

FIGURE 4 :
FIGURE 4: Calculation of lengths of drilling core pieces.Data sets

FIGURE 9 :FIGURE 10 :
FIGURE 9: Rock in the drilling core is labeled first.

FIGURE 11 :
FIGURE 11: The mechanical fractures affect the calculation of the RQD values.

FIGURE 12 :
FIGURE 12: The two drilling core pieces are too close, and the segmentation model is unable to segment them.

FIGURE 13 :
FIGURE 13:  The drilling core piece is covered partly by the paper piece, which affects the measurement of the length of the drilling core piece.

TABLE 1 :
Comparison of RQD values between manual measurement and the present approach.