Method and system for identifying half hole after tunnel blasting based on image vision

By constructing a dual-domain architecture of half-hole feature encoder and shadow interference encoder, the problem of low accuracy caused by shadow interference in half-hole identification after tunnel blasting is solved, realizing accurate identification and complete reconstruction of half-hole features, and improving identification efficiency and safety.

CN122048802APending Publication Date: 2026-05-15CHINA RAILWAY 14TH CONSTR BUREAU GRP 4TH ENG
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA RAILWAY 14TH CONSTR BUREAU GRP 4TH ENG
Filing Date
2025-12-30
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing image visual recognition methods suffer from low accuracy in identifying half-holes after tunnel blasting due to shadow interference, and cannot fully identify half-hole features.

Method used

A dual-domain parallel architecture of half-hole feature encoder and shadow interference encoder is adopted to extract half-hole features and shadow interference features respectively. Then, attention weight optimization is used, and density clustering algorithm is combined to select effective half-hole clusters to repair the broken contour.

Benefits of technology

It achieves accurate identification of half-holes in shadow environments, reduces the probability of false positives, improves identification efficiency, and ensures the integrity of half-hole features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048802A_ABST
    Figure CN122048802A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of pre-splitting blasting blast hole identification, in particular to a tunnel blasting rear half hole identification method and system based on image vision. Comprising the steps of obtaining a tunnel face image containing a standard mark half-hole calibration target, sequentially executing illumination correction and rock debris noise reduction processing, converting the processed image into a grayscale image and a color image, constructing a candidate region recognition model, primarily screening half-hole candidate regions by utilizing the candidate region recognition model, and outputting candidate region masks; constructing a half-hole feature encoder and a shadow interference encoder, introducing quantitative indexes of half-hole feature confidence and shadow interference intensity to calculate an attention weight, and outputting an optimized half-hole feature map through residual connection; effective half-hole clusters in the optimized half-hole feature map are screened through a density clustering algorithm, and actual half-hole parameters and the half-hole rate of the tunnel face are calculated based on the effective half-hole clusters. Half-hole exclusive features are extracted, shadow interference is suppressed in a targeted manner, and accurate identification of half-holes in a shadow environment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pre-splitting blast hole identification technology, and in particular to a method and system for identifying half-holes after tunnel blasting based on image vision. Background Technology

[0002] A half-hole refers to the hole wall structure remaining on the blast outline after a pre-drilled cylindrical blast hole is blasted in tunnel blasting operations. Its cross-section is arc-shaped, retaining part of the original blast hole's wall morphology and depth traces. The half-hole ratio after tunnel blasting is a core indicator for evaluating the quality of smooth blasting, directly reflecting the degree of surrounding rock damage, the rationality of blasting parameters, and the safety of tunnel construction. Its accurate identification is of great significance for tunnel engineering quality control. With the development of image vision technology, image-based half-hole recognition methods, due to their non-contact and high-efficiency advantages, are gradually replacing traditional manual measurement methods and have become a research hotspot in the industry.

[0003] However, the working conditions at the tunnel face are complex, with rock blocks and uneven lighting easily creating numerous shadow areas. This leads to a high degree of coupling between the contours and annular textures of the half-holes and the gray-scale abrupt changes and edge features of the shadows when using image recognition methods to calculate the half-hole ratio. This problem restricts the accuracy of existing image visual recognition methods: on the one hand, existing half-hole recognition methods mostly extract half-hole features separately and perform gray-scale enhancement processing, but do not design targeted suppression mechanisms for shadow interference. This can easily lead to misjudging shadow edges as half-hole features, or the half-hole contours being broken due to shadow occlusion, making complete recognition impossible. On the other hand, general shadow removal methods are not adapted to half-hole features. During the shadow removal process, key information such as the annular texture and gray-scale contrast of the half-holes is easily destroyed, further reducing the recognition accuracy.

[0004] Therefore, how to extract the specific features of a half-hole while specifically suppressing shadow interference to achieve accurate identification of half-holes in shadow environments is a problem that needs to be solved in the current identification of half-holes after tunnel blasting. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a method and system for identifying half-holes after tunnel blasting based on image vision.

[0006] In a first aspect, the present invention provides a method for identifying half-holes after tunnel blasting based on image vision, which adopts the following technical solution: A method for identifying half-holes after tunnel blasting based on image vision, comprising: S1. Obtain images of the tunnel face containing standard-marked half-hole calibration targets, and generate a panoramic image by stitching together multiple tunnel face images. S2. Perform illumination correction and rock debris noise reduction on the panoramic image in sequence, convert the processed image into grayscale image and color image, construct a candidate area recognition model, use the candidate area recognition model to initially screen the half-hole candidate area, and output the candidate area mask; S3. Construct a half-hole feature encoder and a shadow interference encoder. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. S4. Perform dimension unification and position encoding on the half-aperture feature map and the shadow feature map, introduce the half-aperture feature confidence and shadow interference intensity quantification index to calculate attention weights, and output the optimized half-aperture feature map through residual connection. S5. Optimize the half-hole feature map by using density clustering algorithm to select effective half-hole clusters, and calculate the actual half-hole parameters and the half-hole ratio of the working face based on the effective half-hole clusters.

[0007] Furthermore, the acquisition of the tunnel face image containing the standard marked semi-circular calibration target includes constructing a semi-circular calibration target consisting of a standard semi-circular marker, a grayscale calibration block, and a coordinate origin. The diameter of the standard semi-circular marker is adapted to the diameter of the tunnel blast hole and is used to calibrate the conversion factor between pixels and actual size.

[0008] Furthermore, the sequential application of illumination correction and rock debris noise reduction processing to the panoramic image includes: S2.1. Based on the preset standard grayscale value of the grayscale calibration block in the half-aperture calibration target, read the measured grayscale value of the corresponding grayscale calibration block in the panoramic image, and calculate the illumination compensation coefficient of each pixel. The formula is as follows: ,in, The illumination compensation coefficients for each pixel are... The measured grayscale value is... To obtain a light-corrected image, the grayscale value of the original panoramic image is corrected using the light compensation coefficient, based on a preset standard grayscale value. S2.2. Construct a three-dimensional voxel grid, perform voxel filtering on the illumination-corrected image, generate representative pixel values ​​for each voxel through aggregation rules, use the region growing method, merge similar pixels according to the growth rule that the gray-level difference between neighboring pixels is less than the preset difference, and remove rock debris pixels whose gray-level values ​​exceed the preset gray-level range to obtain the denoised image.

[0009] Furthermore, the step of using the candidate region recognition model to initially screen candidate regions for half-holes and output candidate region masks includes: the candidate region recognition model is constructed based on a deep learning network, and supervised training is performed using the arc contour features and ring texture features of the half-holes as labeled samples. During the training process, the cross-entropy loss function is used to optimize the model parameters. The denoised image is input into the candidate region recognition model, and the model outputs candidate region masks.

[0010] Furthermore, the semi-aperture feature encoder takes a grayscale image and a candidate region mask as input, extracts the semi-circular curvature features, annular texture features, and grayscale contrast features of the surrounding rock semi-aperture, and outputs a semi-aperture feature map, including: S3.1. For the candidate region mask, take the pixels in its neighborhood, fit the semicircle equation based on the least squares method, and calculate the corrected semicircle curvature feature, as shown in the formula: ,in, The corrected semicircular curvature feature. To fit the actual curvature of the semicircle, Design the diameter for the blast hole; S3.2. A Gaussian wavelet kernel is used to perform a convolution operation on the pointwise product of the grayscale image and the candidate region mask to obtain texture response values ​​at different scales. The texture response values ​​at each scale are weighted and fused to obtain the ring texture features. S3.3. Calculate the grayscale difference between the candidate region pixel and the pixel in its preset neighborhood, perform mean statistics on the grayscale difference to obtain the grayscale contrast feature of the surrounding rock half-hole, and stitch the semi-circular curvature feature, the annular texture feature and the grayscale contrast feature of the surrounding rock half-hole into a half-hole feature map.

