Tunnel back break intelligent rapid identification technology based on machine vision

By combining laser ranging with fine-tuned SAM and CLIP models, rapid and accurate detection of the tunnel face profile is achieved, solving the problems of insufficient real-time performance and detection under complex working conditions in existing technologies, and improving the quality control and safety of tunnel construction.

CN120668060APending Publication Date: 2025-09-19CHANGSHA UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510513930.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In existing tunnel construction, the over-excavation and under-excavation detection methods for the tunnel face have problems such as insufficient real-time performance, low accuracy, reliance on complex calibration or expensive equipment, and difficulty in adapting to complex working conditions. These problems make it difficult to meet the real-time monitoring and rapid feedback needs of tunnel construction.

Method used

Combining the precise scale information provided by laser ranging with the fine-tuned segmentation model SAM and the visual language model CLIP, the tunnel face contour can be quickly and accurately extracted and quantified. Guided segmentation technology improves the accuracy and robustness of contour recognition in complex environments. It has a high degree of automation and can provide real-time monitoring and feedback.

Benefits of technology

It realizes the rapid and accurate detection of the tunnel face contour, can calculate the actual size in real time and judge the over-excavation and under-excavation conditions, improves the quality control level and safety assurance of tunnel construction, adapts to complex working conditions, and reduces engineering risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120668060A_ABST
    Figure CN120668060A_ABST
Patent Text Reader

Abstract

The invention provides a tunnel back break intelligent rapid identification technology based on machine vision. According to the method, firstly, the actual space distance of a reference point on a tunnel face is obtained through a laser range finder, and the pixel and physical size conversion proportion is calculated in combination with a shot tunnel face image; and then, screening high-quality guide information by using a visual language model CLIP, and driving a segmentation model SAM for fine adjustment of a tunnel scene to realize accurate segmentation of the tunnel face contour. The contour pixel area obtained through segmentation is converted into the actual physical area in combination with the conversion proportion, the actual physical area is compared with the preset tunnel design contour area, and therefore the over-excavation or under-excavation state of the tunnel face is automatically judged, and the size of the over-excavation or under-excavation area is determined. According to the method, the automation degree, precision and real-time performance of back break detection in tunnel engineering are remarkably improved, the limitation of traditional manual measurement is overcome, and key technical support is provided for intelligent tunneling of a tunnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent detection of tunnel engineering, and in particular to a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break. Background Art

[0002] During tunnel construction, the over- and under-excavation conditions at the tunnel face directly impact the safety and construction quality of the tunnel structure. Real-time and accurate measurement and analysis of the tunnel face profile is a crucial step in tunnel construction quality control. Traditional tunnel face over- and under-excavation detection typically relies on manual measurement or 3D laser scanning technology. Manual measurement methods are labor-intensive, inefficient, subject to large errors, and lack real-time analysis capabilities. While 3D laser scanning-based detection methods offer high accuracy, they are expensive, time-consuming, and susceptible to dust, vibration, and equipment movement under complex on-site conditions. These methods struggle to meet the demands for real-time monitoring and rapid feedback during tunnel excavation.

[0003] In recent years, with the advancement of computer vision and deep learning methods, image segmentation technology has been increasingly applied to automated inspection tasks at tunnel construction sites. However, existing deep learning-based image segmentation methods still suffer from insufficient robustness under complex working conditions. Factors such as uneven lighting, complex tunnel face textures, and unstable on-site camera angles can all lead to reduced contour segmentation accuracy. Furthermore, existing image detection methods often cannot directly obtain the actual dimensional data of the tunnel face and must rely on complex calibration processes or additional auxiliary measurement equipment.

[0004] Therefore, there is an urgent need for a technology that can quickly and accurately detect the tunnel face contour, calculate the actual size of the tunnel face in real time, and efficiently judge the over-excavation and under-excavation conditions, so as to improve the quality control level of tunnel construction, reduce engineering risks, and promote the development of intelligent and precise tunnel construction technology. Summary of the Invention

