Tunnel muck pile lumpiness identification method and system based on YOLO11n-seg and electronic equipment
By improving the YOLO11n-seg network model, combining the SimAM attention mechanism and the Inner-CIoU loss function, the accuracy and efficiency of tunnel blasting rock block recognition are solved, and automated classification and dimensional measurement in tunnel construction are realized, which improves the safety and efficiency of engineering management.
Patent Information
- Application Number
- CN202510222368.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional tunnel blasting rock block recognition methods have low accuracy and poor processing efficiency when facing complex blasting rock piles, making it difficult to achieve automated classification and size measurement.
The improved YOLO11n-seg network model is adopted, combined with the SimAM attention mechanism, WSC3k2 module and Inner-CIoU loss function, the training process is optimized, and block recognition is achieved by calculating block geometric features and shape analysis.
It improves the identification accuracy and automated classification capabilities of rock blocks after tunnel blasting, provides reliable data support, and improves engineering safety and efficiency.
Smart Images

Figure CN120259837A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel engineering detection, and particularly relates to a method for identifying the fragmentation size of tunnel blast muck based on YOLO11n-seg. Background Art
[0002] Tunnels play an important role and significance in many fields such as transportation, water conservancy projects, mining, military defense, and construction projects. It can not only improve transportation efficiency, promote economic development, but also improve residents' lives, with significant social and economic benefits. In recent years, with the progress of social and economic levels, tunnel engineering construction has entered a new stage of development. Identifying the fragmentation size of tunnel blasting rocks is one of the crucial tasks in tunnel construction. Especially in tunnel blasting projects, accurately identifying the fragmentation distribution of rocks after blasting is crucial for construction progress, blasting effect evaluation, and subsequent excavation work.
[0003] Currently, the main methods for analyzing the fragmentation distribution of blasted rocks are visual inspection method, screening method, and image processing technology. The visual inspection method mainly relies on the experience of blasting production technicians, and the judgment has certain subjectivity; while the screening method can provide relatively accurate results, but it has a large workload and low efficiency, and is not suitable for large-scale use. With the rapid development of computer vision and deep learning technologies, the method for identifying rock fragmentation size based on image processing and artificial intelligence has gradually become a new trend. Among them, the YOLO (You Only Look Once) series of algorithms are outstanding in real-time identifying and locating objects in images due to their fast and accurate object detection capabilities, and have been widely used in fields such as traffic monitoring, driverless, and industrial inspection. Therefore, researching a method for identifying the fragmentation size of tunnel blast muck using the YOLO 11n-seg algorithm, which can automatically identify blasted rocks of different sizes, can significantly improve the automation and accuracy of rock fragmentation identification, and provide a scientific basis for subsequent blasting effect evaluation, construction adjustment, and safety management. Summary of the Invention
[0004] Aiming at the problems existing in the prior art, the present invention aims to solve the problems such as low accuracy and poor processing efficiency of traditional fragmentation identification methods when facing complex blast muck, and can realize automatic classification and size measurement of rock blocks after tunnel blasting, provide reliable data support for tunnel construction and subsequent project management, and improve the safety and efficiency of the project.
[0005] In order to achieve the above object, the technical solutions adopted by the present invention are as follows:
[0006] A method for identifying the fragmentation size of tunnel blast muck based on YOLO11n-seg, comprising the following steps,
[0007] S1: Construct an improved YOLO11n-seg network model for tunnel muck fragmentation recognition;
[0008] S2: Obtain the tunnel blasting images to be recognized and input them into the improved YOLO11n-seg network model;
[0009] S3: Based on the segmentation results of the improved YOLO11n-seg network model, calculate the block volume and divide the block volume interval to achieve the recognition of muck fragmentation.
[0010] Furthermore, the specific operations in step S1 include the following steps:
[0011] S101: Add the SimAM attention mechanism to the output result of the Bottleneck module of the traditional YOLO11n-seg network model to form a new Bottleneck_SimAM module;
[0012] S102: Replace the two traditional convolution operations in the C3k2 module of the traditional YOLO11n-seg network model with WTConv + BatchNormalization + SiLU;
[0013] S103: Use the Inner-CIoU loss function as the loss function of the improved YOLO11n-seg network model;
[0014] S104: Optimize and train the improved YOLO11n-seg network model constructed in step S103.
[0015] Furthermore, the Inner-CIoU loss function described in step S103 is
[0016] L Inner-CIoU =L CIou +IoU-IoU Inner
[0017] where L CIoU is the bounding box regression loss function based on CIoU, IoU is the standard intersection over union, and IoU Inner is the IoU loss function based on the auxiliary bounding box.
[0018] Furthermore, the specific operations in step S104 include the following steps:
[0019] S1041: Obtain the muck rock images after blasting and divide them into a training set and a validation set;
[0020] S1042: Preprocess the muck rock images obtained in step S1041;
[0021] S1043: Train and optimize the improved YOLO11n-seg network model using the mucked rock images in the training set, and determine the model parameters of the improved YOLO11n-seg network model;
[0022] S1044: Verify the model parameters using the mucked rock images in the validation set.
[0023] Further, the specific operations in step S3 include the following steps:
[0024] S301: Determine the ratio of pixels to the actual size based on the output image of the improved YOLO11n-seg network model;
[0025] S302: Extract the geometric shape information of the segmented region;
[0026] S303: Analyze the block geometric features and comprehensive features based on the extracted geometric shape information;
[0027] S304: Calculate the block volume and divide the block volume interval.
[0028] Further, the method for determining the ratio of pixels to the actual size in step S301 is:
[0029]
[0030] where Meter-per-pixel represents the actual distance corresponding to each pixel in the image.
[0031] Further, the specific operations in step S303 include the following steps:
[0032] S3031: For each block, first use the minimum bounding rectangle to determine the major axis and minor axis;
[0033] S3032: Then use the maximum inscribed ellipse to describe the shape of the block and determine the major axis and minor axis;
[0034] S3033: Average the major axis and minor axis of the minimum bounding rectangle and the maximum inscribed ellipse to obtain the final major axis and minor axis of the block.
[0035] Further, the specific operations in step S304 include the following steps:
[0036] S3041: When the ratio of the major axis to the minor axis is less than 1.2, use the minor axis as the diameter, and the area of the fitted circle is used as the equivalent area of the block;
[0037] S3042: When the ratio of the major axis to the minor axis is greater than 1.2 and less than 1.8, use the area of the ellipse fitted by the major axis and minor axis as the equivalent area;
[0038] S3043: When the ratio of the major axis to the minor axis is greater than 1.8, the area of the rectangle fitted by the major axis and the minor axis is used as the equivalent area.
[0039] Furthermore, the present invention also includes a tunnel blast muck fragmentation recognition system based on YOLO11n-seg, which includes an improved YOLO11n-seg network model module and a data analysis module;
[0040] The improved YOLO11n-seg network model module is provided with an improved YOLO11n-seg network model for tunnel blast muck fragmentation recognition;
[0041] The data analysis module statistically analyzes the rock particle size based on the segmentation result of the improved YOLO11n-seg network model and calculates the blasting fragmentation;
[0042] Among them, both the improved YOLO11n-seg network model module and the data analysis module are implemented by the methods described above.
[0043] Furthermore, the present invention also includes an electronic device, which includes at least one processor and a memory communicatively connected to the processor; wherein, the memory stores instructions executable by the processor, and when the instructions are executed by the processor, the processor can execute the methods described above.
[0044] The beneficial effects of the present invention are as follows:
[0045] Based on the YOLO11n-seg algorithm, the present invention uses the WSC3k2 module to replace the C3k2 module in the original YOLOn-seg, enhancing the network's focusing ability on important information; finally, the Inner-IoU is used to improve the loss function. The improved model can accurately identify the shape, size, and distribution of tunnel blast rock blocks, and can effectively distinguish rock blocks of different sizes and shapes. Especially in the case of a complex blast muck environment and irregular rock block shapes, it can still maintain a high recognition accuracy. Through this method, automatic classification and size measurement of rock blocks after tunnel blasting can be achieved, providing reliable data support for tunnel construction and subsequent project management, and improving the safety and efficiency of the project. Description of the Drawings
[0046] Figure 1 It is the structure diagram of the Bottleneck_SimAM module in the present invention.
[0047] Figure 2 It is the structure diagram of the WSC3k2 module in the present invention.
[0048] Figure 3 It is the schematic diagram of Inner-IoU in the present invention.
[0049] Figure 4 This is the structural diagram of the improved YOLO11n-seg model in the present invention.
[0050] Figure 5 This is the comparison chart of the mAP@0.5 between the original YOLOn_seg model and the improved model in the present invention.
[0051] Figure 6 This is the comparison chart of the model segmentation effects in the present invention. Specific Embodiments
[0052] In order to enable those of ordinary skill in the art to better understand the technical solution of the present invention, the technical solution of the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0053] Embodiment 1
[0054] A method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg includes the following steps:
[0055] S1: Construct an improved YOLO11n-seg network model for identifying the fragmentation size of tunnel muck piles;
[0056] S101: Add the SimAM attention mechanism to the output result of the Bottleneck module in the traditional YOLO11n-seg network model to form a new Bottleneck_SimAM module;
[0057] Specifically, the Bottleneck module mainly includes two convolutional layers. The first convolutional layer reduces the number of input channels c1 to an intermediate number of channels c_ (usually half of the number of output channels c2). The second convolutional layer restores the intermediate number of channels c_ to the number of output channels c2. If the number of input channels c1 is the same as the number of output channels c2 and shortcut = True, the residual connection will be enabled, that is, the input features will be directly added to the output features to form a skip connection. This structure can help the network better retain and utilize the input features, alleviate the gradient disappearance problem, and accelerate the training convergence. In the present invention, the SimAM attention mechanism is added to the output result of the Bottleneck module to form a new Bottleneck_SimAM module. The SimAM is used to re-weight the feature information after shunt fusion with attention, and using the SimAM attention module will not increase the model parameters. The structural diagram of the improved Bottleneck_SimAM module is as shown in the appendix Figure 1 as follows.
[0058] S102: Replace the two traditional convolutional operations in the C3k2 module of the traditional YOLO11n-seg network model with WTConv+BatchNormalization+SiLU;
[0059] Specifically, by introducing WTConv for multi-scale feature extraction, various sizes and shapes of objects can be better processed. At the same time, batch normalization is used to improve the stability of training, and the SiLU activation function is used to enhance the non-linear expression ability of the network.
[0060] The structural diagram of the WSC3k2 module obtained by combining the above two improved parts is shown in the appendix Figure 2 as follows.
[0061] S103: Use the Inner-CioU loss function as the loss function for improving the YOLO11n-seg network model;
[0062] Specifically, CIoU (Complete Intersection over Union) is an improved IoU (Intersection over Union) loss function designed to optimize the bounding box regression problem in object detection. The CIoU loss function not only considers the overlapping area of the bounding boxes (the intersection part), but also introduces factors such as the distance between the center points, the aspect ratio, and the angular deviation, thus providing a more comprehensive optimization criterion in the regression task. The formula for the CIoU loss function is as follows:
[0063]
[0064] where B is the predicted box, B gt is the ground truth box, and IoU is the ratio of the intersection area to the union area of the predicted box and the ground truth box. It measures the degree of overlap between the boxes;
[0065] ρ 2 (b, b gt ) is the square of the distance between the center points of the predicted box and the ground truth box, representing the distance between the center points of the two boxes. This part measures the closeness of the center point of the predicted box to the center point of the ground truth box. The smaller the distance between the center points, the smaller the loss;
[0066] c 2 is the square of the maximum value of the diagonal lengths of the ground truth box and the predicted box. It is used to measure the size or scale of the box;
[0067] α is a weight coefficient, and v is used to measure the consistency of the relative proportions of the two rectangular boxes. Its calculation formula is as follows:
[0068]
[0069] where: w gt and h gt are the width and height of the ground truth box respectively, and w and h are the width and height of the anchor box respectively.
[0070] Inner-IoU can be regarded as an improvement over the standard IoU, aiming to refine the calculation of the region overlap degree. Different from the conventional IoU, the calculation method of Inner-IoU emphasizes the inner product region of the bounding boxes rather than just the outer boundaries of the boxes, which has better adaptability for small object detection and target bounding boxes with extreme aspect ratios.
[0071] Attached Figure 3 is a schematic diagram of Inner-IoU, where B gt and B are the ground truth box and the predicted anchor box respectively, and the center point inside the ground truth box is the center point inside the predicted anchor box is (x c , y c ), the width and height of the ground truth box are represented by w gt and h gt respectively, while the width and height of the anchor box are represented by w and h respectively. The variable "ratio" corresponds to the scale factor, and its usual value range is [0.5, 1.5]. The specific definition of Inner-IoU is as follows:
[0072]
[0073] union=(w gt ×h gt )×(ratio) 2 +(w + h)×(ratio 2 -inter
[0074]
[0075] where, is the left boundary coordinate of the ground truth box, the right boundary coordinate of the ground truth box, the upper boundary coordinate of the ground truth box, the lower boundary coordinate of the ground truth box, b l the left boundary coordinate of the predicted anchor box, b r the right boundary coordinate of the predicted anchor box, b t the upper boundary coordinate of the predicted anchor box, b b the lower boundary coordinate of the predicted anchor box, inter is the intersection area of the ground truth box and the predicted anchor box, union is the union area of the ground truth box and the predicted anchor box, IoU inner IoU loss function based on the auxiliary bounding box.
[0076] For the dataset of the present invention, set the scale factor ratio = 0.75 to generate an auxiliary bounding box smaller than the actual bounding box, which is used to calculate the loss for high IoU samples to accelerate convergence. Replace the original CIoU with Inner-CIoU, and the specific definition is as follows:
[0077] L Inner-CIoU = L CIoU + IoU - IoU Inner
[0078] Among them, I CIoU is the bounding box regression loss function based on CIoU, IoU is the standard intersection over union, and IoU Inner is the IoU loss function based on the auxiliary bounding box.
[0079] Combined with the above three improved YOLO11n-seg model structure diagrams are as shown in the appendix Figure 4 as follows.
[0080] S104: Optimize and train the improved YOLO11n-seg network model constructed in step S103.
[0081] S1041: Obtain the mucked rock images after blasting, and divide them into a training set and a validation set;
[0082] S1042: Preprocess the mucked rock images obtained in step S1041;
[0083] Specifically, first is data cleaning, check whether the data has missing, blurred, damaged or low-quality images, and perform necessary repairs or deletions; then perform image enhancement, enhance the image diversity through rotation, scaling, cropping, color adjustment, etc., and improve the generalization ability of the model. Finally, perform normalization to unify the size, resolution and color channels of the images for subsequent processing.
[0084] S1043: Use the mucked rock images in the training set to train and optimize the improved YOLO11n-seg network model, and determine the model parameters of the improved YOLO11n-seg network model;
[0085] S1044: Use the mucked rock images in the validation set to verify the model parameters.
[0086] Furthermore, step S2: Obtain the tunnel blasting image to be recognized and input it into the improved YOLO11n-seg network model;
[0087] Furthermore, step S3: Based on the segmentation results of the improved YOLO11n-seg network model, calculate the block volume and divide the block volume interval to realize the recognition of the muck fragmentation.
[0088] S301: Determine the ratio of pixels to actual size according to the output image of the improved YOLO11n-seg network model;
[0089] Specifically, by reading the model segmentation result map and displaying the image using OpenCV, manually mark the starting point and ending point of the benchmark in the image, and draw a straight line for the benchmark. Then, calculate the Euclidean distance between these two marked points to obtain the pixel length of the benchmark. Given that the actual length of the benchmark is 1 meter, calculate the ratio of pixels to the actual size:
[0090]
[0091] where Meter-per-pixel represents the real distance corresponding to each pixel in the image. Through this ratio, convert the number of pixels in the image into actual length units.
[0092] S302: Extract the geometric shape information of the segmented region;
[0093] Specifically, after obtaining the ratio of pixels to the actual size, next, extract the contour information of each segmented region from the rock mass segmentation result output by the model. These contours will be used to analyze the geometric shape of each block.
[0094] S303: Analyze the geometric and comprehensive features of the blocks based on the extracted geometric shape information;
[0095] Specifically, for each block, first use the minimum bounding rectangle to determine its major axis and minor axis. The minimum bounding rectangle is a rectangle that encloses the contour of the block, and its major axis and minor axis are the long side and short side of the rectangle respectively. This provides a preliminary description of the geometric shape of the block. Next, further describe the shape of the block through the maximum inscribed ellipse. The maximum inscribed ellipse is the ellipse that is maximally embedded in the block contour, and its major axis and minor axis represent the major and minor axes of the ellipse respectively. This step can more accurately capture the shape of the block, especially the geometric features in different directions.
[0096] After obtaining the major and minor axes of the minimum bounding rectangle and the maximum inscribed ellipse, average the major and minor axes of the two to obtain the final major and minor axes of the block. This way of combining the two description methods helps to more comprehensively reflect the geometric features of the block.
[0097] S304: Calculate the volume of the block and divide the block volume interval.
[0098] Specifically, according to the comprehensive geometric feature (ratio of major axis to minor axis), the volume can be estimated according to different shapes. According to the different ratios of major axis to minor axis, the shapes of the blocks can be divided into the following categories:
[0099] Ratio of major axis to minor axis less than 1.2: The shape of the block is close to a circle or a sphere, usually indicating that the block is relatively uniform and regular, and the fragmentation effect is better. At this time, use the minor axis as the diameter, and the area of the fitted circle as the equivalent area of the block;
[0100] The ratio of the major axis to the minor axis is greater than 1.2 and less than 1.8: The shape of the block tends to be oblong or oval. At this time, the area of the ellipse fitted by the major axis and the minor axis is used as the equivalent area;
[0101] The ratio of the major axis to the minor axis is greater than 1.8: The shape of the block is close to oblong. At this time, the area of the rectangle fitted by the major axis and the minor axis is used as the equivalent area.
[0102] According to the size of the equivalent area, the volume of the block can be further divided into different intervals, so as to statistically analyze the fragmentation degree. These volume intervals will help to quantify the blasting effect and the rock particle size distribution, and then evaluate the blasting fragmentation.
[0103] Embodiment 2
[0104] Embodiment 2 provides a tunnel blast muck fragmentation recognition system based on YOLO11n-seg, including an improved YOLO11n-seg network model module and a data analysis module;
[0105] The improved YOLO11n-seg network model module is provided with an improved YOLO11n-seg network model for tunnel blast muck fragmentation recognition, and the specific process corresponds to steps S1 and S2 in Embodiment 1;
[0106] The data analysis module statistically analyzes the rock particle size based on the segmentation result of the improved YOLO11n-seg network model and calculates the blasting fragmentation, and the specific process corresponds to step S3 in Embodiment 1.
[0107] Embodiment 3
[0108] Embodiment 3 provides an electronic device, including at least one processor and a memory communicatively connected to the processor; wherein, the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the processor to perform the tunnel blast muck fragmentation recognition method as described in Embodiment 1.
[0109] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. What is described in the above embodiments and the specification only illustrates the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for identifying the fragmentation of tunnel muck piles based on YOLO11n-seg, characterized in that, It includes the following steps, S1: Construct an improved YOLO11n-seg network model for tunnel muck fragmentation recognition; S2: Obtain the tunnel blasting images to be recognized and input them into the improved YOLO11n-seg network model; S3: Based on the segmentation results of the improved YOLO11n-seg network model, calculate the block volume and divide the block volume interval to achieve the recognition of muck fragmentation.
2. The tunnel muck fragmentation recognition method based on YOLO11n-seg according to claim 1, wherein, The specific operations of step S1 include the following steps, S101: Add the SimAM attention mechanism to the output result of the Bottleneck module of the traditional YOLO11n-seg network model to form a new Bottleneck_SimAM module; S102: Replace the two traditional convolution operations in the C3k2 module of the traditional YOLO11n-seg network model with WTConv+BatchNormalization+SiLU; S103: Use the Inner-CioU loss function as the loss function of the improved YOLO11n-seg network model; S104: Optimize and train the improved YOLO11n-seg network model constructed in step S103.
3. The method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg according to claim 2, wherein The Inner-CIoU loss function described in step S103 is L Inner-CIoU = L CIou + IoU - IoU Inner Among them, L CIoU is the bounding box regression loss function based on CIoU, IoU is the standard intersection over union, and IoU Inner is the IoU loss function based on the auxiliary bounding box.
4. A method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg according to claim 2, characterized in that The specific operations of step S104 include the following steps, S1041: Obtain the muck rock images after blasting and divide them into a training set and a validation set; S1042: Preprocess the muck rock images obtained in step S1041; S1043: Use the muck rock images in the training set to train and optimize the improved YOLO11n-seg network model to determine the model parameters of the improved YOLO11n-seg network model; S1044: Use the muck rock images in the validation set to verify the model parameters.
5. A method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg according to claim 1, characterized in that, The specific operations of step S3 include the following steps, S301: Determine the ratio of pixels to actual size according to the output image of the improved YOLO11n-seg network model; S302: Extract the geometric shape information of the segmentation area; S303: Analyze the block geometric features and comprehensive features according to the extracted geometric shape information; S304: Calculate the block volume and divide the block volume interval.
6. A method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg according to claim 5, characterized in that, The method for determining the ratio of pixels to actual size in step S301 is, where, Meter-per-pixel represents the real distance corresponding to each pixel in the image.
7. A method for identifying the fragmentation size of tunnel muck piles based on YOLO11n-seg according to claim 5, characterized in that, The specific operations of step S303 include the following steps, S3031: For each block, first use the minimum bounding rectangle to determine the major axis and minor axis; S3032: Then use the maximum inscribed ellipse to describe the shape of the block and determine the major axis and minor axis; S3033: Average the major axis and minor axis of the minimum bounding rectangle and the maximum inscribed ellipse to obtain the major axis and minor axis of the final block.
8. A method for identifying the fragmentation of tunnel muck piles based on YOLO11n-seg according to claim 5, characterized in that The specific operations of step S304 include the following steps, S3041: When the ratio of the major axis to the minor axis is less than 1.2, use the minor axis as the diameter and the area of the fitted circle as the equivalent area of the block; S3042: When the ratio of the major axis to the minor axis is greater than 1.2 and less than 1.8, the area of the ellipse fitted by the major axis and the minor axis is used as the equivalent area; S3043: When the ratio of the major axis to the minor axis is greater than 1.8, the area of the rectangle fitted by the major axis and the minor axis is used as the equivalent area.
9. A tunnel muck fragmentation recognition system based on YOLO11n-seg, characterized in that: It includes an improved YOLO11n-seg network model module and a data analysis module; An improved YOLO11n-seg network model for tunnel muck fragmentation recognition is provided in the improved YOLO11n-seg network model module; The data analysis module statistically analyzes the rock particle size based on the segmentation results of the improved YOLO11n-seg network model and calculates the blasting fragmentation; Among them, both the improved YOLO11n-seg network model module and the data analysis module are implemented by using the tunnel muck fragmentation recognition method described in any one of claims 1-8.
10. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the processor; wherein, the memory stores instructions executable by the processor, and the instructions are executed by the processor so that the processor can execute the tunnel muck fragmentation recognition method described in any one of claims 1-8.
Citation Information
Cited By
Tunnel blasting lumpiness statistical method based on infrared imaging
CN120912583A
A statistical method for tunnel blasting block size based on infrared imaging
CN120912583B
Model training method, rock slag feature extraction method and device
CN121904516A
A model training method and device and a rock slag feature extraction method and device
CN121904516B