[0011] Furthermore, the shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask, including: S3.4. Edge detection is performed on the grayscale image using an edge detection operator, and the edge gradient value is calculated. The formula is as follows: ,in, These are edge gradient values. , These are edge detection operators in the x and y directions, respectively. For grayscale images, the portion of the edge gradient value that is greater than a preset gradient threshold is selected as the shadow grayscale abrupt change feature. S3.5. Based on the luminance channel information of the color image and the grayscale image, calculate the reflectance using the following formula: ,in, For reflectivity, For the spectral parameters of the light source, Here, f is the color matching function, and f is the rock strength coefficient. For the visible light wavelength range, Given the color temperature of the light source, the abrupt change features of the shadow grayscale and the shadow reflectivity features are concatenated to form a shadow feature map, generating a shadow mask.

[0012] Furthermore, the step of unifying the dimensions and encoding the positions of the half-aperture feature map and the shadow feature map, and calculating attention weights by introducing half-aperture feature confidence and shadow interference intensity quantification indicators, and outputting the optimized half-aperture feature map through residual connection, includes: S4.1. Project the shadow feature map onto the half-hole feature. Figure 1 By unifying the feature dimensions, a shadow feature map with unified dimensions is obtained. S4.2. Sinusoidal position coding is used to add spatial position information to the half-hole feature map and the unified shadow feature map to obtain the encoded half-hole feature map. and encoded shadow features ; S4.3. Based on the extracted half-pore feature map, calculate the half-pore feature confidence score using the following formula: ,in, For the confidence level of the half-pore feature, This represents the maximum value of the ring-shaped texture feature. To preset the upper limit of contrast, The corrected semicircular curvature feature. Based on the grayscale contrast characteristics of the half-hole in the surrounding rock, and the extracted shadow features of the half-hole, the shadow interference intensity is calculated using the following formula: ,in, The intensity of shadow interference. This represents the maximum value of the edge gradient. Reflectivity; S4.4. Generate the query matrix, key matrix, and value matrix, and calculate the attention weights using the following formula: ,in, It is attention weight. For querying the matrix, The key matrix, For dimension normalization term, The interference suppression coefficient is calculated by outputting the optimized half-aperture feature map through residual connection. The formula is as follows: ,in, It is a value matrix.

[0013] Furthermore, the step of filtering effective half-pore clusters in the optimized half-pore feature map using a density clustering algorithm includes: S5.1. The DBSCAN algorithm is used to optimize the half-hole feature map. Perform clustering; S5.2. Clusters with fewer points than the preset number of cluster points are identified as interfering clusters and are removed. S5.3. For the remaining clustering units, calculate the average semicircular curvature, average annular texture, and average gray-level contrast of each cluster, and retain the clusters that satisfy the following conditions: average semicircular curvature is less than a preset curvature threshold, average annular texture is greater than a preset texture threshold, and average gray-level contrast is greater than a preset contrast threshold, as valid semi-pore clusters. S5.4. In the non-shaded areas marked by the shadow mask, complete half-hole clusters are selected, and their features are extracted as feature templates. For the broken segments of the half-hole contours in the shaded areas marked by the shadow mask, feature transfer is performed on the feature templates based on Gaussian sampling rules to achieve the repair of the broken contours.

[0014] Furthermore, the calculation of actual semi-pore parameters and face semi-porosity based on effective semi-pore clustering includes: S5.5. Determine the axial direction of the half-hole cluster by connecting the centers of the semi-circles fitted. Divide the half-hole into multiple pixel segments along the axial direction of the half-hole cluster. Based on the conversion coefficient, convert the pixel length of each pixel segment into the actual length. Sum the actual lengths of each actual length to obtain the actual total length of a single half-hole. S5.6. Calculate the integrity of a single half-hole using the following formula: ,in Design length for blasting holes, This refers to the actual total length of a single half-hole; S5.7. Calculate the half-hole ratio of the tunnel face by summing the actual total lengths of all effective half-holes within the tunnel face. The formula is: ,in, Let be the half-hole ratio at the tunnel face, n be the total number of blasting holes designed at the tunnel face, and i be the index of the effective half-hole. This is the sum of the actual total lengths of the effective half-holes.

[0015] Secondly, a tunnel blasting half-hole recognition system based on image vision includes: The image acquisition module is configured to acquire images of the tunnel face containing standard marked half-hole calibration targets, and generate a panoramic image by stitching together multiple segments of the tunnel face images. The candidate area screening module is configured to sequentially perform illumination correction and rock cutting noise reduction on the panoramic image, convert the processed image into a grayscale image and a color image, construct a candidate area recognition model, use the candidate area recognition model to screen the half-hole candidate areas, and output the candidate area mask. The dual-domain feature encoding module is configured to construct a half-hole feature encoder and a shadow interference encoder. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features, and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. The feature optimization module is configured to unify the dimensions and encode the position of the half-aperture feature map and the shadow feature map, introduce the half-aperture feature confidence and shadow interference intensity quantification index to calculate attention weights, and output the optimized half-aperture feature map through residual connection. The clustering and filtering module is configured to filter effective half-hole clusters in the optimized half-hole feature map using a density clustering algorithm, and calculate the actual parameters of the half-hole and the half-hole ratio at the working face based on the effective half-hole clusters.

[0016] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the image vision-based method for identifying half-holes after tunnel blasting.

[0017] Fourthly, the present invention provides a terminal device, including a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, the instructions being adapted to be loaded and executed by the processor to provide the image vision-based method for identifying half-holes after tunnel blasting.

[0018] In summary, the present invention has the following beneficial technical effects: 1. This invention constructs a dual-domain parallel architecture of a half-hole feature encoder and a shadow interference encoder, which separately extracts features such as the semicircular curvature, annular texture, and gray-scale contrast of the surrounding rock half-hole, as well as interference features such as gray-scale abrupt changes and reflectivity of the shadow. This achieves the separation and extraction of target features and interference features, avoiding the shortcomings of existing technologies that extract half-hole features separately while ignoring shadow interference. Furthermore, by using half-hole feature confidence and shadow interference intensity quantification indicators, combined with region-aware cross-attention calculation of dynamic weights, the edge features of the half-hole in the shadow-covered area are specifically enhanced, shielding the gray-scale abrupt interference caused by the shadow and reducing the probability of misjudging the shadow edge and the half-hole edge.

[0019] 2. This invention addresses the problem of broken half-hole contours caused by shadow occlusion. After effective half-hole clustering and screening, this invention uses feature templates of complete half-holes in non-shaded areas, combined with Gaussian sampling rules, to perform feature transfer repair, ensuring the complete reconstruction of the broken half-hole contour. This solves the problem that existing technologies cannot completely identify half-holes due to shadow occlusion. At the same time, the half-hole feature encoder further enhances the recognizability of half-hole features by correcting the curvature feature through the design diameter of the burst hole, thereby improving the screening accuracy of effective half-hole clustering.