[0005] This invention provides a machine vision-based intelligent and rapid identification technology for tunnel over- and underbreak. It aims to address existing tunnel face over- and underbreak detection methods, which suffer from issues such as limited real-time performance, low accuracy, reliance on complex calibration or expensive equipment, and difficulty adapting to complex working conditions. By organically combining the precise scale information provided by laser ranging with the powerful image understanding and segmentation capabilities of advanced visual models (a fine-tuned segmentation model, SAM, and visual language model, CLIP), this technology enables rapid and accurate extraction and quantification of tunnel face contours. It also enables real-time comparison and analysis with the designed contour, outputting over- and underbreak results. The advantages of this method are: it uses laser ranging to directly and quickly establish a mapping relationship between image pixels and actual dimensions, effectively overcoming the difficulties and instability of purely visual methods in scale calibration; it uses a fine-tuned segmentation model SAM and introduces a visual language model CLIP for guided segmentation, significantly improving the accuracy and robustness of contour recognition in complex tunnel environments (such as lighting changes, dust interference, and complex face textures); the entire process is highly automated and has a fast detection speed, which can meet the needs of real-time monitoring and feedback during tunnel excavation, and provides strong technical support for refined quality control, safety assurance, and intelligent decision-making in tunnel construction.

[0006] To achieve the above objectives, the present invention provides a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break, which may specifically include the following steps:

[0007] The first step is on-site calibration and reference distance acquisition: At the tunnel construction site, a bracket with a laser rangefinder is placed 10m away from the tunnel face. Start the laser rangefinder and rotate it around the vertical axis. During the rotation process, two feature points on the plane that are easy to identify in subsequent images are selected as reference points. Record the distance readings from the laser rangefinder to these two reference points (d1=10.4m, d2=10.7m) and the angle of rotation of the rangefinder itself (θ=30°). Subsequently, based on the measured distances d1, d2 and the angle of rotation θ, the cosine theorem is applied. Calculate the actual three-dimensional space distance d between the two reference points.

[0008] The second step is image acquisition and scale factor calculation: First, use a camera to capture a 3984×2656 pixel JPG format tunnel face image at a fixed position of the laser rangefinder. By performing brightness threshold segmentation on the tunnel face image, the highlighted areas representing the laser reference points are preliminarily identified; then, the spot detection and contour analysis algorithms are applied to the identified highlighted areas to calculate the centroid or geometric center of each highlighted area, thereby determining the pixel coordinates (x, y) of each reference point in the image. Based on the pixel coordinates (x1, y1) and (x2, y2) of the two reference points, the Euclidean distance formula is used to calculate the pixel distance between the bright spots. Finally, the actual spatial distance d calculated in the first step is divided by the pixel distance p to obtain the pixel to physical size conversion ratio s=d / p of the image.

[0009] Step 3: Guided face contour segmentation:

[0010] First, the CLIP model is initialized and the text prompt is encoded: a pre-trained CLIP model (ViT-B / 32) and its corresponding image preprocessor are loaded. A text prompt describing the target segmentation task is defined as "Select the largest, centrally located, semi-crystal tunnel face at the end of the tunnel. Avoid corners and side walls. Focus on the main excavation face in the middle, clearly separated from all equipment, people, and background." This prompt clearly indicates the need to accurately segment the tunnel face region in the photo. This text prompt is processed using CLIP's text encoder to generate a text feature vector, which is then L2-normalized. The specific normalization steps are: calculating the L2 norm (i.e., the vector modulus) of the text feature vector, then dividing each vector component by this norm to equal 1. This results in a normalized text feature vector, ensuring consistent scale for subsequent feature processing.

[0011] Next, image preprocessing and adaptive grid image block extraction are performed: a tunnel face image is loaded and converted to RGB format. The adaptive grid step size is calculated based on the image size, taking the value of 1 / 20 of the image width, height, and minimum values, rounded down, and ensuring a minimum step size of 1 pixel. A fixed margin of 32 pixels is set, and grid point coordinates are evenly distributed within the image. The grid point coordinates range from the upper left corner (32, 32) to the lower right corner (width - 32, height - 32). When extracting image blocks centered on each grid point, boundary constraints are implemented to handle grid points close to the image edge: the ideal extraction region boundaries (upper, lower, left, and right) are calculated, centered on the grid point. These calculated boundary values ​​are then compared with the actual image boundaries (0, image height, 0, image width). The boundary coordinates used to extract the image are ensured to strictly fall within the valid pixel range of the image. Specifically, the upper boundary is set to the maximum value (0, ideal upper boundary), and the lower boundary is set to the minimum value (image height, ideal lower boundary). The same applies to the left and right boundaries. This ensures that only pixels within the image are captured to form image blocks. The extracted image patches are then converted to the PIL image format and normalized using CLIP's image preprocessor. This preprocessor resizes (scales) the patches to the model's required input size (224×224 pixels) and performs CLIP model-specific normalization operations, namely subtracting the mean and dividing by the standard deviation. The processed patches are then merged to form a batch of patch data for model input.