[0020] 3. This invention uses a candidate region identification model to initially screen candidate half-hole regions, narrowing the calculation range for subsequent feature extraction. It combines density clustering algorithm to automatically screen effective half-hole clusters without human intervention. Compared with traditional manual measurement methods, it improves recognition efficiency. Moreover, the entire process is based on image vision technology to achieve non-contact detection, avoiding the safety risks of manual operation in the harsh environment of the tunnel face, and adapting to the actual construction scenario requirements of tunnel engineering. Attached Figure Description

[0021] Figure 1 This is a flowchart of Embodiment 1 of the present invention; Figure 2 This is a system block diagram of Embodiment 1 of the present invention. Detailed Implementation

[0022] The present invention will be further described in detail below with reference to the accompanying drawings.

[0023] Example 1 Reference Figure 1 This embodiment of a method for identifying half-holes after tunnel blasting based on image vision includes: S1. Obtain images of the tunnel face containing standard-marked half-hole calibration targets, and generate a panoramic image by stitching together multiple tunnel face images. The process of obtaining a tunnel face image containing a standard-marked semi-circular calibration target includes constructing a semi-circular calibration target consisting of a standard semi-circular mark, a grayscale calibration block, and a coordinate origin. The diameter of the standard semi-circular mark is adapted to the diameter of the tunnel blast hole and is used to calibrate the conversion factor between pixels and actual size.

[0024] The semi-aperture calibration target is a rigid flat plate structure, made of wear-resistant, high-contrast engineering plastic, preferably a white substrate. The target size is set at 50cm × 50cm based on the actual observation distance at the tunnel face, facilitating clear capture by image acquisition equipment. The target consists of three parts: a standard semi-circular mark, a grayscale calibration block, and a coordinate origin.

[0025] Three standard semicircular markers are evenly arranged along the horizontal direction of the target, with diameters adapted to the design diameters of commonly used tunnel blasting holes, specifically 32mm, 42mm, and 50mm, covering the mainstream specifications of tunnel blasting holes. The standard semicircular markers are engraved in black, facilitating accurate extraction of pixel contours from the image. The core function of these standard semicircular markers is to calibrate the conversion coefficient between pixels and actual dimensions, and they can also serve as a reference template for semi-hole feature extraction, assisting in verifying the accuracy of semicircular curvature feature extraction.

[0026] Five groups of grayscale calibration blocks are arranged in a matrix at the four corners and center of the target. Each group of grayscale calibration blocks is a 10mm × 10mm square with preset standard grayscale values ​​of 30, 60, 128, 190, and 220, covering the common grayscale range of tunnel face. The grayscale calibration blocks are made of neutral gray material to ensure the stability of grayscale values ​​under different lighting conditions. Their function is to provide reference grayscale data for lighting correction and eliminate the interference of uneven lighting at the tunnel face on the image grayscale values.

[0027] The origin of the coordinate system is located at the geometric center of the target and is marked with a crosshair in red for easy location in the image. The origin serves as the spatial reference for size conversion, defining its absolute coordinates in the tunnel coordinate system to ensure spatial consistency when converting pixel dimensions to actual dimensions.

[0028] The constructed semi-hole calibration target was fixed on a flat area of ​​the tunnel face that was unobstructed and free of shadows, with the target plane parallel to the tunnel face. A 4K industrial camera was used as the image acquisition device, and images were acquired in three segments along the horizontal direction of the tunnel face. Each segment covered 1 / 3 of the tunnel face area, and the overlap between adjacent segments was ≥30% to ensure that there was no missing information during panoramic stitching.

[0029] After acquiring the images, the pixel contours of the standard semicircular markers are located using a candidate region recognition model, and the pixel diameters of each standard semicircular marker are extracted using an edge detection algorithm. According to the actual diameter of the standard semicircle mark The pixel actual size conversion factor is calculated using the following formula: Where k is the conversion factor for the actual pixel size (unit: mm / pixel). The actual diameter (in mm) of the standard semicircle mark. This is the average diameter (in pixels) of three standard semicircular marker pixels. Using this conversion factor, the pixel length of subsequent half-holes can be accurately converted to their actual length, providing a data basis for calculating the half-hole ratio.

[0030] S2. Perform illumination correction and rock debris noise reduction on the panoramic image in sequence, convert the processed image into grayscale image and color image, construct a candidate area recognition model, use the candidate area recognition model to initially screen the half-hole candidate area, and output the candidate area mask; The process of sequentially performing illumination correction and rock debris noise reduction on the panoramic image includes: S2.1. Based on the preset standard grayscale value of the grayscale calibration block in the half-aperture calibration target, read the measured grayscale value of the corresponding grayscale calibration block in the panoramic image, and calculate the illumination compensation coefficient of each pixel. The formula is as follows: ,in, The illumination compensation coefficients for each pixel are... The measured grayscale value is... To obtain a light-corrected image, the grayscale value of the original panoramic image is corrected using the light compensation coefficient, based on a preset standard grayscale value. First, based on the pre-defined structure of the semi-aperture calibration target, the position of the target is located in the panoramic image using a template matching algorithm. Then, the pixel regions of five groups of grayscale calibration blocks are identified. The pixel regions of each group are extracted using an edge detection algorithm to ensure clear and unambiguous boundaries. For each group of grayscale calibration blocks, the average grayscale value within its pixel region is calculated as the measured grayscale value of that group. The measured grayscale value needs to be filtered to remove noise pixels with abnormal pixel values. The 3σ criterion is used to remove pixels that deviate from the mean by 3 times the standard deviation.

[0031] Preset standard grayscale value The factory calibration values ​​for each grayscale calibration block are 30, 60, 128, 190, and 220, respectively. The illumination compensation coefficient for the pixel region where each grayscale calibration block is located is calculated using the following formula: To obtain the illumination compensation coefficients for all pixels in the panoramic image, a bilinear interpolation algorithm is employed. Using the compensation coefficients of five sets of grayscale calibration blocks as a benchmark, global interpolation calculations are performed on the panoramic image to ensure the spatial continuity of the compensation coefficients and avoid uneven local correction. Finally, the grayscale values ​​of the original panoramic image are corrected using the illumination compensation coefficients of each pixel. The correction formula is as follows: in, This is the grayscale value after illumination correction. This represents the grayscale value of the original panoramic image. This illumination correction step is used to eliminate grayscale distortion caused by factors such as uneven illumination, shadow occlusion, and reflections on the tunnel face, providing a uniform grayscale basis for subsequent semi-aperture feature extraction.

[0032] S2.2. Construct a three-dimensional voxel grid, perform voxel filtering on the illumination-corrected image, generate representative pixel values ​​for each voxel through aggregation rules, use the region growing method, merge similar pixels according to the growth rule that the gray-level difference between neighboring pixels is less than the preset difference, and remove rock debris pixels whose gray-level values ​​exceed the preset gray-level range to obtain the denoised image.

[0033] The process of using a candidate region recognition model to initially screen candidate regions for half-holes and output candidate region masks includes: the candidate region recognition model is constructed based on a deep learning network, and supervised training is performed using the arc contour features and ring texture features of the half-holes as labeled samples. During the training process, the cross-entropy loss function is used to optimize the model parameters. The denoised image is input into the candidate region recognition model, and the model outputs a candidate region mask.

[0034] First, a three-dimensional voxel grid is constructed, with the voxel size set to 3×3×3 pixels. This size is determined based on the common pixel scale of tunnel rock cuttings, which can filter out small-sized rock cuttings while preserving the detailed features of the half-hole. The grayscale image after illumination correction is then processed. Voxel filtering is performed, and a representative pixel value for each voxel is generated using the gray-scale mean aggregation rule. That is, the gray-scale mean of all pixels in the voxel is calculated as the output value of the voxel, so as to achieve the initial smoothing of the image and filter out tiny rock fragments smaller than the voxel.

[0035] The preset difference value for the grayscale difference between neighboring pixels is set to 8. This value is determined by statistically analyzing the grayscale fluctuation range of the surrounding rock in the tunnel, balancing noise reduction and feature preservation. The preset grayscale range is [80, 200], set based on the grayscale statistical characteristics of the surrounding rock after tunnel blasting, covering the grayscale range of normal surrounding rock and half-hole. Pixels with grayscale values ​​within the preset grayscale range are used as seed points. Following the growth rule that the grayscale difference between neighboring pixels is less than the preset difference value, adjacent similar pixels are merged to form continuous regions. Isolated pixels with grayscale values ​​exceeding the preset grayscale range that have not been merged are identified as rock debris pixels and removed, resulting in the denoised image. This noise reduction step preserves the core features of the semi-perforation, such as its arc-shaped contour and annular texture, while efficiently removing discrete rock debris interference, thus improving the accuracy of subsequent feature extraction.

[0036] After completing illumination correction and rock cuttings denoising, the denoised image is... Convert to grayscale image, i.e. The original panoramic image is converted into a color image using an RGB color space to LAB color space conversion algorithm, denoted as... The color image is used for subsequent extraction of shadow interference features.

[0037] The process of using a candidate region identification model to initially screen candidate regions for half-holes and output candidate region masks includes: the candidate region identification model is built based on a lightweight YOLOv5 deep learning network. This network architecture includes an input layer, a backbone feature extraction network containing C2f and SPPF modules, a neck feature fusion network containing a PANet structure, and an output layer, which balances recognition accuracy and computational efficiency and is adapted to the real-time processing needs of tunnel construction sites.

[0038] Over 10,000 images of the tunnel face after blasting under different surrounding rock conditions and lighting environments were collected, with 8,000 images used as the training set and 2,000 as the test set. For each sample image, a combination of manual and automatic annotation was used to annotate the arc-shaped contour bounding box and annular texture feature regions of the semi-hole, ensuring an annotation accuracy of ≤±1 pixel. To improve the model's generalization ability, data augmentation processing was performed on the training set samples, including random rotation (0°~360°), horizontal flipping, vertical flipping, brightness adjustment (±20%), and the addition of slight noise to expand sample diversity.

[0039] The training process uses the cross-entropy loss function to optimize the model parameters. The specific form of the cross-entropy loss function is as follows: Where N is the number of categories, with two categories: candidate regions and non-candidate regions. The true label of the sample (1 represents the candidate region, 0 represents the non-candidate region). This represents the class probability predicted by the model. Training parameters were set as follows: batch size = 16, initial learning rate = 0.001, number of training epochs = 100, and the Adam optimizer was used to dynamically adjust the learning rate. During training, the model convergence criterion was set to a candidate region recognition accuracy ≥ 92% and a recall ≥ 90% on the test set, ensuring the model could accurately identify the half-hole candidate regions.

[0040] Denoising image Input the trained candidate region recognition model, and the model outputs a single-channel candidate region mask. In the candidate region mask, the pixel value of the half-hole candidate region is set to 1, and the pixel value of the non-half-hole candidate region is set to 0, so as to achieve the initial separation of the half-hole candidate region from the background region, reduce the processing range of subsequent dual-domain feature encoding, and improve the overall recognition efficiency.

[0041] S3. Construct a half-hole feature encoder and a shadow interference encoder. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. The network structure, extraction process, and parameter settings of the two encoders are as follows: The semi-aperture feature encoder is built based on a deep learning network with an overall 8-layer architecture, including 4 convolutional layers and 4 residual blocks. All convolutional layers use 3×3 kernels with a stride of 1, SAME padding, and ReLU activation. The output channel numbers are 64, 128, 256, and 256 respectively. The residual blocks and convolutional layers are alternately connected to alleviate gradient vanishing and enhance the deep extraction capability of the semi-aperture features. This encoder uses the denoised grayscale image... and candidate region mask Using the input as input, the semicircular curvature features, annular texture features, and surrounding rock semi-pore grayscale contrast features are extracted sequentially, and the final output is a 256-dimensional semi-pore feature map. The specific steps are as follows: The semi-aperture feature encoder takes a grayscale image and a candidate region mask as input, extracts the semi-circular curvature features, annular texture features, and grayscale contrast features of the surrounding rock semi-aperture, and outputs a semi-aperture feature map, including: S3.1. For the candidate region mask, take the pixels in its neighborhood, fit the semicircle equation based on the least squares method, and calculate the corrected semicircle curvature feature, as shown in the formula: ,in, The corrected semicircular curvature feature. To fit the actual curvature of the semicircle, Design the diameter for the blast hole; First, the candidate region mask. For candidate pixels with a pixel value of 1, pixels within their 5×5 neighborhood are selected as fitting samples. The size of this neighborhood is determined based on the semicircular contour scale of the half-aperture to ensure complete coverage of the local arc. A 3σ criterion is used to eliminate pixels with abnormal grayscale values ​​within the neighborhood to avoid fitting bias. The semicircular equation is then fitted to the selected sample points using the least squares method. ,constraint To ensure the fitting result corresponds to the upper semicircle of the half-hole, the cross-section of the half-hole is arc-shaped, and the upper semicircle contacts the surrounding rock, conforming to the actual structure, among which... Let r be the coordinates of the center of the semicircle, and r be the radius of the semicircle.

[0042] Through formula Calculate the actual curvature C of the fitted semicircle and introduce it into the design diameter of the tunnel blasting hole. Obtained from construction design documents, with a value range of 32mm to 50mm, the curvature is corrected using the following formula to obtain the semicircular curvature characteristics: Set the preset curvature deviation threshold to 0.05, and retain only... The feature points are used to filter out non-semi-circular curvature features in interfering areas such as fissures and rock debris.

[0043] S3.2. A Gaussian wavelet kernel is used to perform a convolution operation on the pointwise product of the grayscale image and the candidate region mask to obtain texture response values ​​at different scales. The texture response values ​​at each scale are weighted and fused to obtain the ring texture features. Gaussian wavelet kernels with three preset scales are used , , , where scale parameter (Adapts to different thickness scales of the semi-perforated ring texture, balancing details and overall texture. First, the grayscale image is calculated.) With candidate region mask The pointwise product yields a local image containing only the candidate region, avoiding background interference.

[0044] Convolution operations with Gaussian wavelet kernels of three different scales were performed on the local image to obtain texture response values ​​at different scales. According to the preset weighting coefficients To emphasize the response weights of fine textures and adapt to the dense ring-shaped texture of the inner wall of the semi-hole, the response values ​​are weighted and fused using the following formula: ,in, This is the final annular texture feature. This feature is used to distinguish the periodic annular texture of the semi-pore from the irregular texture of the surrounding rock, thus improving the recognizability of the semi-pore.

[0045] S3.3. Calculate the grayscale difference between the candidate region pixel and the pixel in its preset neighborhood, perform mean statistics on the grayscale difference to obtain the grayscale contrast feature of the surrounding rock half-hole, and stitch the semi-circular curvature feature, the annular texture feature and the grayscale contrast feature of the surrounding rock half-hole into a half-hole feature map.