[0012] Image block feature extraction, similarity calculation, and multi-stage guide point screening are then performed: all the pre-processed image blocks mentioned above are input into the CLIP image encoder, and the feature vectors of each image block are batch-calculated and L2 normalized. Similarly, the text feature vectors have also been pre-normalized by L2. Since both vectors have been normalized to unit vectors, the cosine similarity between them can be directly obtained by calculating their dot product. Therefore, by performing a dot product operation between the normalized text feature vector and each normalized image block feature vector, a series of similarity scores that quantify the degree of semantic matching are obtained, each score corresponding to an image block and its center point.

[0013] Based on these scores, the following multi-stage screening process was performed to generate high-quality SAM-guided cue points:

[0014] a) Top-K text similarity screening: Based on the similarity scores, a predetermined number (Top-K=10) of candidate image blocks with the highest text relevance and their corresponding center grid point coordinates are first screened out.

[0015] b) Visual consistency check: For the top-K candidate image blocks, the pairwise similarity between their image features is calculated. Based on the average visual similarity between each candidate block and other candidate blocks, a subset of candidate points with more consistent visual performance is further screened to exclude visual anomalies or interference points with significant differences in visual features from the subject area.

[0016] c) Spatial Clustering (DBSCAN): The DBSCAN clustering algorithm is applied to the spatial coordinates of candidate points that pass the visual consistency test. The spatially clustered candidate points are divided into different clusters according to the neighborhood radius (eps) and the minimum number of samples (min_samples) that are dynamically set based on the grid step size.

[0017] d) Optimal Cluster Selection and Final Guidance Point Determination: The optimal target cluster is identified based on a pre-set strategy (selecting the cluster with the highest average text similarity score). Within the selected optimal target cluster, the clusters are sorted according to their original text similarity scores, and the single or predetermined number of points with the highest scores are selected as the final guidance points. If clustering fails to produce a valid cluster or too few points meet the criteria, an alternative strategy is initiated, such as directly selecting the point with the highest text similarity after visual consistency screening.

[0018] A preset positive label (value 1) is assigned to the final selected one or more guide cue points, indicating that they belong to the target foreground area desired to be segmented.

[0019] In order to make the basic Segment Anything Model (SAM) more accurate in segmenting the tunnel face contour, it was fine-tuned. The fine-tuning process was based on a pre-trained SAM 2.1 model checkpoint (sam2.1_hiera_base_plus.pt) and trained using a custom dataset containing tunnel face images and their corresponding accurately labeled masks. During fine-tuning training, the input images were processed to a resolution of 1024×1024 pixels, the training batch size was 10, and a total of 100 cycles were trained. In order to improve the generalization ability of the model, a series of data augmentation transformations including random horizontal flipping, affine transformation, resizing, color jittering and grayscale were applied during training. The optimizer used AdamW and set a specific base learning rate (5.0×10 -6 ) and the visual encoder learning rate (3.0×10 -6 ), and a cosine annealing strategy was used to adjust the learning rate. Training was supervised using a composite loss function combining mask loss, Dice loss, and IoU loss. The entire training process was GPU-accelerated using CUDA, with automatic mixed-precision training enabled for improved efficiency. Through this fine-tuning process, the SAM model was able to better understand and segment the specific visual features of the tunnel face.

[0020] Finally, guided segmentation of the fine-tuned SAM is performed: the full, uncropped original tunnel face image is loaded into the SAM model predictor, which has been fine-tuned for the tunnel face scenario. The coordinates of the final guidance cue points generated by the aforementioned screening and their corresponding positive labels are used as input cues. Based on these precise guidance cues, the fine-tuned SAM model performs segmentation on the full image and outputs the final tunnel face contour mask.