[0046] The preset neighborhood range is set to 3×3. Based on the local grayscale distribution characteristics of the surrounding rock and the semi-hole, sufficient surrounding rock reference pixels are covered to ensure masking of the candidate area. Marked candidate region pixels Calculate the absolute value of the grayscale difference between the value and all pixels in its neighborhood, and then perform a mean calculation on the grayscale differences. The statistical formula is as follows: ,in, The grayscale contrast characteristics of the surrounding rock semi-hole. For pixels The 3×3 neighborhood, The pixel coordinates are within the neighborhood. The statistical scope is limited to the candidate area and the adjacent surrounding rock area.

[0047] The preset contrast threshold is set to 30, determined based on statistical results of the grayscale difference between the tunnel surrounding rock and the half-hole. Areas with a contrast value less than this threshold are considered to have no significant grayscale difference and are not half-hole areas; only these areas are retained. The characteristic points of the semicircular curvature feature. Circular texture features and the grayscale contrast characteristics of the surrounding rock semi-hole Each channel is mapped to a 256-dimensional channel using a 1×1 convolutional layer, and then concatenated along the channel dimension to generate a 256-dimensional semi-pore feature map. Non-candidate regions in the half-hole feature map The eigenvalue is set to 0 to ensure that the feature map focuses only on the half-hole related region.

[0048] The shadow interference encoder is built on a deep learning network with a 6-layer architecture, including 4 convolutional layers and 2 BatchNorm normalization layers. All convolutional layers use 3×3 kernels with a stride of 1 and SAME padding. The activation function is LeakyReLU (with a negative slope of 0.1). The output channels are 32, 64, 128, and 128 respectively. The BatchNorm layers are interspersed after the 2nd and 4th convolutional layers to stabilize the feature distribution and accelerate model convergence. This encoder outputs the denoised grayscale image... and LAB color images Using the input as input, extract the grayscale abrupt change features and reflectance features of the shadow, and output a 128-dimensional shadow feature map. and shadow mask The specific steps are as follows: The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask, including: S3.4. Edge detection is performed on the grayscale image using an edge detection operator, and the edge gradient value is calculated. The formula is as follows: ,in, These are edge gradient values. , These are edge detection operators in the x and y directions, respectively. For grayscale images, the portion of the edge gradient value that is greater than a preset gradient threshold is selected as the shadow grayscale abrupt change feature. A 3×3 Sobel edge detection operator is used to perform edge detection on grayscale images. Perform edge detection in the x and y directions to obtain the gradient map in the x direction. and gradient plot in the y direction The pixel-level edge gradient value is calculated using the following formula to quantify the degree of grayscale abrupt change: ,in, These are edge gradient values. , , , These are the 3×3 Sobel operators in the x and y directions, respectively.

[0049] The preset gradient threshold is set to 40. Based on the difference in gradient characteristics between shadows and half-holes, the gradient value at the edge of a shadow is significantly higher than that at the smooth edge of a half-hole, thus filtering out... The pixels constitute the shadow grayscale abrupt change feature. This feature is used to capture the sharp edges of the shadow area, distinguishing it from the smooth, curved edges of the half-hole, providing a basis for subsequent interference suppression.

[0050] S3.5. Based on the luminance channel information of the color image and the grayscale image, calculate the reflectance using the following formula: ,in, For reflectivity, For the spectral parameters of the light source, Here, f is the color matching function, and f is the rock strength coefficient. For the visible light wavelength range, Given the color temperature of the light source, the abrupt change features of the shadow grayscale and the shadow reflectivity features are concatenated to form a shadow feature map, generating a shadow mask.

[0051] First, extract the LAB color image. The L channel (luminance channel) information, and the grayscale image Alignment serves as the basis for brightness calculations based on reflectivity. Light source spectral parameters. The color temperature of the light source is obtained by reverse calculation using the grayscale calibration block of the semi-aperture calibration target. It is 5500K (the standard color temperature of tunnel work lights). For the visible light wavelength range (400nm~700nm), the color matching function The sRGB standard color matching function is adopted, and the rock firmness coefficient f is obtained based on the tunnel geological exploration report, with a value range of 10-20.

[0052] The pixel-level reflectivity is calculated using the following formula to quantify the light reflection characteristics of shadow areas: A preset reflectivity threshold of 0.3 is set, determined based on statistical results of reflectivity in shadowed and unshadowed areas. Shadowed areas with reflectivity below this threshold are filtered out. The pixels constitute the shadow reflectivity feature. The shadow grayscale abrupt change feature and the shadow reflectivity feature are each mapped to a 128-dimensional channel through a 1×1 convolutional layer, and then concatenated along the channel dimensions to generate a 128-dimensional shadow feature map. .

[0053] Simultaneously generate a shadow mask. When pixels are simultaneously full and When the shadow is in the shaded region, it is marked as 1 and identified as a shadowed region; otherwise, it is marked as 0 and identified as a non-shaded region. This shadow mask is used to accurately mark shadow interference regions, providing spatial constraints for subsequent cross-attention optimization.

[0054] S4. Perform dimension unification and position encoding on the half-aperture feature map and the shadow feature map, introduce the half-aperture feature confidence and shadow interference intensity quantification index to calculate attention weights, and output the optimized half-aperture feature map through residual connection. The process involves unifying the dimensions and encoding the positions of the half-aperture feature map and the shadow feature map, introducing half-aperture feature confidence and shadow interference intensity quantification indices to calculate attention weights, and outputting an optimized half-aperture feature map via residual connections, including: S4.1. Project the shadow feature map onto the half-hole feature. Figure 1 By unifying the feature dimensions, a shadow feature map with unified dimensions is obtained. For half-hole feature map (256-dimensional) and shadow feature map To address the issue of inconsistent dimensionality (128 dimensions), a 1×1 learnable convolutional matrix is ​​used to achieve dimensionality uniformity. The convolutional matrix is ​​constructed as follows: The weight parameters of this matrix are adaptively optimized through network training to ensure that effective information of the shadow features is not lost. The shadow feature map... Input this 1×1 convolutional layer and perform dimensional projection using the following formula: in, This results in a 256-dimensional shadow feature map with unified dimensions. The core function of this step is to ensure that the half-aperture feature and the shadow feature have the same dimensions, providing compatibility for subsequent feature interaction calculations in the attention mechanism and ensuring that they can perform matrix operations and weight allocation.

[0055] S4.2. Sinusoidal position coding is used to add spatial position information to the half-hole feature map and the unified shadow feature map to obtain the encoded half-hole feature map. and encoded shadow features ; Because convolutional operations in deep learning networks easily lose spatial location information of features, and information such as the curved contour and spatial distribution of the half-hole is crucial for recognition, sinusoidal positional encoding is used to add spatial location information to the features. The encoding process is based on the pixel coordinates of the feature map. The specific formula is as follows: , in, (Feature dimensions, consistent with the unified feature dimensions). (Encoding Dimension Index) For pixels The positional encoding vector is then added element-wise to the unified feature map to obtain the encoded semi-pore feature. Post-encoding shadow features The function of this step is to preserve the spatial relationship of features, ensuring that attention calculations can take into account the spatial distribution differences between the half-aperture and the shadow, thereby improving the accuracy of interference suppression.