[0021] The fourth step is to post-process the segmented tunnel face mask to calculate the mask pixel area. First, the original mask is binarized (with a threshold of 0.5) to convert it into a binary representation containing only foreground (target area) and background pixels. Connected component analysis techniques, such as the skimage.morphology.remove_small_objects function, are then applied to identify and remove all isolated noise regions whose area is smaller than a preset minimum size threshold (min_size). Next, image filling algorithms, such as scipy.ndimage.binary_fill_holes, are used to automatically fill any holes within the binary mask to ensure the integrity of the target area. Morphological operations are then performed to refine the mask boundaries: a morphological closing operation (cv2.morphologyEx with cv2.MORPH_CLOSE and a predefined structuring element, such as a 5×5 kernel) is applied to fill small gaps within the mask and connect adjacent foreground regions. A morphological opening operation (cv2.morphologyEx with cv2.MORPH_OPEN and the same structuring element) is then applied to smooth the mask boundaries and remove small protrusions or bridges. Optionally, to further smooth the edges, a Gaussian filter (cv2.GaussianBlur) can be applied to the morphologically operated mask and thresholded again. After completing these post-processing steps, an optimized final tunnel face region mask with sharper boundaries, more continuous interior, and less noise is obtained. Finally, the pixel area in the image coordinate system is calculated by counting the total number of foreground pixels (pixels with a value of 1 or True) contained in the optimized final mask.

[0022] The fifth step is to obtain the preset tunnel design contour area and compare it with the actual area of ​​the tunnel face: based on the pixel area of ​​the optimized tunnel face area calculated in the fourth step and combined with the pixel to physical size conversion ratio s determined in the second step, first multiply the pixel area by the square of the conversion ratio s (i.e., actual area = pixel area × s 2) to calculate the actual physical area of ​​the tunnel face excavation area. Simultaneously, the design area of ​​the preset standard excavation profile of the tunnel face is obtained from the tunnel engineering design specifications or drawings. The calculated actual physical area of ​​the tunnel face is then compared and analyzed with the preset design area. If the actual physical area is larger than the design area, the face is judged to have over-excavation, with the over-excavation amount being the difference between the actual physical area and the design area. If the actual physical area is smaller than the design area, the face is judged to have under-excavation, with the under-excavation amount being the difference between the design area and the actual physical area. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of the overall process of a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break provided by an embodiment of the present invention;

[0024] Figure 2 The original input image of a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram showing the marking of scale calibration reference points (P1, P2) and pixel distance (p) for a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break, provided in an embodiment of the present invention;

[0026] Figure 4 A display diagram of prompt points for a machine vision-based intelligent rapid identification technology for tunnel over- and under-break, provided in an embodiment of the present invention;

[0027] Figure 5 A schematic diagram of the tunnel face contour after fine-tuning the SAM model segmentation using a machine vision-based intelligent rapid identification technology for tunnel over- and under-break provided by an embodiment of the present invention;

[0028] Figure 6 The output image after post-processing optimization is obtained by a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break provided by an embodiment of the present invention;

[0029] Figure 7 A tunnel face design outline display diagram of a machine vision-based intelligent rapid identification technology for tunnel over- and under-break provided by an embodiment of the present invention; DETAILED DESCRIPTION

[0030] To simplify the operational process, the present invention integrates the data processing and model application processes. Specifically, field-collected laser ranging data and captured tunnel face images are input and transmitted to an integrated processing system, which automatically analyzes and outputs information on the over- and under-excavation status of the tunnel face. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0031] See also Figures 1 to 7 The embodiment of the present invention provides a machine vision-based intelligent rapid identification technology for tunnel over-break and under-break (the overall process is as follows Figure 1 ), comprising the following steps:

[0032] First, field data collection and scale calibration were performed. A laser rangefinder was placed on a stable support 10 m from the tunnel face. By rotating the rangefinder and recording the distance readings (d1 = 10.4 m, d2 = 10.7 m) and the rotation angle θ = 30°, the actual spatial distance d ≈ 5.47 m between two selected reference points on the tunnel face was calculated using the cosine theorem. At the same time, a camera was used to capture a clear image of the tunnel face containing these two reference points. The original input image is shown in Figure 1. Figure 2 Next, we apply image processing techniques (brightness threshold segmentation combined with spot / contour analysis to calculate the centroid) to the image to precisely locate the pixel coordinates of the two reference points in the image ((1196, 1540), (2788, 1540)), and use the Euclidean distance formula to calculate the pixel distance between them, p = 1592px, as shown in the figure. Figure 3 Finally, based on the actual spatial distance d and the pixel distance p, the pixel-to-physical size conversion ratio of the image is calculated as s = d / p ≈ 5.47m / 1592px ≈ 0.003436m / px, which will be used for subsequent size conversion.