[0056] S4.3. Based on the extracted half-pore feature map, calculate the half-pore feature confidence score using the following formula: ,in, For the confidence level of the half-pore feature, This represents the maximum value of the ring-shaped texture feature. To preset the upper limit of contrast, The corrected semicircular curvature feature. Based on the grayscale contrast characteristics of the half-hole in the surrounding rock, and the extracted shadow features of the half-hole, the shadow interference intensity is calculated using the following formula: ,in, The intensity of shadow interference. This represents the maximum value of the edge gradient. Reflectivity; The quantitative metrics include the confidence score of the half-aperture feature, which measures the reliability of the half-aperture feature, and the shadow interference intensity, which quantifies the degree of interference from shadows. Both together provide a basis for attention weight allocation, and the specific calculation is as follows: (1) Calculation of confidence of semi-aperture feature: based on the semi-circular curvature feature extracted by S3 Circular texture features and the grayscale contrast characteristics of the surrounding rock semi-hole The confidence level is calculated using a weighted fusion method, as shown in the following formula: in: The corrected curvature features are mapped to confidence components in the 0-1 interval using an exponential function. The smaller the value, the closer the semi-aperture curvature is to the standard value, the closer the component is to 1, and the higher the confidence level. : This represents the global maximum value of the ring-shaped texture feature, calculated by traversing the entire feature map. Normalize the ring texture features to highlight the clear texture of the semi-hole area; The preset upper limit for contrast is set to 50, determined based on the statistical maximum value of grayscale contrast between the tunnel surrounding rock and the half-hole. Normalize the grayscale contrast features to ensure that the components are in the range of 0 to 1; The weights are all set to 1 / 3 to balance the influence of the three types of semi-pore-specific features, so that the confidence score can comprehensively reflect the reliability of the features. The closer the value is to 1, the higher the probability that the position is a half hole.

[0057] (2) Calculation of shadow interference intensity: based on the edge gradient value extracted by S3 With reflectivity The formula for calculating shadow interference intensity is as follows: in: This is the global maximum value of the edge gradient, calculated by traversing the entire grayscale image. Achieve gradient feature normalization; The interference intensity is negatively correlated with reflectivity, and the reflectivity is low in the shadow area. The term is close to 1, which strengthens the interference quantification in the shadow area; The closer the value is to 1, the stronger the shadow interference at that location, and the more it needs to be suppressed.

[0058] S4.4. Generate the query matrix, key matrix, and value matrix, and calculate the attention weights using the following formula: ,in, It is attention weight. For querying the matrix, The key matrix, For dimension normalization term, The interference suppression coefficient is calculated by outputting the optimized half-aperture feature map through residual connection. The formula is as follows: ,in, It is a value matrix.

[0059] Based on the encoded feature map and Generate the three matrices required for attention calculation: Query matrix Q: derived from the encoded shadow feature map With learnable linear matrices Multiply to obtain, that is , used to capture characteristic patterns of shadow interference; Key matrix K: derived from the encoded half-hole feature map With learnable linear matrices Multiplying them together yields the result, i.e. , used to characterize the response patterns of semi-porous features; Value matrix V: derived from the encoded half-hole feature map With learnable linear matrices Multiplying them together yields the result, i.e. This provides the basis for optimizing the half-hole features; the weights of the three learnable matrices are optimized synchronously with the overall model through network training to ensure that the attention mechanism can accurately adapt to the feature interaction patterns of the half-hole and the shadow.