[0033] After obtaining the image and scale, perform guided tunnel face contour segmentation. Load the pre-trained CLIP model and the SAM2.1 model that has been fine-tuned and optimized for the tunnel face scenario. Define the text prompt describing the segmentation target and use CLIP to obtain its text feature vector. Figure 2The tunnel face image shown in the figure generates uniform grid points inside, extracts multiple image blocks centered on these points, and calculates the CLIP image feature vector for each image block. By calculating the cosine similarity between the text features and the features of each image block, and combining a multi-stage screening strategy (including Top-K text similarity screening, visual consistency test, DBSCAN spatial clustering, and optimal cluster selection), one or a few high-quality guide prompt points that best represent the tunnel face area are accurately screened out. The positions of these selected prompt points on the original image are shown as follows: Figure 4 shown.

[0034] Afterwards, Figure 2 The complete image and Figure 4 The guidance cue points (and their corresponding positive labels) shown are input into the fine-tuned SAM2.1 model. Utilizing the powerful segmentation capability of the SAM2.1 model, under the guidance of precise cue points, the model segments the image and generates an initial contour mask of the tunnel face area. The segmentation result directly output by the fine-tuned SAM model is shown in the figure below. Figure 5 As shown. Figure 4 As can be seen in , the initial mask may contain some slight boundary irregularities or small noises.

[0035] In order to obtain a more accurate and smooth outline for area calculation, Figure 4 The initial mask shown in Figure 1 is then post-processed for optimization. This process includes binarization, removal of isolated small areas smaller than a preset area threshold, filling internal holes, and applying morphological closing and opening operations to smooth boundaries and fill gaps. After this series of processing, the final optimized tunnel face contour mask output image is obtained, as shown in Figure 1. Figure 6 As shown. Figure 4 and Figure 5 It can be seen that post-processing effectively improves the regularity and quality of the mask.

[0036] Finally, conduct over-excavation and under-excavation analysis. First, through statistical Figure 6 The number of foreground pixels in the optimized mask is calculated to be 5464751 pixels in pixel area. 2 Then, using the pixel to physical size conversion ratio s≈0.003436m / px calculated in the second step, the pixel area is converted to the actual physical area. Actual physical area = pixel area × s 2 ≈5464751px 2 ×(0.003436m / px) 2 ≈64.52m 2 .like Figure 7 The tunnel face design outline shown in the figure shows that the standard tunnel design area excluding the invert is approximately 65.23m based on this design outline. 2The calculated actual physical area of ​​the tunnel face (about 64.52m 2 ) and the design area (approximately 65.23m 2 ) for comparison: Since the actual physical area is larger than the designed area (64.52m 2 <65.23m 2 ), it was determined that the tunnel face was slightly undercut. The overcut area was approximately 65.23m 2 -64.52m 2 ≈0.71m 2 .

[0037] The above-described embodiment merely represents one embodiment of the present invention. While the description is relatively specific and detailed, it should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.

Claims

1. A machine vision-based intelligent rapid identification technology for tunnel over-break and under-break, characterized by: The following steps are involved: The first step is to set up a laser rangefinder at the tunnel construction site, rotate the laser rangefinder at a certain angle, and obtain the position information of two reference points on the horizontal line of the tunnel face; The second step is to calculate the actual spatial distance between the two reference points based on the distance and rotation angle information measured by the laser rangefinder. The third step is to obtain an image of the tunnel face, identify the two reference points in the image, calculate their pixel distance in the image, and determine the conversion ratio between the image pixels and the actual physical size based on the actual spatial distance. The fourth step is to combine the visual language model CLIP with the pre-fine-tuned segmentation model SAM, where the visual language model CLIP processes the tunnel face image and related text prompts to generate guidance information for guiding the fine-tuned SAM. The fine-tuning SAM segments and generates a tunnel face contour area mask according to the guidance information; in a fifth step, performing a post-processing operation on the tunnel face area mask generated by the segmentation to remove noise interference and optimize its boundary; In the sixth step, based on the tunnel face area optimized by the post-processing operation, its pixel area in the image is calculated, and the actual physical area of ​​the face is converted according to the pixel-to-physical size conversion ratio. In the seventh step, a preset tunnel design contour area is obtained and compared with the actual physical area of ​​the face to identify the overbreak or underbreak state of the face and determine the size of the overbreak / underbreak area.

2. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 1 of claim 1 is characterized by: The laser rangefinder is installed and fixed on a stable bracket, and the bracket with the laser rangefinder is arranged within a predetermined working distance range of 5m to 15m from the tunnel face. With the fixed point as the axis, based on the initial measurement direction, it is rotated 15 degrees to the left and 15 degrees to the right, respectively, with a total swing amplitude of 30 degrees, to obtain reference point position information in two different directions.

3. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 2 of claim 1 is characterized by: The distances d1 and d2 to two reference points on the horizontal line of the tunnel face are measured by a laser rangefinder, and the actual spatial distance d between the two reference points is calculated using the cosine theorem. The calculation process is based on the cosine theorem formula Provide basic data for subsequent pixel to physical size conversion ratio determination.

4. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 3 of claim 1 is characterized by: First, brightness threshold segmentation is performed on the tunnel face image to preliminarily identify the highlight areas representing the laser reference points. Subsequently, spot detection and contour analysis algorithms are applied to the identified highlight areas to calculate the centroid or geometric center of each highlight area, thereby determining the pixel coordinates (x, y) of each reference point in the image. Furthermore, the pixel distance between the two reference points in the image is calculated based on the pixel coordinates (x1, y1) and (x2, y2) of the two reference points, i.e., Then divide the actual spatial distance d obtained in the second step by the pixel distance p to obtain the pixel-to-physical size conversion ratio s, that is, s=d / p. This conversion is used to convert the pixel size in the image to the actual size in the subsequent steps.

5. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 4 of claim 1 is characterized by: The visual language model CLIP is used to encode a preset textual prompt describing the tunnel face to generate a textual feature vector. The acquired tunnel face image is processed, and multiple image blocks are extracted from the image based on a grid strategy. Each image block is encoded using the CLIP model to obtain a corresponding image block feature vector. The similarity score between the textual feature vector and each image block feature vector is calculated, and at least one image block with the highest similarity is selected accordingly. The pixel coordinates of the center point of the selected image block in the original tunnel face image are determined and used as the initial prompt point to guide the segmentation model SAM, and a preset positive label is assigned to the prompt point. Finally, the complete tunnel face image, the initial prompt point coordinates and their positive labels are provided as input to the fine-tuned segmentation model SAM. The SAM model performs image segmentation based on these inputs and outputs the tunnel face contour area. The pre-fine-tuned segmentation model SAM is obtained in the following manner: first, a custom training dataset containing multiple tunnel face images and corresponding accurate pixel-level segmentation mask annotations is constructed, and a pre-trained SAM model checkpoint is loaded as the initial weight. Training parameters are then set, including uniformly processing the input images to a predetermined resolution, setting the training batch size and the total number of training cycles, and applying data augmentation techniques such as random horizontal flipping, random affine transformation, and color jittering to improve model generalization. The AdamW optimizer is then selected, configured with a strategy that uses cosine annealing to adjust the base learning rate and the learning rates of specific parts of the model. A composite loss function consisting of mask loss, Dice loss, and intersection-over-union loss is used to guide training. Finally, under GPU acceleration and automatic mixed precision, the initialized SAM model is iteratively trained using the custom training dataset until the predetermined cycles are completed or convergence conditions are met, resulting in a fine-tuned SAM model optimized for tunnel face segmentation tasks.

6. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 5 of claim 1 is characterized by: The post-processing operation first performs a binarization process on the tunnel face area mask generated by the segmentation; Subsequently, connected region analysis is used to remove isolated noise regions with an area smaller than a preset threshold, and an image filling algorithm is used to fill the holes within the region mask. Morphological closing operations are then applied to connect adjacent regions and fill small gaps, and morphological opening operations are then applied to smooth the boundaries of the region mask, thereby obtaining the optimized final tunnel face region mask.

7. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 6 of claim 1 is characterized by: The calculation of the pixel area in the image is achieved by counting the total number of pixels covered by the optimized tunnel face area mask, and the conversion to obtain the actual physical area of ​​the tunnel face is achieved by multiplying the total number of pixels by the square of the pixel-to-physical size conversion ratio.

8. The machine vision-based intelligent rapid identification technology for tunnel over-break and under-break according to step 7 of claim 1 is characterized by: The actual physical area of ​​the tunnel face is compared with the preset tunnel design contour area. When the actual physical area is larger than the design area, it is identified as an over-excavation state, and the over-excavation amount is the difference between the actual physical area and the design area; when the actual physical area is smaller than the design area, it is identified as an under-excavation state, and the under-excavation amount is the difference between the design area and the actual physical area.

Citation Information

Cited By

  • Self-adaptive detection method and device for molded surface size and volume density of energy-gathered cutting cable

    CN121384158A

  • Vehicle-mounted highway tunnel brightness real-time monitoring and early warning system

    CN121963496A