[0060] (2) Attention weight calculation: The attention weight is calculated using the following complete formula to achieve a dynamic balance between semi-aperture feature enhancement and shadow interference suppression: in: For dimension normalization term ( This is used to alleviate the gradient vanishing problem caused by excessively large values ​​after matrix multiplication; Confidence based on half-pore features Weighted attention weights are applied to enhance the confidence level of semi-pore features; : The interference suppression coefficient is set to 10, which represents the optimal suppression strength verified through experiments. This amplifies the negative impact of shadow interference intensity and reduces the attention weight of the shadow region. The denominator is the sum of the numerators of all pixels, and the weights are normalized using the softmax function to ensure... The sum of all elements is 1, indicating a reasonable weight distribution.

[0061] (3) Residual connection outputs optimized feature map: To avoid the loss of core features of the half-pore during attention optimization, residual connection is used to fuse the optimized features with the original encoded features, and the optimized half-pore feature map is output: in, To optimize the rear half-hole feature map (256 dimensions), residual connections are used. It can retain the original core features of the semi-pore, while... To achieve precise suppression of shadow interference, a semi-aperture feature map is obtained, which is then used for subsequent effective clustering operations.

[0062] S5. Optimize the half-hole feature map by using density clustering algorithm to select effective half-hole clusters, and calculate the actual half-hole parameters and the half-hole ratio of the working face based on the effective half-hole clusters.

[0063] A density clustering algorithm is used to aggregate and remove interference from half-hole pixels. Effective half-hole clusters are then selected using feature thresholding to correct contour breaks caused by shadows. Finally, the actual parameters of the half-holes and the half-hole ratio at the tunnel face are accurately calculated, providing a quantitative basis for blasting quality evaluation. The detailed implementation methods for each step are as follows: The process of selecting effective half-pore clusters in the optimized half-pore feature map using a density clustering algorithm includes: S5.1. The DBSCAN algorithm is used to optimize the half-hole feature map. Perform clustering; The DBSCAN (density-based spatial clustering application) algorithm was used to optimize the semi-pore feature map. Clustering is performed, and this algorithm can effectively aggregate semi-aperture pixels with similar features while eliminating discrete interference. The clustering parameters are set based on the pixel distribution characteristics of the semi-aperture feature map: neighborhood radius... It adapts to the local feature aggregation scale of half-holes, ensuring that adjacent half-hole pixels can be clustered into one class, with a minimum number of cluster points. The minimum pixel size of the semi-aperture is determined to avoid clustering small disturbances such as rock debris. The clustering process uses the feature Euclidean distance as a metric, and clusters with a distance less than [a certain value] in the feature space are grouped together. And the number of points is not less than The pixels are clustered into a single clustering unit, achieving initial separation of the semi-aperture region from background interference. Through the above steps, the DBSCAN algorithm can separate pixels with similar features and a distance of less than [a certain value]. And the density meets the requirements, the number of neighborhood points of the core point is ≥ The pixels of the half-hole are aggregated into a cluster unit, while low-density discrete points such as rock debris and pseudo-half-hole features are marked as noise points, thus achieving preliminary separation of the half-hole region from background interference.

[0064] S5.2. Clusters with fewer points than the preset number of cluster points are identified as interfering clusters and are removed. The preset number of cluster points is set to 10, which is consistent with the minimum number of cluster points in DBSCAN. All cluster units are then filtered: clusters with fewer than 10 points are identified as interference clusters. These clusters are mostly discrete interferences such as rock debris residue and pseudo-semi-pore features, and are therefore removed. Only cluster units with more than 10 points are retained to narrow down the scope for subsequent effective filtering.

[0065] S5.3. For the remaining clustering units, calculate the average semicircular curvature, average annular texture, and average gray-level contrast of each cluster, and retain the clusters that satisfy the following conditions: average semicircular curvature is less than a preset curvature threshold, average annular texture is greater than a preset texture threshold, and average gray-level contrast is greater than a preset contrast threshold, as valid semi-pore clusters. For the remaining clustered units after removing interference, calculate the average eigenvalues ​​for each cluster, including the average semicircular curvature. Average ring texture Average grayscale contrast Clusters that simultaneously meet the following three conditions are selected as valid semi-pore clusters: Mean semicircular curvature The preset curvature threshold is consistent with the curvature deviation threshold of S3.1 to ensure that the semi-circular characteristics of clustering meet the semi-aperture standard. Average circular texture A preset texture threshold is set, which is determined based on the global maximum value of the ring texture feature to ensure that the cluster has a clear semi-perforated ring texture. Average grayscale contrast A preset contrast threshold, consistent with that in S3.3, ensures a significant grayscale difference between the cluster and the surrounding rock. This screening step uses quantitative indicators of the semi-pore-specific features to identify effective semi-pore areas and exclude pseudo-semi-pore clusters such as fractures and rock debris accumulations.

[0066] S5.4. In the non-shaded areas marked by the shadow mask, complete half-hole clusters are selected, and their features are extracted as feature templates. For the broken segments of the half-hole contours in the shaded areas marked by the shadow mask, feature transfer is performed on the feature templates based on Gaussian sampling rules to achieve the repair of the broken contours.

[0067] First, in the shadow mask In clusters marked as 0 (non-shaded areas), complete half-hole clusters are selected: complete half-hole clusters must meet the requirement of half-hole integrity ≥ 80%, which is initially calculated as the ratio of the pixel length along the cluster axis to the designed pixel length of the burst hole. The semi-circular curvature features, annular texture features, and grayscale contrast features of this type of cluster are extracted to construct feature templates. .

[0068] For shadow masks For the broken segment of the half-hole profile marked as 1 (shaded area), feature transfer repair is performed based on Gaussian sampling rules: the variance of Gaussian sampling is set. To ensure the smoothness of the transferred features, the feature template is sampled and transferred based on the adjacent complete pixels of the broken segment using the following formula: in, Sampling offset, with a value range of [-2, 2]. These are the repaired feature values. This step fills in the contour breaks caused by shadows using the complete half-hole feature in the non-shaded area, ensuring the continuity and accuracy of the half-hole length calculation.

[0069] The calculation of actual semi-pore parameters and face semi-pore ratio based on effective semi-pore clustering includes: S5.5. Determine the axial direction of the half-hole cluster by connecting the centers of the semi-circles fitted. Divide the half-hole into multiple pixel segments along the axial direction of the half-hole cluster. Based on the conversion coefficient, convert the pixel length of each pixel segment into the actual length. Sum the actual lengths of each actual length to obtain the actual total length of a single half-hole. Determining the axis direction: For all pixels of each effective half-hole cluster, the least squares method is used again to fit multiple local semicircles, with each 10 pixels as a fitting unit, to obtain the center of multiple local semicircles. These centers are connected in sequence to form the axis direction of the half-hole. Pixel segmentation: The half-hole cluster is divided into several equal-length pixel segments along the axial direction, with each segment having a length of 10 pixels. This is based on the statistical characteristics of the half-hole length, balancing computational accuracy and efficiency. The pixel length of each segment is recorded. ; Actual length conversion: Based on the pixel actual size conversion factor k (unit: mm / pixel) calibrated by S1, the following formula is used to convert each pixel segment into its actual length: ,in, To obtain the actual length of a single segment, sum the actual lengths of all segments to get the total actual length of a single half-hole. , where m is the number of segments.

[0070] S5.6. Calculate the integrity of a single half-hole using the following formula: ,in Design length for blasting holes, This refers to the actual total length of a single half-hole; The integrity of a single half-hole is calculated using the following formula, which quantifies the degree of half-hole retention: in, For the integrity of the half-hole, The design length of the blasting hole is specified (obtained from the construction design documents). A preset integrity threshold of 60% is set. Half-holes with integrity ≥ 60% are considered valid half-holes to ensure that the statistically analyzed half-holes have practical quality evaluation significance. Half-holes with integrity < 60% are considered invalid and are not included in subsequent half-hole rate calculations.

[0071] S5.7. Calculate the half-hole ratio of the tunnel face by summing the actual total lengths of all effective half-holes within the tunnel face. The formula is: ,in, Let be the half-hole ratio at the tunnel face, n be the total number of blasting holes designed at the tunnel face, and i be the index of the effective half-hole. This is the sum of the actual total lengths of the effective half-holes.

[0072] Effective half-hole statistics: Traverse all effective half-hole clusters within the tunnel face and calculate the sum of the actual total lengths of the effective half-holes. (t is the total number of effective half-holes,) This represents the actual total length of the i-th effective half-hole; Half-hole ratio calculation: The half-hole ratio at the working face is calculated using the following formula and serves as a core evaluation indicator for blasting quality: in, The half-hole ratio at the tunnel face is denoted by , and 'n' represents the total number of blasting holes designed within the tunnel face, determined by the construction design documents. The formula defines the total design length of the blasting holes within the tunnel face. By using the ratio of the actual total length of the effective half-hole to the designed total length, this formula quantifies the quality of smooth blasting and provides data support for subsequent optimization of blasting parameters.

[0073] Example 2 Reference Figure 2 A tunnel blasting half-hole identification system based on image vision, comprising: The image acquisition module is configured to acquire images of the tunnel face containing standard marked half-hole calibration targets, and generate a panoramic image by stitching together multiple segments of the tunnel face images. The candidate area screening module is configured to sequentially perform illumination correction and rock cutting noise reduction on the panoramic image, convert the processed image into a grayscale image and a color image, construct a candidate area recognition model, use the candidate area recognition model to screen the half-hole candidate areas, and output the candidate area mask. The dual-domain feature encoding module is configured to construct a half-hole feature encoder and a shadow interference encoder. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features, and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. The feature optimization module is configured to unify the dimensions and encode the position of the half-aperture feature map and the shadow feature map, introduce the half-aperture feature confidence and shadow interference intensity quantification index to calculate attention weights, and output the optimized half-aperture feature map through residual connection. The clustering and filtering module is configured to filter effective half-hole clusters in the optimized half-hole feature map using a density clustering algorithm, and calculate the actual parameters of the half-hole and the half-hole ratio at the working face based on the effective half-hole clusters.

[0074] A computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the image vision-based method for identifying half-holes after tunnel blasting.

[0075] A terminal device includes a processor and a computer-readable storage medium, the processor being configured to implement various instructions; the computer-readable storage medium being configured to store multiple instructions adapted for loading and execution by the processor of the image vision-based method for identifying half-holes after tunnel blasting.

[0076] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for identifying half-holes after tunnel blasting based on image vision, characterized in that, include: Acquire images of the tunnel face containing standard-marked half-hole calibration targets, and generate a panoramic image by stitching together multiple tunnel face images. Illumination correction and rock cutting noise reduction are performed sequentially on the panoramic image. The processed image is converted into a grayscale image and a color image. A candidate region recognition model is constructed. The candidate region recognition model is used to initially screen the half-hole candidate regions and output the candidate region mask. A half-hole feature encoder and a shadow interference encoder are constructed. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. The half-aperture feature map and the shadow feature map are unified in dimension and encoded in position. The half-aperture feature confidence and shadow interference intensity quantification index are introduced to calculate attention weights. The optimized half-aperture feature map is output through residual connection. The effective half-pore clusters in the optimized half-pore feature map are selected by density clustering algorithm, and the actual parameters of the half-pores and the half-pore ratio of the working face are calculated based on the effective half-pore clusters.

2. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The process of obtaining a tunnel face image containing a standard-marked semi-circular calibration target includes constructing a semi-circular calibration target consisting of a standard semi-circular mark, a grayscale calibration block, and a coordinate origin. The diameter of the standard semi-circular mark is adapted to the diameter of the tunnel blast hole and is used to calibrate the conversion factor between pixels and actual size.

3. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The process of sequentially performing illumination correction and rock debris noise reduction on the panoramic image includes: Based on the preset standard grayscale value of the grayscale calibration block in the semi-aperture calibration target, the measured grayscale value of the corresponding grayscale calibration block in the panoramic image is read, and the illumination compensation coefficient of each pixel is calculated. The formula is as follows: ,in, The illumination compensation coefficients for each pixel are... The measured grayscale value is... To obtain a light-corrected image, the grayscale value of the original panoramic image is corrected using the light compensation coefficient, based on a preset standard grayscale value. A three-dimensional voxel grid is constructed, voxel filtering is performed on the illumination-corrected image, representative pixel values ​​of each voxel are generated through aggregation rules, and similar pixels are merged according to the growth rule that the gray-level difference between neighboring pixels is less than a preset difference. Rock debris pixels with gray-level values ​​exceeding the preset gray-level range are removed to obtain the denoised image.

4. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The process of using a candidate region recognition model to initially screen candidate regions for half-holes and output candidate region masks includes: the candidate region recognition model is constructed based on a deep learning network, and supervised training is performed using the arc contour features and ring texture features of the half-holes as labeled samples. During the training process, the cross-entropy loss function is used to optimize the model parameters. The denoised image is input into the candidate region recognition model, and the model outputs a candidate region mask.

5. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The semi-aperture feature encoder takes a grayscale image and a candidate region mask as input, extracts the semi-circular curvature features, annular texture features, and grayscale contrast features of the surrounding rock semi-aperture, and outputs a semi-aperture feature map, including: For the candidate region mask, take the pixels in its neighborhood, fit the semicircle equation based on the least squares method, and calculate the corrected semicircle curvature feature, as shown in the formula: ,in, The corrected semicircular curvature feature. To fit the actual curvature of the semicircle, Design the diameter for the blast hole; A Gaussian wavelet kernel is used to perform a convolution operation on the pointwise product of the grayscale image and the candidate region mask to obtain texture response values ​​at different scales. The texture response values ​​at each scale are weighted and fused to obtain the ring texture features. Calculate the grayscale difference between the candidate region pixel and the pixel in its preset neighborhood, perform mean statistics on the grayscale difference to obtain the grayscale contrast feature of the surrounding rock half-hole, and stitch the semi-circular curvature feature, the annular texture feature and the grayscale contrast feature of the surrounding rock half-hole into a half-hole feature map.

6. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask, including: Edge detection operators are used to perform edge detection on grayscale images and calculate edge gradient values. The formula is as follows: ,in, These are edge gradient values. , These are edge detection operators in the x and y directions, respectively. For grayscale images, the portion of the edge gradient value that is greater than a preset gradient threshold is selected as the shadow grayscale abrupt change feature. Based on the luminance channel information of the color image and the grayscale image, the reflectance is calculated using the following formula: ,in, For reflectivity, For the spectral parameters of the light source, Here, f is the color matching function, and f is the rock strength coefficient. For the visible light wavelength range, Given the color temperature of the light source, the abrupt change features of the shadow grayscale and the shadow reflectivity features are concatenated to form a shadow feature map, generating a shadow mask.

7. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The process involves unifying the dimensions and encoding the positions of the half-aperture feature map and the shadow feature map, introducing half-aperture feature confidence and shadow interference intensity quantification indices to calculate attention weights, and outputting an optimized half-aperture feature map via residual connections, including: The shadow feature map is projected onto the same feature dimension as the half-hole feature map to obtain a shadow feature map with unified dimensions. Sine position coding is used to add spatial position information to the half-aperture feature map and the unified shadow feature map to obtain the encoded half-aperture feature. and encoded shadow features ; Based on the extracted half-pore feature map, the confidence score of the half-pore feature is calculated using the following formula: ,in, For the confidence level of the half-pore feature, This represents the maximum value of the ring-shaped texture feature. To preset the upper limit of contrast, The corrected semicircular curvature feature. Based on the grayscale contrast characteristics of the half-hole in the surrounding rock, and the extracted shadow features of the half-hole, the shadow interference intensity is calculated using the following formula: ,in, The intensity of shadow interference. This represents the maximum value of the edge gradient. Reflectivity; Generate the query matrix, key matrix, and value matrix, and calculate the attention weights using the following formula: ,in, It is attention weight. For querying the matrix, The key matrix, For dimension normalization term, The interference suppression coefficient is calculated by outputting the optimized half-aperture feature map through residual connection. The formula is as follows: ,in, It is a value matrix.

8. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The process of selecting effective half-pore clusters in the optimized half-pore feature map using a density clustering algorithm includes: The DBSCAN algorithm was used to optimize the half-hole feature map. Perform clustering; Clusters with fewer points than the preset number of cluster points are identified as interfering clusters and are removed. For the remaining clustering units, calculate the average semicircular curvature, average annular texture, and average grayscale contrast of each cluster. Retain the clusters that satisfy the following conditions: average semicircular curvature is less than a preset curvature threshold, average annular texture is greater than a preset texture threshold, and average grayscale contrast is greater than a preset contrast threshold. These are then considered as effective semi-pore clusters. In the non-shaded areas marked by the shadow mask, complete half-hole clusters are selected, and their features are extracted as feature templates. For the broken segments of the half-hole contours in the shaded areas marked by the shadow mask, feature transfer is performed on the feature templates based on Gaussian sampling rules to achieve the repair of the broken contours.

9. The method for identifying half-holes after tunnel blasting based on image vision according to claim 1, characterized in that, The calculation of actual semi-pore parameters and face semi-pore ratio based on effective semi-pore clustering includes: The axis direction of the half-hole cluster is determined by connecting the centers of the semi-circles fitted. The half-hole is divided into multiple pixel segments along the axis direction of the half-hole cluster. Based on the conversion coefficient, the pixel length of each pixel segment is converted into the actual length. The actual total length of a single half-hole is obtained by summing the actual lengths of each segment. The formula for calculating the integrity of a single half-hole is: ,in Design length for blasting holes, This refers to the actual total length of a single half-hole; The half-hole ratio of the working face is calculated by summing the actual total lengths of all effective half-holes within the working face, using the following formula: ,in, Let be the half-hole ratio at the tunnel face, n be the total number of blasting holes designed at the tunnel face, and i be the index of the effective half-hole. This is the sum of the actual total lengths of the effective half-holes.

10. A tunnel blasting half-hole identification system based on image vision, characterized in that, The method for identifying half-holes after tunnel blasting based on image vision as described in any one of claims 1-9 includes: The image acquisition module is configured to acquire images of the tunnel face containing standard marked half-hole calibration targets, and generate a panoramic image by stitching together multiple segments of the tunnel face images. The candidate area screening module is configured to sequentially perform illumination correction and rock cutting noise reduction on the panoramic image, convert the processed image into a grayscale image and a color image, construct a candidate area recognition model, use the candidate area recognition model to screen the half-hole candidate areas, and output the candidate area mask. The dual-domain feature encoding module is configured to construct a half-hole feature encoder and a shadow interference encoder. The half-hole feature encoder takes a grayscale image and a candidate area mask as input, extracts the semicircular curvature features, annular texture features, and grayscale contrast features of the surrounding rock half-hole, and outputs a half-hole feature map. The shadow interference encoder takes a grayscale image and a color image as input, extracts the shadow features of the half-hole, and outputs a shadow feature map and a shadow mask. The feature optimization module is configured to unify the dimensions and encode the position of the half-aperture feature map and the shadow feature map, introduce the half-aperture feature confidence and shadow interference intensity quantification index to calculate attention weights, and output the optimized half-aperture feature map through residual connection. The clustering and filtering module is configured to filter effective half-hole clusters in the optimized half-hole feature map using a density clustering algorithm, and calculate the actual parameters of the half-hole and the half-hole ratio at the working face based on the effective half-hole clusters.