A mobile tunnel detection method and system

Through differentiated processing and deep learning models of shield tunnels and mining tunnels, the problem of low tunnel detection efficiency is solved, and high-precision tunnel defect detection and positioning is achieved.

CN119784739BActive Publication Date: 2025-07-18BGI ENG CONSULTANTS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411990073.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-07-18
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The existing tunnel detection technology is inefficient, making it difficult to effectively use three-dimensional point cloud data for tunnel defect detection, and traditional feature engineering is difficult to design robust detection algorithms.

Method used

The tunnel is divided into shield tunnels and mining tunnels. The bolt holes of shield tunnels are extracted using the CSF algorithm and the DBSCAN algorithm, and the central point is obtained by using the mean-shift algorithm for ring-dividing and blocking; for mining tunnels, the index relationship between the point cloud and the lining map is established through target layout, and a deep learning-based detection model is constructed, including the backbone network and the neck network, and feature extraction and detection are used using ConvNeXt Block and CBAM attention mechanisms.

Benefits of technology

It significantly improves the accuracy and efficiency of tunnel defect detection, can accurately extract the bolt hole characteristics of shield tunnels and the positioning of mine tunnels, enhances the ability of the detection model to extract tunnel defect characteristics, and achieves the precise correspondence between the detection results and the three-dimensional spatial location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784739B_ABST
    Figure CN119784739B_ABST
Patent Text Reader

Abstract

The present application discloses a mobile tunnel detection method and system, which relates to the field of tunnel detection and includes: dividing tunnels into shield tunnels and mine tunnels; for shield tunnels, obtaining the three-dimensional point cloud of the shield tunnel, and using the CSF algorithm and the DBSCAN algorithm to extract bolt holes; using the mean-shift algorithm to obtain the center points of the bolt holes, and dividing the three-dimensional point cloud of the shield tunnel into rings and blocks according to the center points of the bolt holes to obtain the point cloud of the shield tunnel after ring and block division; for mine tunnels, using a mobile tunnel laser device with target layout, arranging a target at a preset distance along the tunnel axis to obtain the point cloud of the mine tunnel with target position information; generating a lining map of the mine tunnel according to the point cloud of the mine tunnel with target position information; establishing an index relationship between the point cloud of the mine tunnel and the lining map of the mine tunnel; positioning the point cloud of the mine tunnel according to the index relationship to obtain the positioned point cloud of the mine tunnel, etc., which improves the detection efficiency of tunnel defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of tunnel detection, and particularly to a mobile tunnel detection method and system. Background Art

[0002] Tunnels are important components of transportation infrastructure such as railways and highways, and are of great significance to economic and social development. With the rapid development of the transportation industry, tunnel projects are increasing day by day. To ensure the structural safety and service functions of tunnels, it is necessary to regularly detect and maintain operating tunnels.

[0003] Machine vision is an important intelligent detection means. By analyzing the target imaging, defects and abnormalities can be automatically identified. Introducing machine vision into the field of tunnel detection can significantly improve the detection efficiency and objectivity. However, the tunnel environment is complex and changeable, and ordinary two-dimensional imaging is difficult to comprehensively reflect the tunnel structure conditions. Three-dimensional laser scanning technology can obtain high-precision three-dimensional point cloud data of the tunnel, providing richer spatial information for tunnel detection.

[0004] However, the original tunnel point cloud data is huge and messy, containing a large amount of redundancy and noise, making it very difficult to directly analyze. Therefore, it is necessary to preprocess the point cloud data, extract key information, and establish the association between the point cloud and the two-dimensional image to make full use of three-dimensional information for detection. In addition, there are various types and forms of tunnel defects, and it is very difficult for traditional feature engineering to design a robust detection algorithm. Summary of the Invention

[0005] Aiming at the problem of low tunnel detection efficiency in the prior art, this application provides a mobile tunnel detection method and system. By dividing tunnels into shield tunnels and mine tunnels, collecting tunnel point clouds for preprocessing, establishing an index relationship between the point cloud and the lining image, and using machine learning for tunnel defect detection, etc., the detection efficiency of tunnel defects is improved.

[0006] The purpose of this application is achieved through the following technical solutions.

[0007] One aspect of the present application provides a mobile tunnel detection method, including: classifying tunnels into shield tunnels and mine tunnels according to the tunnel construction method; for shield tunnels, obtaining the three-dimensional point cloud of the shield tunnel, and using the CSF algorithm and the DBSCAN algorithm to extract bolt holes; using the mean-shift algorithm to obtain the center points of the bolt holes, and dividing and blocking the three-dimensional point cloud of the shield tunnel according to the center points of the bolt holes to obtain the point cloud of the shield tunnel after dividing and blocking; for mine tunnels, using a mobile tunnel laser device with target layout, arranging a target at a preset distance along the tunnel axis to obtain the point cloud of the mine tunnel with target position information; generating a lining map of the mine tunnel according to the point cloud of the mine tunnel with target position information; establishing an index relationship between the point cloud of the mine tunnel and the lining map of the mine tunnel; positioning the point cloud of the mine tunnel according to the index relationship to obtain the positioned point cloud of the mine tunnel; constructing a tunnel detection model based on deep learning, where the tunnel detection model includes a backbone network and a neck network; the backbone network uses a convolutional neural network, and a ConvNeXt Block network is set in the backbone network to extract tunnel leakage and water seepage features; the neck network uses a CBAM attention mechanism to enhance the weights of the tunnel leakage and water seepage features in the channel dimension and the spatial dimension; using the tunnel detection model to detect the point cloud of the shield tunnel after dividing and blocking or the positioned point cloud of the mine tunnel to obtain the detection results of the shield tunnel or the mine tunnel, and the detection results include the leakage, cable loosening, and equipment change conditions of the tunnel.

[0008] Among them, shield tunnel: A tunnel constructed by a shield machine. A shield machine is a special device for tunnel construction in soft soil strata. It erects segment linings while tunneling in the soil layer to form a tunnel structure. Mine tunnel: A tunnel constructed by the drill and blast method. The drill and blast method is a common method for constructing tunnels in rock strata. Through the cyclic operations of drilling holes, charging explosives, blasting, and mucking, the tunnel is gradually excavated, and shotcrete is sprayed to form a lining. CSF algorithm: Cloth Simulation Filter, a cloth simulation filtering algorithm. This algorithm adaptively extracts ground points by simulating the process of a virtual cloth laid on the three-dimensional point cloud sagging under gravity. It is used to segment the lining surface in shield tunnels. Mine tunnel lining map: Unfolding the inner surface of the mine tunnel into a two-dimensional plane image. Through a specific projection transformation method, while maintaining the texture features of the tunnel inner wall, it is convenient for image processing and analysis.

[0009] Among them, the backbone network: the main part of the neural network, which is used to extract high-dimensional features of the input data. The backbone network generally adopts mature convolutional neural network structures such as ResNet, VGG, etc., and is appropriately modified according to task requirements. Neck network: the intermediate network connecting the backbone network and the output layer. The neck network plays the role of fusing the features extracted by the backbone network, adjusting the scale and dimension of the feature map, and preparing for subsequent classification, detection and other tasks. ConvNeXt Block network: an improved convolutional neural network module. The ConvNeXt Block introduces depthwise separable convolution and inverse residual structure, reduces the number of model parameters while improving the feature extraction ability, and makes the network more efficient. CBAM attention mechanism: Convolutional Block Attention Module, convolutional block attention module. CBAM adaptively enhances the feature expression ability of the network by learning feature weights in the spatial dimension and channel dimension. Channel dimension: the depth direction of the feature map. In a convolutional neural network, each feature map corresponds to the output of a certain convolutional kernel, reflecting the activation degree of the input under the specific pattern defined by the convolutional kernel. Spatial dimension: the plane direction of the feature map. The spatial dimension reflects the feature distribution of the image at different positions in the two-dimensional plane, and reflects information such as the spatial structure and texture of the target.

[0010] Furthermore, for shield tunnels, obtaining the three-dimensional point cloud of the shield tunnel includes: obtaining the three-dimensional point cloud data of the shield tunnel; establishing a tunnel cross-section coordinate system with the geometric center of the tunnel as the origin, the vertical upward Z-axis as the positive direction, and the X-axis perpendicular to the Z-axis pointing to the right; calculating the angle θ of the tunnel wall points relative to the cross-section coordinate system; and converting the tunnel wall points from the cross-section coordinate system to the coordinates in the plane rectangular coordinate system according to the tunnel design parameters and the angle θ to obtain the unfolded tunnel wall point cloud.

[0011] Furthermore, calculating the angle θ of the tunnel wall points relative to the cross-section coordinate system is through the following formula:

[0012]

[0013] where: x i is the abscissa of the point on the cross-section, z i is the ordinate of the point on the cross-section, x0 is the abscissa of the geometric center of the tunnel, and z0 is the ordinate of the geometric center of the tunnel.

[0014] Furthermore, the CSF algorithm and the DBSCAN algorithm are used to extract bolt holes, including: performing coordinate transformation on the unfolded tunnel wall point cloud to obtain a tunnel wall point cloud with the same direction as the initially collected three-dimensional point cloud; constructing a CSF model, initializing the cloth mesh, and setting the mesh resolution to D times the average point spacing of the unfolded tunnel wall point cloud; setting the initial position of the cloth above the highest point of the point cloud within a preset range; using the CSF model to obtain the classification threshold hcc of the tunnel wall point cloud, where the classification threshold hcc is used to distinguish tunnel wall points from bolt hole points; iteratively calculating the height difference between each point in the tunnel wall point cloud and the cloth particles of the CSF model; marking the points with a height difference greater than the classification threshold hcc as potential bolt hole point clouds, and vice versa as tunnel wall point clouds; for the potential bolt hole point clouds marked, using the DBSCAN algorithm for clustering to obtain the final bolt hole point cloud.

[0015] Among them, the cloth mesh (ClothMesh): In the CSF algorithm, the cloth mesh is a virtual triangular mesh plane used to simulate flexible cloth; the cloth mesh consists of a series of interconnected triangles, and each triangle vertex is called a particle; the resolution of the cloth mesh is determined by the size of the triangles. The higher the resolution, the denser the mesh, and the finer the simulated cloth surface; in this algorithm, the resolution of the cloth mesh is set to D times the average point spacing of the point cloud to balance the calculation efficiency and simulation accuracy; the initial position of the cloth mesh is set above the highest point of the point cloud to prevent the cloth from directly passing through the point cloud surface.

[0016] Cloth particle (Cloth Particle): A cloth particle is the basic unit that makes up the cloth mesh, corresponding to each triangle vertex in the mesh; each cloth particle has its specific physical properties, such as mass, velocity, force, etc.; the cloth particles are connected by virtual springs to simulate the internal tension and shear force of the cloth; during the simulation, the cloth particles move under the action of gravity and internal tension, causing the cloth mesh to continuously sag and contact the point cloud surface; by solving the motion equations of the cloth particles, the deformation and position of the cloth mesh at each moment can be obtained.

[0017] CSF Model (Cloth Simulation Filter Model): The CSF model is a point cloud filtering algorithm based on physical simulation. By simulating the interaction between the cloth and the surface of the point cloud, it realizes the separation of ground points and non-ground points. The CSF model consists of three main parts: point cloud data, cloth grid, and physical constraints. The point cloud data is the input original three-dimensional point cloud, providing the object to be segmented. The cloth grid is a virtual flexible plane generated according to the point cloud resolution, interacting with the point cloud surface through physical simulation. The physical constraints define the material properties (such as stiffness, density) of the cloth grid and the external environment (such as gravity, damping). By iteratively solving the motion equation of the cloth grid, making it continuously contact the point cloud surface under physical constraints, and through the distance relationship between the cloth particles and the point cloud, the filtering and segmentation of the point cloud are realized. The CSF model can adapt to point cloud data with different characteristics by adjusting the cloth properties and classification thresholds, achieving robust and efficient point cloud processing.

[0018] Furthermore, the mean-shift algorithm is used to obtain the center points of the bolt holes. According to the center points of the bolt holes, the three-dimensional point cloud of the shield tunnel is divided into rings and blocks, obtaining the point cloud of the shield tunnel after ring and block division, including: based on the collected three-dimensional point cloud of the shield tunnel, using the final point cloud of the bolt holes, the mean-shift clustering algorithm is used to cluster each bolt hole and obtain the center point of the corresponding bolt hole; according to the preset splicing block design data, the recognition template of the center points of the bolt holes in the splicing block is defined, and the obtained center points of the bolt holes are matched with the recognition template to obtain the center points of the bolt holes in different splicing blocks; according to the relative position relationship of the center points of the bolt holes in different splicing blocks, the center points of the bolt holes in each splicing block are determined; using the center points of the bolt holes in adjacent splicing blocks, through interpolation and linear fitting, the longitudinal seams between adjacent splicing blocks are located; using the center points of the bolt holes within the same splicing block, through linear fitting and translation, the longitudinal seams between adjacent splicing blocks are located; using the center points of the bolt holes in adjacent two rings, through interpolation and linear fitting, the circumferential seams are located; using the located seams, the collected three-dimensional point cloud of the shield tunnel is divided into rings and blocks, obtaining the point cloud of the shield tunnel after ring and block division.

[0019] Among them, the identification template for the centers of the splicing block bolt holes: In shield tunnel construction, the tunnel lining is assembled by precast splicing blocks (such as segments). Regularly arranged bolt holes are reserved on each splicing block for connecting adjacent splicing blocks. The identification template for the centers of the splicing block bolt holes is a virtual geometric model that describes the theoretical positional relationship of the bolt hole centers on a single splicing block. This template is usually created according to the design drawings of the splicing block and contains the relative coordinates of the center points of each bolt hole. By matching the actually extracted bolt hole center points with the identification template, the specific position and number of each splicing block can be determined. The size and bolt hole arrangement of the identification template will vary according to different shield tunnel designs and need to be adapted according to the project information.

[0020] Interpolation and line fitting: Interpolation and line fitting are two commonly used mathematical methods in data processing. Interpolation is a method for estimating the values of a function between known data points. Common interpolation methods include linear interpolation, spline interpolation, etc. In this method of dividing rings and blocks, interpolation is used to estimate the seam position between the centers of two adjacent bolt holes. A series of equally spaced points can be generated between the centers of two bolt holes through linear interpolation, approximately representing the edge of the splicing block. Line fitting is a method for fitting a straight-line equation based on known data points. Common fitting methods include the least squares method, RANSAC, etc. In this method, line fitting is used to estimate the connection line between the centers of bolt holes on the same splicing block or adjacent rings, representing the longitudinal edge or circumferential seam of the splicing block. By fitting the straight-line equation of the bolt hole center points, the positioning error of individual points can be reduced, and a more stable edge or seam position can be obtained.

[0021] Furthermore, different splicing blocks include: the crown block, adjacent blocks, and standard blocks; the crown block is located at the tunnel crown position and is assembled by multiple splicing blocks. There are multiple bolt holes in the crown block, and the center points of the bolt holes in the crown block are distributed in a ring shape. By identifying the center points of the bolt holes in the crown block, the spatial position of the tunnel crown can be determined; the adjacent blocks are located on both sides of the crown block, adjacent to and connected to the crown block. There are multiple bolt holes in the adjacent blocks, and the center points of the bolt holes in the adjacent blocks are distributed in the same horizontal plane; by identifying the center points of the bolt holes in the adjacent blocks, the spatial positions on both sides of the tunnel can be determined; the standard blocks are located below the crown block and the adjacent blocks, arranged longitudinally and circumferentially along the tunnel to form the main body of the tunnel lining structure. There are multiple bolt holes in the standard blocks, and the center points of the bolt holes in the standard blocks are distributed in the same vertical plane; by identifying the center points of the bolt holes in the standard blocks, the longitudinal and circumferential seams of the tunnel lining can be determined.

[0022] Furthermore, an index relationship is established between the mine tunnel point cloud and the mine tunnel lining drawing, including: collecting two-dimensional cross-section point clouds along the design axis direction of the mine tunnel using a scanner; converting the collected two-dimensional cross-section point clouds into three-dimensional point clouds according to the mileage data of the scanner; taking the design axis direction of the mine tunnel as the positive y-axis direction and the normal direction of the cross-section where the center point of the scanner is located as the positive z-axis direction, scanning with the center point as the origin o to establish a three-dimensional tunnel coordinate system; along the positive y-axis direction, numbering the cross-sections perpendicular to the y-axis in the collection order to establish a column index; starting from the intersection point P of the negative z-axis and the cross-section, numbering the point clouds in the cross-section in the clockwise direction to establish a row index; according to the row index and the column index, writing the three-dimensional coordinates and point cloud information of the corresponding point clouds into a pixel matrix to establish an index relationship between the mine tunnel point cloud and the mine tunnel lining drawing.

[0023] Among them, the design axis direction: The design axis refers to the center line of the tunnel in the tunnel design drawing, which represents the theoretical trend of the tunnel. In tunnel construction and inspection, the design axis provides a global reference direction for guiding tunnel excavation, lining, measurement, etc. The design axis is usually defined by a series of three-dimensional coordinate points or linear elements (such as straight lines, circular curves, transition curves, etc.). In this indexing method, the design axis direction of the mine tunnel is defined as the positive y-axis direction of the tunnel three-dimensional coordinate system. With the design axis direction as a reference, the tunnel point cloud and the lining drawing can be unified into a common coordinate framework, facilitating the establishment of the corresponding relationship between them.

[0024] Mileage data: Mileage data refers to the distance of a certain position in the tunnel from the tunnel starting point, usually measured along the tunnel design axis direction. In tunnel construction and inspection, mileage data is used to mark the spatial positions of each cross-section or component in the tunnel and is an important positioning means. Mileage data can be obtained through measurement devices such as total stations and laser rangefinders, or can be calculated based on the movement speed and time of the scanner. In this method, the mileage data recorded when the scanner collects two-dimensional cross-section point clouds is used to convert the cross-section point clouds into three-dimensional point clouds. Through the mileage data, the cross-section point clouds collected at different positions can be spliced together according to the actual spatial relationship to form a complete three-dimensional tunnel point cloud model.

[0025] Point cloud information: Point cloud information refers to the attribute data contained in each point in the point cloud, such as three-dimensional coordinates, color, reflection intensity, etc. In addition to basic geometric information, the point cloud can also carry rich semantic information, such as material type, damage condition, etc. Point cloud information can be directly collected by a scanner or extracted or appended from the original point cloud through post-processing methods. In this indexing method, the three-dimensional coordinates and other attribute information of the point cloud are written into the pixel matrix, establishing a one-to-one correspondence with the pixels of the lining diagram. Through point cloud information, the geometric and semantic features of the tunnel can be mapped from the three-dimensional space to the two-dimensional image space, facilitating the application of image processing and deep learning algorithms for analysis.

[0026] Pixel matrix: A pixel matrix refers to a two-dimensional array indexed by row and column numbers, where each element corresponds to a pixel in the image. Each element in the pixel matrix can store attribute information such as the color, grayscale, and depth of the pixel. In digital image processing, the pixel matrix is the basic storage and representation form of an image, and most image algorithms operate on the pixel matrix. In this indexing method, the tunnel lining diagram is represented as a pixel matrix, and the row and column indices of the matrix correspond to the tunnel cross-section and axial position. By mapping the tunnel point cloud to the pixel matrix, a pixel-level correspondence between the point cloud and the lining diagram can be established, converting three-dimensional information into two-dimensional information for subsequent image analysis and defect detection.

[0027] Furthermore, locate the mine tunnel point cloud according to the indexing relationship to obtain the located mine tunnel point cloud, including: constructing a training set according to the preset layout rule of the targets in the mine tunnel lining diagram; the preset layout rule includes the equidistant layout of the targets along the tunnel axis and the black-and-white interval distance of the target images; training the YOLOv7 model using the training set to obtain a target recognition model; using the target recognition model to obtain the pixel coordinates of each target in the mine tunnel lining diagram; according to the pixel coordinates of the targets, using the indexing relationship between the mine tunnel point cloud and the mine tunnel lining diagram, obtain the three-dimensional coordinates of each target in the mine tunnel point cloud; according to the three-dimensional coordinates of the targets, perform coordinate transformation on the mine tunnel point cloud to register the mine tunnel point cloud with the mine tunnel lining diagram to obtain the located mine tunnel point cloud.

[0028] Among them, the black-and-white alternating distance: In this method, the black-and-white alternating distance refers to the width of the black-and-white rectangular stripes in the target pattern; the target is usually composed of several black-and-white rectangular stripes arranged alternately, forming a special visual pattern. The black-and-white rectangular stripes produce obvious gray-scale changes and gradient features in the image, which are easy to be detected and recognized by computer vision algorithms. By designing an appropriate black-and-white alternating distance, stable recognition of the target can be achieved at different scales, and the robustness of the positioning method can be improved. The selection of the black-and-white alternating distance needs to comprehensively consider factors such as the size of the target, the resolution of the camera, and the shooting distance. Generally speaking, the larger the black-and-white alternating distance, the more obvious the visual features of the target and the farther the recognition distance; however, too large a distance will also reduce the spatial resolution of the target. In practical applications, the black-and-white alternating distance is usually selected in the range of centimeters to decimeters to balance the recognition effect and positioning accuracy. The black-and-white alternating distance, as a key parameter in the design of the target pattern, plays an important role in the point cloud positioning method for mine tunnels. By optimizing the black-and-white alternating distance, the recognition effect of the target in a complex environment can be improved, and the occurrence of missed detections and false detections can be reduced. At the same time, the design of the target pattern also needs to be adapted to the characteristics of target detection algorithms such as YOLOv7 to fully utilize the performance advantages of deep learning models. In this application, the black-and-white alternating distance of the target, together with its layout spacing along the tunnel axis, constitutes the preset layout rule of the target in the mine tunnel lining diagram. This regular layout method not only helps to improve the efficiency of target recognition and matching, but also provides reliable control information for subsequent point cloud coordinate transformation and registration. By reasonably designing the black-and-white alternating distance and layout spacing of the target, high-precision positioning of the mine tunnel point cloud and the lining diagram can be achieved, laying a coordinate foundation for tunnel defect detection and condition assessment.

[0029] Furthermore, a tunnel detection model based on deep learning is constructed. The tunnel detection model includes a backbone network and a neck network, and the steps are as follows: obtaining the segmented shield tunnel point cloud data or the located mine tunnel point cloud data, and converting the point cloud data into tunnel lining images; cropping the tunnel lining images into sub-images of size MxM to obtain a shield tunnel lining image subset and a mine tunnel lining image subset; preprocessing the shield tunnel lining image subset and the mine tunnel lining image subset respectively; annotating the preprocessed shield tunnel lining image subset and mine tunnel lining image subset to label tunnel defects, where the tunnel defects include tunnel leakage; using the preprocessed and annotated shield tunnel lining image subset and mine tunnel lining image subset as the training set, adopting a convolutional neural network as the backbone network, and setting a ConvNeXt Block network in the backbone network to extract tunnel defects; setting a neck network after the backbone network, and the neck network adopts a CBAM attention mechanism; during the training process of the tunnel detection model, using GIOU-Loss as the localization loss function; using the trained tunnel detection model to detect the segmented shield tunnel point cloud or the located mine tunnel point cloud, and mapping the detected tunnel defects to the point cloud positions through the index relationship between the point cloud and the tunnel lining images to obtain the three-dimensional spatial positions of the tunnel defects, which are output as the tunnel detection results.

[0030] Another aspect of the present application also provides a mobile tunnel detection system for implementing a mobile tunnel detection method of the present application.

[0031] Compared with the prior art, the advantages of the present application are as follows:

[0032] Adopting a targeted point cloud preprocessing strategy for tunnels with different construction methods can significantly improve the accuracy and efficiency of tunnel defect detection. For shield tunnels, bolt holes are extracted through the CSF algorithm and the DBSCAN algorithm, and the center points of the bolt holes are obtained using the mean-shift algorithm, thereby achieving precise segmentation and blocking of the point cloud. Bolt holes are important features in the shield tunnel structure. By extracting this feature and performing blocking based on it, the structural characteristics of the tunnel can be fully utilized to make subsequent detection more targeted. At the same time, the CSF algorithm can effectively separate ground points and non-ground points, the DBSCAN algorithm can achieve clustering of bolt holes, and the mean-shift algorithm can obtain the precise center of the bolt holes. The combination of the three can achieve high-precision extraction and positioning of bolt holes. For mine tunnels, point clouds are obtained through a mobile laser device with target layout, and an index relationship between the point cloud and the lining diagram is established, thereby achieving precise positioning of the point cloud. Due to the low construction accuracy of mine tunnels, the lining structure is not regular enough, and there are no obvious features such as bolt holes in shield tunnels. Introducing external targets and establishing an index can make up for the deficiencies of mine tunnels themselves and provide a reliable positioning basis for subsequent detection.

[0033] Adopting an advanced deep learning detection model, introducing an attention mechanism and an innovative network structure, it is possible to extract more refined and comprehensive tunnel defect features, thereby improving the detection accuracy. The backbone network uses a convolutional neural network and sets ConvNeXt Block. Among them, the convolutional neural network has been widely verified in image feature extraction. The ConvNeXt Block can model feature dependence relationships at a finer granularity through strategies such as pointwise convolution and Layer Normalization, which helps to extract local and detailed features. The neck network adopts the CBAM attention mechanism. By explicitly modeling the importance of features in both the channel and spatial dimensions, the network focuses on the key features related to tunnel defects, suppresses redundant and noise information, and thus enhances the detection accuracy. At the same time, the CBAM module has a small computational amount and is easy to embed, and will not significantly increase the model complexity. In addition, during the training process, GIOU-Loss is used as the localization loss function. Compared with the traditional IOU-Loss, it imposes a greater penalty on the prediction boxes with a smaller overlapping area, so it can guide the model to learn more accurate localization.

[0034] By establishing an index relationship between the tunnel point cloud and the lining image, the precise correspondence between the detection result and the three-dimensional spatial position can be achieved, providing a reliable basis for the localization and repair of tunnel defects. The lining image contains rich two-dimensional structural information, which is convenient for using mature image processing and analysis algorithms for defect detection. However, in tunnel engineering, the spatial position of the defect needs to be clarified. Through the index relationship, it is convenient to perform mapping conversion between two-dimensional detection and three-dimensional localization, taking into account the requirements of both detection and localization. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] This application will be further described in the form of exemplary embodiments, and these exemplary embodiments will be described in detail through the drawings. These embodiments are not restrictive. In these embodiments, the same numbers represent the same structures, where:

[0036] Figure 1 is a schematic diagram of an exemplary application scenario of a mobile tunnel detection method shown according to some embodiments of the present application;

[0037] Figure 2 is a schematic diagram of the cross-section coordinate system according to the present application;

[0038] Figure 3 is a schematic diagram of the unfolded effect of the tunnel wall according to the present application;

[0039] Figure 4 is a schematic diagram of the identification of the bolts of the capping block according to the present application;

[0040] Figure 5Schematic diagram of the classification result of the bolt hole center according to the present application;

[0041] Figure 6 Schematic diagram of the straight line fitting of the capping block and the adjacent block according to the present application;

[0042] Figure 7 Effect diagram of the longitudinal joint positioning of the capping block and the adjacent block according to the present application;

[0043] Figure 8 Schematic diagram of the circumferential joint fitting effect according to the present application;

[0044] Figure 9 Effect diagram of the circumferential joint positioning according to the present application;

[0045] Figure 10 Effect diagram of the joint positioning in the plane state according to the present application;

[0046] Figure 11 Effect diagram of the shield tunnel joint positioning according to the present application;

[0047] Figure 12 Schematic diagram of the tunnel three-dimensional coordinate system according to the present application. Specific implementation mode

[0048] The methods and systems provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0049] As Figure 1 shown, this embodiment provides a hardware detection vehicle for collecting point cloud data in a tunnel. The detection vehicle adopts a segmented design and is composed of four parts: a left wheel group module, a right wheel group module, a scanner module, and a central control module. The weight of each module does not exceed 20 kg, and the total weight does not exceed 40 kg, which is convenient for manual handling and assembly. The left wheel group module and the right wheel group module are symmetrically arranged and are located on the left and right sides of the detection vehicle respectively. Each wheel group module includes a driving wheel and a driven wheel, and the distance between the two wheels is measured in real time through a gauge sensor to adapt to tunnel tracks with different gauges. A conductive rod is also provided on the wheel group, which can be lowered to contact the track or lifted to insulate from the track as needed. The two conductive rods on the left and right are connected by a wire for detecting the conduction of the track. In addition, the wheel group module is also provided with a foldable carrying handle for convenient manual handling.

[0050] The scanner module is located in the middle of the inspection vehicle and consists of two parts: the scanner main body and the support base. The scanner uses a commercial three-dimensional laser scanner, and the model can be selected according to the requirements of scanning accuracy and efficiency. The support base is fixed on the top of the central control module, and threaded holes are opened on it for threaded connection with the central control module. By tightening the bolts, the scanner can be firmly installed on the inspection vehicle. The central control module is the core of the inspection vehicle, integrating multiple functions such as control, power supply, mileage measurement, and attitude detection. Its external structure includes a detachable battery, lighting headlights, an industrial computer, control buttons, and a handling handle, etc. The detachable battery is convenient for charging and replacement, and is connected to other electrical components through internal cable plugs to ensure the reliability of power supply. The control buttons are used for on-site manual control of the start-stop and mode switching of the inspection vehicle. The on-vehicle industrial computer can realize the automated control of the inspection vehicle as well as tasks such as data acquisition, storage, and upload. The built-in part includes a drive motor, a mileage encoder, an inclination sensor, and a motor controller, etc. The drive motor is connected to the driving wheel and drives the inspection vehicle to move forward or backward according to the control instructions. The mileage encoder records the driving distance in real time, synchronizes with the scan data, and provides position information for three-dimensional reconstruction. The inclination sensor is used to detect the pitch and roll angles of the vehicle body, and based on this, the flatness of the track can be judged. The left wheel group module, the right wheel group module, and the central control module are connected by quick locks. When connecting, just align the quick lock connector with the connecting seat and tighten the knob to quickly lock. When disassembling, reverse-rotate the knob to separate, and the operation is simple. Handling handles are provided at the front and rear of the central control module. When in use, the handles can be unfolded, and when not in use, the handles can be folded, which is convenient for handling and storage.

[0051] According to the construction methods of tunnels, tunnels are divided into shield tunnels and mine tunnels; there are obvious differences in the structural characteristics and surface morphologies of these two types of tunnels: Shield tunnels are excavated by shield machines, and the lining is usually assembled by precast segments. Bolt connections are provided between the segments, so a large number of bolt holes are distributed on the wall surface of shield tunnels. These bolt holes have regular sizes and are arranged in an orderly manner, which are typical characteristics of shield tunnels. Mine tunnels are mostly excavated by the drill-and-blast method, and the lining generally uses cast-in-place concrete, with a relatively rough surface and lack of obvious structural characteristics. And due to construction process limitations, the lining shape and dimensional accuracy of mine tunnels are often not as good as those of shield tunnels. In view of the differences between the two types of tunnels, this application intends to design a point cloud preprocessing strategy specifically. For shield tunnels, the key is to extract the bolt hole features and perform point cloud segmentation accordingly; for mine tunnels, target points are manually arranged to establish the correspondence between the point cloud and the lining image. This idea of differential processing can make full use of the structural characteristics of different tunnels and improve the pertinence and effectiveness of preprocessing. In addition, due to the low construction accuracy of mine tunnels and the irregular cross-sectional shape, it is difficult to directly perform three-dimensional reconstruction. While the segment specifications of shield tunnels are unified and the cross-sectional shapes are basically the same, three-dimensional reconstruction is relatively easy to achieve. Therefore, introducing the intermediate expression of the lining unfolded image for mine tunnels can, to a certain extent, avoid shape errors in three-dimensional reconstruction and facilitate subsequent defect analysis.

[0052] For shield tunnels, a mobile laser scanning device is first used to obtain the three-dimensional point cloud data of the tunnel. Since the overall structure of the shield tunnel is cylindrical, in order to facilitate subsequent processing, it is necessary to project and flatten the point cloud. Taking the ellipse fitting center of the tunnel section as the origin, a coordinate system is established. The positive direction of the Z-axis is vertically upward, the X-axis is perpendicular to the Z-axis and points to the right, and the Y-axis is determined according to the right-hand rule, as Figure 2 shown. Taking each section as a unit, calculate the angle θ between the section points on the left and right sides of the z-axis and the z-axis:

[0053] Combined with the designed radius R of the tunnel segment, according to the arc length formula L = R×θ, where: x i is the abscissa of the point on the section, z i is the ordinate of the point on the section, x0 is the abscissa of the geometric center of the tunnel, and z0 is the ordinate of the geometric center of the tunnel. Calculate the arc length L of each point with respect to the positive direction of the z-axis, which is recorded as the Y coordinate value of each point after projection; according to the designed radius R of the shield segment, use the arc length formula to calculate the coordinates (u i in the unfolded image i , v i ): u i = R×θ i , v i = y i , that is, the point P i is rotated by an angle θ i around the Z-axis and translated along the Y-axis by y i to obtain its position in the unfolded image. To facilitate the restoration of the three-dimensional information of the point cloud, while saving the coordinates of the unfolded image, the original three-dimensional coordinates are also saved. Therefore, each point contains 7 fields: (x i , y i , z i , u i , v i , θ i , R), Figure 3 shows the effect after the tunnel is unfolded. Through the above flattening process, the shield tunnel point cloud is converted into a two-dimensional image, similar to the relationship between the ground point cloud and the non-ground point cloud in the airborne lidar scenario. This creates conditions for further extracting tunnel features.

[0054] After the flattening process of the tunnel point cloud is completed, it is necessary to further extract the bolt hole features. Since the flattening process changes the coordinate system of the point cloud, in order to facilitate subsequent processing and visualization, it is necessary to restore the unfolded point cloud to the coordinate system at the time of initial acquisition. Let the coordinates of the unfolded point P i be (u i , v i ), and the corresponding rotation angle be θ i, with a radius of R, its three-dimensional coordinates (x i ', y i ', z i ) are: x i ' = R×sin(θ i ); y i ' = v i ; z i ' = R×cos(θ i ); After coordinate transformation, the direction of the expanded tunnel wall point cloud is consistent with that of the original point cloud.

[0055] The CSF (Cloth Simulation Filter) algorithm realizes the extraction of ground point cloud by simulating the process of a virtual cloth drooping and gradually conforming to the ground. According to the distribution range (x min , x max , y min , y max ) of the expanded tunnel wall point cloud and the average point spacing d avg , an initial rectangular grid cloth model is initialized. The resolution r c of the cloth grid is set to D times the average point spacing: r c = D×d avg , where D is the cloth resolution factor, usually taking values from 2 to 5. The larger the D value, the sparser the cloth grid; the smaller the D value, the denser the cloth grid. The value of D needs to balance the calculation efficiency and the ground fitting accuracy. In the xoy plane, the node coordinates (x c , y c ) of the cloth grid are:

[0056]

[0057] Initially, the z coordinate z c of the cloth is set to a preset distance h0 above the highest point of the point cloud: z c = max(z i ) + h0; where z i is the z coordinate component of the point cloud P i , and h0 is the initial height of the cloth, which should be greater than the maximum possible depth of the bolt hole. This setting is to ensure that the cloth can fully cover and droop to all bolt hole areas.

[0058] Use the constructed CSF model to preliminarily classify the tunnel wall point cloud to obtain tunnel wall points (ground points) and potential bolt hole points (non-ground points). First, iteratively calculate the height difference Δh i between each point P i and the cloth particles. Let the coordinates of P i be (x i , yi , z i ), the coordinates of the fabric particle closest to its xoy projection are (x c , y c , z c ). Then the height difference is: Δh i = z i - z c . Then, set a height threshold h t . If Δh i > h t , then mark P i as a potential bolt hole point, otherwise mark it as a tunnel wall point. There are two common methods for the value of h t : Statistical estimation based on training data. In the labeled training data, statistically calculate the height difference between the bolt hole points and the surrounding tunnel wall surfaces, and take its mean or median as h t . This method requires manual annotation of a certain amount of data, but it can better adapt to the characteristics of different tunnels. Estimation based on prior knowledge. Since the designed depth of the bolt hole is usually known, it can be directly used as the estimated value of h t . Considering construction errors and wear, the value range of h t can be appropriately relaxed, such as taking 1.5 times the designed depth. This method is simple and intuitive, but its generalization ability may be poor. The CSF model realizes the preliminary classification of the tunnel wall point cloud by constructing a grid-like fabric and solving the height difference between each point and the fabric. The selection of the classification threshold h t can be either through data-driven statistical estimation or by using the prior knowledge of the bolt hole design parameters. This process can effectively distinguish the tunnel lining surface and the bolt hole area, laying a foundation for further bolt hole clustering and extraction.

[0059] After completing the CSF model classification, potential bolt hole point clouds are obtained. To further extract the precise positions of each bolt hole, these point clouds need to be clustered. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm that can classify potential bolt hole point clouds into different bolt holes. DBSCAN has two key parameters: Neighborhood radius ε (eps): determines the maximum connected distance between points. If the distance between two points is less than or equal to ε, they are considered density-reachable. Minimum number of points to form a cluster minPts: determines the minimum number of points in a cluster. If the number of points within the ε-neighborhood of a point is greater than or equal to minPts, then this point is a core point. The value of ε needs to consider the diameter of the bolt hole and the sampling spacing of the point cloud. Generally, ε can be set to 1 / 4 to 1 / 2 of the bolt hole diameter. This can ensure that the points within the same bolt hole are connected, while the points between different bolt holes are not. The value of minPts needs to consider the point cloud density in the bolt hole area. minPts can be estimated based on the average number of points contained in each bolt hole. For example, if each bolt hole has an average of 100 points, then minPts = 50 can be taken, that is, a cluster should contain at least 50% of the average number of points. Use the determined ε and minPts to perform DBSCAN clustering on the potential bolt hole point clouds, obtaining a series of point cloud clusters {C1, C2,......, C n}. Each cluster C i corresponds to a bolt hole. For each point cloud cluster C i , if the number of points it contains C i ≥ minPts, then retain this cluster, otherwise regard it as noise and eliminate it. This can filter out some pseudo bolt holes formed by scattered points or small areas. For each retained bolt hole point cloud cluster C i , use the mean-shift algorithm to extract its centroid as the precise position of this bolt hole. Use the mean-shift algorithm to cluster each bolt hole point cloud and calculate the centroid after clustering as the center point of this bolt hole. The bandwidth parameter Bandwidth of Mean-shift is set to 0.1 m, that is, the points within a spherical neighborhood with a radius of 0.1 m centered on each point will gather towards the highest density area and finally converge to the local maximum point, which is the center position of the bolt hole.

[0060] Identification of the bolt hole of the capping block: As Figure 4As shown, there are 6 bolt holes in the capping block, and their center points are approximately distributed on a circle with a radius of R, and the center of the circle is the geometric center C(x0, y0) of the capping block. Based on this prior knowledge, an identification template for the bolt holes of the capping block can be defined: draw a circle with C(x0, y0) as the center and R as the radius, and select all the center points of the bolt holes that fall within this circular area, denoted as the set S = {P1, P2,......, P n}, where n ≥ 6. For each point P i (x i , y i ) in the set S, determine whether it is located within the given 5 rectangular areas. The positions and sizes of these 5 rectangles are determined according to the design drawing of the capping block, and respectively correspond to the theoretical positions of the 5 bolt holes except the center of the circle. If exactly 5 points in the set S are located within the specified rectangular areas, then the 6 bolt holes of the capping block are identified, including the center C and these 5 points. Through the above template matching method, the positions of the bolt holes of the capping block can be accurately located and marked as a specific category, such as being given red color.

[0061] Identification of bolt holes of adjacent blocks and standard blocks: After identifying the bolt holes of the capping block, the ownership of the remaining bolt holes can be inferred using the positional relationship between the adjacent blocks and the standard blocks relative to the capping block. According to the design parameters, calculate the theoretical positions of the bolt holes of the adjacent blocks and the standard blocks relative to the bolt holes of the capping block. Usually, the center points of the bolt holes of the left and right adjacent blocks are located on both sides of the connection line of the center points of the bolt holes of the capping block, and the distance is the width of the adjacent block; the center point of the bolt hole of the standard block is located below the center point of the bolt hole of the adjacent block, and the distance is the block height. Traverse all the remaining center points of the bolt holes, for each point P(x, y): calculate the horizontal distance d h and the vertical distance d v from P to the center points of the 6 bolt holes of the capping block. If d h is within the error range of the width of the adjacent block, and d v is close to 0, then classify P as a bolt hole of the adjacent block and give it blue color.

[0062] Furthermore, it can be further divided into left adjacent block and right adjacent block according to whether P is on the left or right side of the center line of the capping block. If d v is within the error range of the height of the standard block, and d h is close to the horizontal distance of the bolt hole of the adjacent block, then classify P as a bolt hole of the standard block and give it green color. For the center points of the bolt holes that fail to be successfully matched, they can be marked as an unknown category, or interpolated and estimated according to the categories of their neighboring points. Through the above method, the bolt holes belonging to the capping block, adjacent blocks and standard blocks can be identified in sequence and distinguished by different colors. Figure 5The final classification results are shown. This process makes full use of the relative positional relationships between different blocks, reduces the search scope during recognition, and improves the efficiency and accuracy of the algorithm. At the same time, a dedicated recognition template is designed for the bolt holes of the capping block, which can effectively handle the special structure at the tunnel vault and enhance the robustness of recognition.

[0063] Longitudinal joints are the joints along the longitudinal direction of the tunnel (the tunnel advancing direction) and are used to connect adjacent ring blocks. Within each ring block, the longitudinal joints separate the capping block from the adjacent blocks, and the adjacent blocks from the standard blocks. As Figure 6 , at the center points of two bolt holes are selected on each of the left and right sides of the capping block, namely A1, A2 and B1, B2, which are located at the junction of the capping block and the left (right) adjacent block. Interpolation is performed on A1, A2 and B1, B2 respectively to obtain point A and point B, then the straight line where the ray AB lies is the left longitudinal joint (straight line 1). Similarly, at the center points of bolt holes C1, C2 and D1, D2 are selected on the right side of the capping block, interpolation is performed to obtain point C and point D, then the straight line where the ray CD lies is the right longitudinal joint (straight line 2). Straight line 1 and straight line 2 are symmetric about the tunnel center line, and they separate the capping block from the left and right adjacent blocks. To determine the longitudinal demarcation line between the adjacent block and the standard block, two bolt hole center points E and F close to the edge are taken within the capping block, and the straight line EF (straight line 3) is fitted, and this straight line is approximately parallel to the tunnel center line. According to the design drawings, the width of the adjacent block is 3.7m. Therefore, straight line 3 is translated 3.7m to the left and right respectively to obtain two new straight lines, which are the demarcation lines between the adjacent block and the standard block. Through the above steps, the longitudinal segmentation within the tunnel ring block is completed. Straight lines 1 and 2 are the demarcation lines of the capping block, and the translated straight line 3 is the demarcation line of the adjacent block, and a ring block is cut into 5 longitudinal sub-blocks, and the longitudinal joint positioning effect is as Figure 7 .

[0064] Circumferential joints are the joints along the circumferential direction of the tunnel and are used to connect adjacent ring blocks before and after. Since the standard blocks of adjacent ring blocks are distributed on the same circumference, the circumferential joints can be obtained by fitting the center points of the bolt holes on the standard blocks. As Figure 8 shown, on the standard blocks of two adjacent ring blocks before and after, multiple pairs of bolt hole center points are selected along the circumferential direction, such as a1 - a2, b1 - b2, c1 - c2, d1 - d2, e1 - e2, f1 - f2, g1 - g2, h1 - h2, etc. The midpoints are taken for each pair of points (a1,a2), (b1,b2), (c1,c2), (d1,d2), (e1,e2), (f1,f2), (g1,g2), (h1,h2) respectively to obtain

[0065] points, etc., and they approximately fall on a circumference.

[0066] Use the least squares method to fit points a, b, c, d, e, f, g, h to obtain a planar circular ring, and the plane where it is located is the circumferential joint surface. Specifically, given the coordinates of 8 points a(x a ,y a ,z a ), b(x b ,y b ,z b ),......, h(x h ,y h ,z h ), we want to fit a planar circular ring to make it as close to these points as possible. The planar circular ring can be described by the center coordinates (x0, y0, z0), the normal vector (A, B, C), and the radius R. Among them, (A, B, C) is the unit normal vector of the circular ring plane, satisfying A 2 +B 2 +C 2 =1. The goal of least squares fitting is to solve a set of parameters (x0, y0, z0, A, B, C, R) such that the sum of the squares of the distances from these 8 points to the fitted circular ring is minimized. We define the distance d i from point P i (x i ,y i ,z i ) to the circular ring as:

[0067]

[0068] ; where the first term represents the square of the difference between the distance from point P i to the center and the radius R, and the second term represents the square of the distance from point P i to the circular ring plane. Construct the least squares objective function: Constraint condition: A 2 +B 2 +C 2 =1; This is a non-linear optimization problem with equality constraints, which can be solved by methods such as the Lagrange multiplier method or sequential convex optimization. To simplify the calculation, we can solve it in two steps: Step 1: Initialize the plane normal vector (A, B, C); calculate the center coordinates (x c ,y c ,z c ) of the 8 points as the initial estimate of the center. Calculate the radial unit vectors of the 8 points to the center Calculate the mean vector of v i ​And unitize it to obtain the initial value of the normal vector (A, B, C). This direction is approximately perpendicular to the plane of the circular ring. Step 2: Optimize the center coordinates, radius, and normal vector; fix the normal vector (A, B, C) and optimize the center coordinates (x0, y0, z0) and radius R: This is an unconstrained non-linear least squares problem, which can be solved using the Gauss-Newton method or the Levenberg-Marquardt algorithm. At each iteration, substitute the current solution (x0, y0, z0, R) into f1 to obtain its first derivative (Jacobian matrix) and second derivative (Hessian matrix), and update the solution using the Newton descent direction until convergence. Fix the center (x0, y0, z0) and radius R, and optimize the normal vector Constraint conditions:

[0069] A 2 +B 2 +C 2 = 1. This is an optimization problem of a quadratic function on the unit sphere, which can be solved using the Lagrange multiplier method. Let L(A, B, C, lambda) be the Lagrangian function:

[0070] L(A, B, C, λ) = f2 + λ(A 2 +B 2 +C 2 - 1); Take the partial derivatives with respect to (A, B, C) and set them equal to 0, and then combine with the constraint conditions to obtain the optimal solution (A*, B*, C*). Alternately execute the two sub-steps of Step 2 until the change in (x0, y0, z0, A, B, C, R) is less than the given threshold. The resulting plane circular ring equation is:

[0071] A(x - x0) + B(y - y0) + C(z - z0) = 0; (x - x0) 2 +(y - y0) 2 +(z - z0) 2 = R 2 ; Substitute the coordinates (x, y, z) of the point cloud into this plane equation to obtain the circumferential joint surface. Cut the point cloud along this plane to separate two adjacent rings. Cut the tunnel point cloud with the obtained plane equation to separate two adjacent rings and complete the circumferential segmentation. Using the located longitudinal joints (lines 1, 2, and the translated line 3) and the circumferential joint surface, cut the entire tunnel point cloud to obtain a series of ring blocks. Each ring block is further divided into 5 sub-blocks (1 capping block, 2 adjacent blocks, and several standard blocks) by the longitudinal joints. Render the point clouds of different types of sub-blocks with different colors to obtain as Figure 10 、 11The shown block effect. This method of dividing rings and blocks makes full use of the structural characteristics of tunnel segment blocks and the distribution law of bolt holes, fits the longitudinal and circumferential joints through the centers of sparse bolt holes, and then cuts the entire tunnel point cloud.

[0072] The adopted mobile tunnel detection system is generally in the form of a mobile trolley carrying data acquisition instruments. It adopts an integrated design, is powered by the internal battery of the vehicle, and is controlled to move forward through a remote control or a body button. A bracket base for carrying instruments (such as a laser scanner, a camera, etc.) is installed at the middle position of the vehicle and fixed by bolts. According to needs, lighting lamps can be installed at the front and rear of the vehicle to improve the lighting conditions inside the tunnel. Target layout: Select plane targets with appropriate sizes and good reflectivity, such as black and white checkerboard targets or dot targets. A target is arranged every preset distance (such as 5m) along the tunnel axis, and the center of the target should be aligned with the tunnel center line as much as possible. Record the number and mileage position information of each target as the basis for subsequent point cloud stitching. Mobile scanning: Use a three-dimensional laser scanner (such as Leica P50, FARO Focus, etc.) carried on the detection vehicle to continuously collect point cloud data along the tunnel axis direction. The scanning frequency of the scanner should be set according to the traveling speed of the detection vehicle and the required point cloud density, and generally, more than 1 million points per second can be selected. The ranging range of the scanner should cover the entire tunnel section, usually 30 - 200 meters. The scanning field of view angle of the scanner should be as large as possible, with a horizontal field of view angle not less than 360° and a vertical field of view angle not less than 150°.

[0073] Point cloud stitching: According to the corresponding relationship of the targets at different scanning stations, calculate the coordinate transformation matrix between the point clouds of adjacent stations. Commonly used target registration algorithms include the least squares method, the ICP algorithm, etc., and the transformation matrix is solved by minimizing the coordinate residuals of the target center at the two stations. Use the calculated transformation matrix to unify the point cloud data of all stations into a global coordinate system to obtain a complete tunnel point cloud model. Perform preprocessing such as denoising and downsampling on the stitched point cloud to improve data quality and processing efficiency.

[0074] In this embodiment, the ICP algorithm is used for point cloud registration. ICP (Iterative Closest Point) is a commonly used point cloud registration algorithm. Through iterative optimization, the coordinate transformation matrix between two point clouds is estimated, thereby realizing the stitching of point clouds. The point cloud data of two adjacent stations are respectively denoted as P and Q, and the corresponding target center coordinates in the two stations are respectively denoted as {p i} and {q i}, i = 1, 2,......, n. Initialization: Take the P point cloud as the reference point cloud and the Q point cloud as the source point cloud, and set the upper limit of the number of iterations max iter ), such as max iter= 100, set the convergence threshold ε, such as ε = 1e - 6, and initialize the coordinate transformation matrix T as the identity matrix. Iterative optimization: For the k - th iteration, k = 1, 2,......, max iter : For each target center q in Q i , find the nearest - neighbor target center p in P i , form the corresponding point pair (p i , q i ), and use the SVD (Singular Value Decomposition) or quaternion method to estimate the optimal coordinate transformation matrix T k such that is minimized. Use T k to transform the Q point cloud to the coordinate system of the P point cloud, and obtain the transformed Q k . Calculate the root - mean - square error between Q k and P If RMSE k < ε or k > max iter , then stop the iteration and output the current transformation matrix T k ; otherwise, let Q = Q k , and continue the next iteration. Point cloud stitching: Use the estimated optimal transformation matrix T k to transform the Q point cloud to the coordinate system of the P point cloud, and stitch the transformed Q point cloud with the P point cloud to obtain the locally stitched point cloud. Repeat this process to stitch the point clouds of all adjacent stations in turn, and finally obtain the complete tunnel point cloud model.

[0075] Generation of the lining drawing of the mine tunnel: Take the design axis of the tunnel as the positive direction of the y - axis, and take any point (such as the starting point) on the y - axis as the origin to establish the tunnel coordinate system; Convert the stitched tunnel point cloud from the global coordinate system to the tunnel coordinate system while keeping the relative position relationship unchanged; Along the tunnel axis direction (y - axis), divide it into several cross - sections at equal intervals Δy (such as 0.1 m), and each cross - section is perpendicular to the y - axis; For the i - th cross - section (i = 1, 2,..., n), extract the points with y - coordinates in [y i - Δy / 2, y iThe point cloud within the range of i +Δy / 2] forms the i-th cross-section point cloud. The point cloud within each cross-section is unfolded according to the circumferential angle θ, and the three-dimensional point cloud (x, y, z) is converted into a two-dimensional planar image (θ, y); in the unfolded image, the y-axis is the vertical direction and the circumferential angle θ is the horizontal direction, forming a rectangular lining unfolded diagram; the range of the circumferential angle θ is [0, 2π), and sampling can be performed at equal angular intervals Δθ (such as 0.1°). For each unfolded pixel point (θ, y), according to its corresponding point cloud distance d or reflection intensity value I, it is mapped to a gray value g; when mapping the distance, the distance d from the point cloud to the scanner can be normalized to the range of [0, 255], and the closer the distance, the larger the gray value, for example: g = 255*(1 - d / d_max); when mapping the reflection intensity, the reflection intensity value I of the point cloud (usually 0 - 255) can be directly used as the gray value, for example: g = I, and after mapping, the lining gray-scale image G of the i-th cross-section is obtained i For the gray-scale image G i perform histogram equalization, contrast enhancement, etc. to improve the display effect of lining defects. Histogram equalization can stretch the dynamic range of gray values and enhance the contrast of the image, and contrast enhancement can highlight the difference between the lining defects and the background and improve the recognition of defects. Stack the gray-scale images G i (i = 1, 2,..., n) of all cross-sections unfolded in the y-axis direction in sequence to form a complete tunnel lining unfolded diagram For the stacked lining diagram G, the y-axis (tunnel axis direction) is the vertical direction and the circumferential angle θ is the horizontal direction. The resolution of the lining diagram G depends on the axial sampling interval Δy and the circumferential sampling interval Δθ, and usually can reach the millimeter level.

[0076] Establishing the index relationship between the point cloud and the lining diagram is to realize the mutual positioning and mapping of the two. Define the tunnel coordinate system: Take the design axis direction of the mine tunnel as the positive direction of the y-axis, representing the mileage direction of the tunnel, and take the normal direction of the cross-section where the center point of the scanner is located as the positive direction of the z-axis, representing the vertical direction of the tunnel. The x-axis direction is determined according to the right-hand coordinate system and is orthogonal to the y-axis and the z-axis. The origin O can be selected at the tunnel starting point, the initial position of the scanner, etc., and the uniqueness and consistency of the coordinate system should be ensured. Generate the cross-section sequence: Along the tunnel axis direction (y-axis), divide several cross-sections at equal intervals Δy (such as 0.1m). Each cross-section is perpendicular to the y-axis, and these cross-sections are numbered according to the acquisition order (such as from the tunnel starting point to the end point). The number i starts from 0 and increases. The y coordinate y i of the i-th cross-section can be expressed as: y i=i×Δy, where the cross-section number i is used as the column index of the lining unfolded diagram, representing the position of the image in the y-axis direction. Establish the circumferential angle index: within each cross-section, the point cloud is unfolded into a two-dimensional image according to the circumferential angle θ. The value range of the circumferential angle θ is [0, 2π), and sampling can be performed at equal angular intervals Δθ (such as 0.1°). For the sampled circumferential angle θ j (j = 0, 1,..., m - 1) is numbered, and the number j starts from 0 and increases incrementally. The j-th circumferential angle θ j can be expressed as: θ j =j×Δθ, where the circumferential angle number j is used as the row index of the lining unfolded diagram, representing the position of the image in the circumferential direction.

[0077] Construct the point cloud index: for each point P k (k = 0, 1,..., n - 1) in the point cloud, calculate its coordinates (x k , y k , z k ) in the tunnel coordinate system. According to the y-coordinate y k of point P k , determine the cross-section number i k where it is located: According to the circumferential angle θ k of point P k within its cross-section, determine its corresponding circumferential angle number Denote the index of point P k as (i k , j k ), representing its position in the lining unfolded diagram. Generate the lining unfolded diagram: according to the number of cross-sections n and the number of circumferential angle samplings m, create an empty lining unfolded diagram G with a size of m rows and n columns. For each point cloud point P k , according to its index (i k , j k ), assign its corresponding gray value g k to the corresponding pixel G[j k , i k of the lining unfolded diagram G. The gray value g k can be calculated and mapped according to attributes such as the distance d k or the reflection intensity I k of point P k . After mapping all the point cloud points, the complete lining unfolded diagram G is obtained.

[0078] For each cross-section, select the point P that intersects the negative z-axis direction as the starting point. The abscissa x p and ordinate y pIt can be obtained by interpolation. Starting from point P, sample the point cloud in the cross-section at equal angles (such as 0.1°) in the clockwise direction to obtain a series of sampled points. Number these sampled points in the clockwise order, starting from 0 and increasing. Use the sampled point number as the row index of the lining development drawing, indicating the position of the image in the circumferential angle. According to the row and column indices (i, j) of the point cloud, calculate its pixel coordinates (x, y) in the lining development drawing: x = j, y = (i * angular resolution) / (2 * pi) * image height; write the three-dimensional coordinates (X, Y, Z) and attribute information (such as reflection intensity I) of the point cloud to the corresponding position (x, y) of the lining image pixel matrix. For distance mapping, the distance d from the point cloud to the scanner can be normalized to the range of 0 - 255 as the pixel value: pixel value = (d - d_min) / (d_max - d_min) * 255; for reflection intensity mapping, the reflection intensity value I of the point cloud can be directly used as the pixel value.

[0079] Locate the mine tunnel point cloud according to the index relationship. Utilize the established index relationship between the point cloud and the lining drawing to map the pixel coordinates (x, y) on the lining drawing to the three-dimensional coordinates (X, Y, Z) of the point cloud. For each pixel point P(x, y) on the lining drawing, find the corresponding point cloud coordinates Q(X, Y, Z) through the index relationship: Q.X = f(P.x, P.y); Q.Y = g(P.x, P.y); Q.Z = h(P.x, P.y); where f, g, h are index mapping functions, which can be constructed by methods such as interpolation and fitting. Repeat the above process for all pixel points to obtain the ordered point cloud data corresponding to the lining drawing, that is, the located mine tunnel point cloud.

[0080] Construct a target recognition training set. According to the preset target layout rule, generate the theoretical position and size of the target on the lining drawing. The targets are arranged at equal intervals along the tunnel axis, with an interval of d (such as 5m), then the ordinate of the i-th target on the lining drawing is: y_i = round(i * d / image resolution); the target pattern is a black and white checkerboard, with the size of the black and white squares being sxs, then the theoretical width and height of the target on the lining drawing are: w = h = round(s / image resolution); take an image block of sizexsize (such as 64x64) centered on the theoretical position of the target as a positive sample, and label the pixel coordinates of the target. Randomly intercept several image blocks of sizexsize in other areas of the lining drawing as negative samples, without labeling the target coordinates. Organize the positive and negative sample images and their annotation information into a data set for training the target recognition model.

[0081] Select YOLOv7 as the target recognition model. It is an end-to-end real-time object detection algorithm with high accuracy and fast speed. Randomly divide the constructed training set into a training set, a validation set, and a test set, and the ratio can be set to 8:1:1. Set the hyperparameters of YOLOv7, such as the learning rate, batch size, number of iterations, etc., and conduct model training. Evaluate the model performance on the validation set, and tune the hyperparameters according to indicators such as accuracy and recall until the optimal model is obtained. Evaluate the optimal model on the test set to ensure that its generalization performance meets the requirements. Input the complete mine tunnel lining map into the trained YOLOv7 model to obtain the detection results of the targets. The detection results include information such as the pixel coordinates (x, y) of the targets, the confidence score, and the bounding box size (w, h). Filter out reliable target detection results according to the confidence threshold (such as 0.5) and obtain their pixel coordinates (x, y). Utilize the indexing relationship between the point cloud and the lining map to map the pixel coordinates (x, y) of the targets to the three-dimensional coordinates (X, Y, Z) in the point cloud. Repeat the above process for each detected target to obtain the set of three-dimensional coordinates of the targets in the point cloud {(X i ,Y i ,Z i )}.

[0082] According to the set of three-dimensional coordinates of the targets in the point cloud {(X i ,Y i ,Z i )}, calculate the average coordinates (X c ,Y c ,Z c ) of the target centers. Take the target center coordinates as control points and calculate the transformation matrix from the point cloud coordinate system to the lining map coordinate system where (X c ',Y c ',Z c ') are the coordinates of the target center in the lining map coordinate system. The transformation matrix T can be solved by methods such as the least squares method and the random sample consensus algorithm (RANSAC). Use the transformation matrix T to perform coordinate transformation on the entire mine tunnel point cloud to obtain the registered point cloud data: The registered point cloud completely coincides with the lining map in terms of spatial position, realizing the seamless integration of the point cloud and the image.

[0083] Dataset preparation: The tunnel lining images are cropped into sub-images of 1000×1000 pixels, and 322 shield tunneling method tunnel datasets and 318 mining tunneling method tunnel datasets are obtained respectively. The training set and test set are randomly divided according to a ratio of 4:1, that is, 258 shield tunneling method tunnel training sets and 64 test sets, 254 mining tunneling method tunnel training sets and 64 test sets. To expand the training data, data augmentation is performed on the original images. The specific method is as follows: Based on the original images, rotate them clockwise and counterclockwise by 5° and 10° respectively to generate 4 new images. After data augmentation, the shield tunneling method tunnel training set is expanded to 1290 (258x5), and the validation set is expanded to 320 (64x5); the mining tunneling method tunnel training set is expanded to 1275 (254x5), and the validation set is expanded to 315 (64x5).

[0084] Data annotation: The LabelImg software is used to annotate the tunnel lining image dataset. LabelImg is an image annotation tool based on Python and Qt, supporting various annotation methods such as rectangular boxes and polygons, and is suitable for data preparation for tasks such as object detection and semantic segmentation. Load the lining images in sequence on the LabelImg interface and annotate the water leakage areas in the images. The specific operation is as follows: Draw a rectangular box on the image with the mouse to make it closely fit the maximum boundary of the water leakage area, that is, the rectangular box should enclose as much of the entire water leakage area as possible without being too large to include too much background area. After drawing the rectangular box, select "Water leakage" in the label list as the label name corresponding to the current rectangular box. If the "Water leakage" label does not exist in the label list, the label needs to be newly created. Repeat the process of drawing the rectangular box and specifying the label until all the water leakage areas in the current image are annotated. Then save the annotation result and load the next image until the annotation task for the entire dataset is completed. After annotation is completed, LabelImg will generate an XML format annotation file with the same name as the image file in the directory where each image file is located. The annotation file records information such as the image name, the label name of the annotation object (i.e., water leakage), the corresponding rectangular box coordinates and dimensions, etc.

[0085] Detection model construction: The tunnel leakage detection model uses the current mainstream convolutional neural network (CNN) as the backbone network to extract multi-scale and multi-level features from tunnel lining images. Commonly used CNN backbone networks include VGG, ResNet, MobileNet, etc. They have been pre-trained on large datasets such as Image Net and have strong feature extraction and semantic representation capabilities. A suitable backbone network, such as ResNet-50, is selected as the feature extractor of the detection model. The backbone network consists of multiple convolutional layers (Conv), pooling layers (Pool), and fully connected layers (FC); the convolutional layers use convolutional kernels of different sizes such as 3x3 and 5x5 to extract local features of the image; the pooling layer uses max pooling or average pooling to downsample the feature map and reduce the feature size; the fully connected layer classifies or regresses the extracted features and outputs the detection results. To further enhance the feature extraction performance of the backbone network for tunnel lining images, the ConvNeXt Block sub-network module is embedded in the backbone network. ConvNeXt Block is a novel CNN building block proposed by Facebook AI Research in 2022. It significantly improves the network's feature representation ability and computational efficiency through depthwise separable convolution and inverted residual structure. Depthwise separable convolution splits the standard convolution operation into two steps: depthwise convolution and pointwise convolution, reducing the number of parameters and computational amount and enhancing the network's non-linear expression ability. Depthwise separable convolution splits the standard convolution operation into two steps: depthwise convolution and pointwise convolution. Depthwise convolution convolves each input feature channel separately, using a convolutional kernel size of (k, k, 1), where k is the convolutional kernel size, and pointwise convolution uses a 1x1 convolutional kernel to combine the output features of depthwise convolution and adjust the number of feature channels. Depthwise separable convolution reduces the number of parameters and computational amount and enhances the network's non-linear expression ability.

[0086] The inverted residual structure adopts a bottleneck design of "expansion - convolution - compression". First, it expands the number of feature channels through 1x1 convolution, then extracts features through 3x3 depth - separable convolution, and finally compresses the number of feature channels through 1x1 convolution, maintaining the richness and diversity of features while reducing computational complexity. Embedding ConvNeXt Block in several key layers of the backbone network (such as downsampling layers or feature fusion layers) can significantly enhance the network's feature extraction ability, especially the modeling ability for small targets such as seepage water. A Detection Head is added at the top of the backbone network to generate the final detection results; the Detection Head can use single - stage detectors (such as YOLO, SSD) or two - stage detectors (such as Faster R - CNN, MaskR - CNN).

[0087] After the backbone network, a Neck network is connected in series to fuse the multi - scale feature maps output by the backbone network. The Neck network can highlight the significant features of the seepage water area and improve the detection accuracy. Common Neck networks include FPN, PAN, etc., which integrate multi - scale information through feature pyramids or feature fusion. The Neck network adopts the CBAM (Convolutional Block Attention Module) attention mechanism module. CBAM adaptively adjusts the weight distribution of the feature map through channel attention and spatial attention. CBAM can effectively highlight the feature response of the seepage water area, suppress the interference of the background area, and improve the detection accuracy. Channel attention learns the importance weights of different channels through global average pooling and fully - connected layers. Global average pooling compresses the feature map of each channel into a scalar value, representing the global information of the channel. The fully - connected layer learns to convert the global information into a channel weight vector, representing the importance of different channels. Multiplying the channel weight vector by the original feature map can adaptively enhance or suppress the feature response of different channels. Spatial attention learns the significant weights of different spatial positions through convolutional layers and the Sigmoid function. The convolutional layer performs convolutional operations on the original feature map to extract local features of different spatial positions. The Sigmoid function maps the convolutional result to a spatial weight matrix within the range of (0, 1), representing the significance of different positions. Multiplying the spatial weight matrix by the original feature map can adaptively enhance or suppress the feature response of different spatial positions. The CBAM module is placed after the backbone network and before the Neck network, playing a connecting role between the upper and lower parts.

[0088] The CBAM module can make full use of the high-level semantic features learned by the backbone network, perform adaptive channel and spatial modulation on them, and the modulated feature maps can provide more refined and focused feature representations for the subsequent detection head, which is beneficial to improving the detection performance. The CBAM module consists of a channel attention sub-module and a spatial attention sub-module, and can be used in series or in parallel. The channel attention sub-module includes a global average pooling layer, a fully connected layer, and a Sigmoid activation function. The spatial attention sub-module includes a convolutional layer, a BatchNorm normalization layer, and a Sigmoid activation function. The hyperparameters of the CBAM module, such as the number of hidden units in the fully connected layer and the convolutional kernel size, can be adjusted according to the task requirements. Let the feature map output by the backbone network be F, and its size be (C, H, W), that is, the number of channels is C, the height is H, and the width is W. The channel attention sub-module compresses F into (C, 1, 1) through global average pooling, and then calculates the channel weight vector W c , with a size of (C, 1, 1). The spatial attention sub-module calculates the spatial weight matrix W of F through the convolutional layer and the Sigmoid function s , with a size of (1, H, W). Multiply the channel weight vector W c and the spatial weight matrix W s by the original feature map F to obtain the modulated feature map F', whose size is still (C, H, W).

[0089] Design of the loss function for the detection model. The Generalized Intersection over Union (GIOU) Loss is adopted as the localization loss function for the detection model to optimize the model's spatial localization ability for the water seepage area. Compared with the traditional Intersection over Union (IOU) Loss, GIOU Loss not only considers the overlap degree between the predicted box and the ground truth box but also geometric factors such as the center distance between the two boxes. Therefore, it has a stronger constraint and guiding effect on the regression optimization of the detection box. IOU Loss only considers the intersection over union of the predicted box and the ground truth box and has two defects: when the two boxes do not overlap, IOU is always 0, and the loss function cannot optimize the detection box; when the two boxes overlap but the center distance is large, IOU Loss cannot well reflect the actual distance between them, resulting in an inaccurate optimization direction. Based on IOU, GIOU Loss introduces the concept of the Smallest Enclosing Box of the two boxes. By calculating the IOU between the predicted box, the ground truth box, and the Smallest Enclosing Box, a more comprehensive and detailed loss metric is obtained. When the two boxes do not overlap, GIOU Loss takes the Smallest Enclosing Box as a reference and gets a negative value, which can guide the detection box to move towards the ground truth box; when the two boxes overlap but the center distance is large, GIOU Loss takes the Smallest Enclosing Box as a reference and gets a small positive value, which can guide the detection box to get closer to the ground truth box. Taking GIOU Loss as the localization loss and weighted summing it with the classification loss (such as Focal Loss), the total loss function of the detection model is obtained. During the model training process, by minimizing the total loss function, the optimization iteration of the model parameters is realized, and the performance of the detection model in the water seepage localization and recognition tasks is improved.

[0090] Specifically, in this embodiment, in a certain training sample, the coordinates of the tunnel defect (such as water seepage) bounding box predicted by the tunnel detection model and the ground truth bounding box are as follows: Tunnel detection model predicted bounding box: The upper left corner coordinates (x 1p , y 1p ) = (50, 80), and the lower right corner coordinates (x 2p , y 2p ) = (200, 280); the area of the predicted bounding box Ap = (200 - 50) * (280 - 80) = 30000 square pixels. Ground truth bounding box: The upper left corner coordinates (x 1g , y 1g ) = (80, 100), and the lower right corner coordinates (x 2g , y 2g) = (240, 300); The area of the ground truth bounding box Ag = (240 - 80) * (300 - 100) = 32000 square pixels. The calculation process is as follows: Calculate the intersection area U of the predicted bounding box and the ground truth bounding box: The upper left corner coordinates of the intersection (x 1i , y 1i ) = (max(x 1p , x 1g ), max(y 1p , y 1g ) = (max(50, 80), max(80, 100)) = (80, 100); The lower right corner coordinates of the intersection (x 2i , y 2i ) = (min(x 2p , x 2g ), min(y 2p , y 2g ) = (min(200, 240), min(280, 300)) = (200, 280); U = (200 - 80) * (280 - 100) = 21600 square pixels. Calculate the union area A of the predicted bounding box and the ground truth bounding box: A = Ap + Ag - U = 30000 + 32000 - 21600 = 40400 square pixels. Calculate the area C of the smallest rectangle enclosing the predicted bounding box and the ground truth bounding box: The upper left corner coordinates of the smallest rectangle are (min(50, 80), min(80, 100)) = (50, 80); The lower right corner coordinates of the smallest rectangle are (max(200, 240), max(280, 300)) = (240, 300); C = (240 - 50) * (300 - 80) = 41800 square pixels; Calculate the intersection over union IOU: IOU = U / A = 21600 / 40400 = 0.5347; Substitute the above calculation results into the GIOU-Loss formula: GIOU-Loss = 1 - IOU + (C - A) / C; = 1 - 0.5347 + (41800 - 40400) / 41800; = 0.4987. In this specific sample, the localization loss GIOU-Loss of the tunnel detection model is 0.4987. By minimizing GIOU-Loss, the predicted defect bounding box of the detection model can be made closer to the ground truth.

[0091] S5. Using the tunnel detection model, detect the point cloud of the shield tunnel after ring and block division or the point cloud of the mined tunnel after positioning to obtain the detection results of the shield tunnel or the mined tunnel. The detection results include the leakage, cable looseness, and equipment change conditions of the tunnel. For the shield tunnel, use the obtained point cloud data of the tunnel after ring and block division. For the mined tunnel, use the obtained point cloud data of the tunnel after positioning. According to the mileage data of the scanner and the tunnel coordinate system, convert the point cloud into a two-dimensional tunnel lining image. Crop the tunnel lining image into sub-images of a fixed size (such as 256x256); perform data augmentation on the sub-images, such as random flipping, rotation, etc., to enrich data diversity; standardize the sub-images, subtract the mean and divide by the standard deviation to accelerate model convergence. Input the preprocessed sub-images into the tunnel detection model. The model detects various tunnel defects in the lining image through feature extraction and attention mechanism, including water leakage, cable looseness, and equipment change, etc. The model outputs the coordinates of the detected defect positions and the class confidence.

[0092] Perform non-maximum suppression (NMS) on the model output results to filter out overlapping detection boxes. After the model infers each lining sub-image, multiple overlapping detection boxes are usually output and need to be screened. First, sort them in descending order according to the class confidence of the detection boxes. Then, select the detection box A with the highest confidence, calculate the IoU (Intersection over Union) between A and other detection boxes, filter out the detection boxes with an IoU greater than the preset threshold (such as 0.5) with A, and retain the detection box A with the highest confidence. Recursively execute the above process for the remaining detection boxes until all detection boxes are processed. Finally, obtain a set of non-overlapping tunnel defect detection boxes and their position coordinates and classes. According to the position coordinates of the detection boxes, use the index relationship established in claim 7 to map the detection results from the lining image back to the three-dimensional point cloud space.

[0093] After establishing the one-to-one correspondence between the tunnel point cloud and the lining image, for each pixel point P(u, v) on the lining image, the corresponding point C(x, y, z) in the point cloud can be found through the row and column indices (r, c). Specifically, the pixel coordinates of the upper left corner and the lower right corner of the detection box B are (u1, v1) and (u2, v2) respectively. According to the index relationship, the corresponding coordinates C1(x1, y1, z1) and C2(x2, y2, z2) of (u1, v1) and (u2, v2) in the point cloud are calculated respectively. The cube bounding box of the tunnel defect in the three-dimensional point cloud space is determined by C1 and C2. The detected tunnel defect positions and categories are visually marked in the point cloud. A unique set of colors is defined for different categories of tunnel defects. For example, water seepage is blue, cable looseness is yellow, and equipment change is red. For each detection box B, at the corresponding bounding box positions C1 and C2 in the three-dimensional point cloud, all the points inside the box are rendered as the color corresponding to the defect category. At the same time, a text label is generated at the top of the bounding box to indicate the category name of the defect. Using a point cloud visualization engine such as Open3D, PCL, etc., the labeled tunnel point cloud is rendered to visually display the distribution of tunnel defects.

[0094] The information such as the categories, positions, and quantities of water seepage, cable looseness, and equipment change is sorted out and output as a detection report. All the tunnel defect bounding boxes are traversed to extract information such as their categories, center point coordinates, length, width, and height dimensions. The defects are classified and summarized according to their categories, and the quantities of various defects are calculated. The extracted information is filled into a preset detection report template to generate a structured tunnel defect detection report. The report intuitively presents the distribution characteristics of tunnel defects in the form of tables and charts, and the detection report is sent to the tunnel maintenance personnel in the form of web pages, PDFs, etc. to guide the actual maintenance operations.

Claims

1. A mobile tunnel detection method, characterized in that, Including: According to the construction method of the tunnel, the tunnel is divided into shield tunnels and mine tunnels; For shield tunnels, obtain the three-dimensional point cloud of the shield tunnel, and use the CSF algorithm and the DBSCAN algorithm to extract bolt holes; Use the mean-shift algorithm to obtain the center points of the bolt holes, and divide the three-dimensional point cloud of the shield tunnel into rings and blocks according to the center points of the bolt holes to obtain the point cloud of the shield tunnel after ring and block division; For mine tunnels, use a mobile tunnel laser device with target layout, and arrange a target at a preset distance along the tunnel axis to obtain the point cloud of the mine tunnel with target position information; Generate a lining diagram of the mine tunnel according to the point cloud of the mine tunnel with target position information; Establish an index relationship between the point cloud of the mine tunnel and the lining diagram of the mine tunnel; Locate the point cloud of the mine tunnel according to the index relationship to obtain the located point cloud of the mine tunnel; Construct a tunnel detection model based on deep learning, and the tunnel detection model includes a backbone network and a neck network; The backbone network uses a convolutional neural network, and a ConvNeXtBlock network is set in the backbone network to extract tunnel leakage and water seepage features; The neck network uses a CBAM attention mechanism to enhance the weights of tunnel leakage and water seepage features in the channel dimension and the spatial dimension; Use the tunnel detection model to detect the point cloud of the shield tunnel after ring and block division or the located point cloud of the mine tunnel to obtain the detection results of the shield tunnel or the mine tunnel. The detection results include the leakage, cable loosening and equipment change conditions of the tunnel; Establish an index relationship between the point cloud of the mine tunnel and the lining diagram of the mine tunnel, including: using a scanner to collect two-dimensional cross-section point clouds along the design axis direction of the mine tunnel; according to the mileage data of the scanner, convert the collected two-dimensional cross-section point clouds into three-dimensional point clouds; taking the design axis direction of the mine tunnel as the positive y-axis direction and the normal direction of the cross-section where the center point of the scanner is located as the positive z-axis direction, scan with the center point as the origin o to establish a tunnel three-dimensional coordinate system; along the positive y-axis direction, number the cross-sections perpendicular to the y-axis in the acquisition order to establish a column index; taking the intersection point P of the negative z-axis and the cross-section as the starting point, number the point clouds in the cross-section in the clockwise direction to establish a row index; according to the row index and the column index, write the three-dimensional coordinates and point cloud information of the corresponding point clouds into the pixel matrix to establish an index relationship between the point cloud of the mine tunnel and the lining diagram of the mine tunnel; Locate the mine tunnel point cloud according to the index relationship to obtain the located mine tunnel point cloud, including: construct a training set according to the preset layout rule of the targets in the mine tunnel lining diagram; the preset layout rule includes the equidistant layout of the targets along the tunnel axis and the black and white interval distance of the target images; train the YOLOv7 model with the training set to obtain a target recognition model; use the target recognition model to obtain the pixel coordinates of each target in the mine tunnel lining diagram; according to the pixel coordinates of the targets, use the index relationship between the mine tunnel point cloud and the mine tunnel lining diagram to obtain the three-dimensional coordinates of each target in the mine tunnel point cloud; according to the three-dimensional coordinates of the targets, perform coordinate transformation on the mine tunnel point cloud to register the mine tunnel point cloud and the mine tunnel lining diagram to obtain the located mine tunnel point cloud.

2. The mobile tunnel detection method according to claim 1, characterized in that: For a shield tunnel, obtain the three-dimensional point cloud of the shield tunnel, including: Obtain the three-dimensional point cloud data of the shield tunnel; Establish a tunnel cross-section coordinate system with the geometric center of the tunnel as the origin, the vertical upward Z-axis as the positive direction, and the X-axis perpendicular to the Z-axis pointing to the right; Calculate the angle θ of the tunnel wall points relative to the cross-section coordinate system; According to the tunnel design parameters and the angle θ, convert the tunnel wall points from the cross-section coordinate system to the coordinates in the plane rectangular coordinate system to obtain the unfolded tunnel wall point cloud.

3. The mobile tunnel detection method according to claim 2, characterized in that: Calculate the angle θ of the tunnel wall points relative to the cross-section coordinate system through the following formula: Wherein: is the abscissa of a point on the cross-section, is the ordinate of a point on the cross-section, is the abscissa of the geometric center of the tunnel, is the ordinate of the geometric center of the tunnel.

4. The mobile tunnel detection method according to claim 2, characterized in that: Adopt the CSF algorithm and the DBSCAN algorithm to extract bolt holes, including: Perform coordinate transformation on the unfolded tunnel wall point cloud to obtain a tunnel wall point cloud with the same direction as the initially collected three-dimensional point cloud; Construct a CSF model, initialize the cloth grid, and set the grid resolution to D times the average point spacing of the unfolded tunnel wall point cloud; the initial position of the cloth is within a preset range above the highest point of the point cloud; Obtaining the classification threshold of tunnel wall point cloud using the CSF model , the classification threshold is used to distinguish tunnel wall points from bolt hole points; Iteratively calculate the height difference between each point in the tunnel wall point cloud and the cloth particles of the CSF model; Mark points with a height difference greater than the classification threshold as potential bolt hole point clouds, and vice versa mark them as tunnel wall point clouds; For the point cloud marked as potential bolt holes, use the DBSCAN algorithm for clustering to obtain the final bolt hole point cloud.

5. The mobile tunnel detection method according to claim 4, characterized in that: Divide the three-dimensional point cloud of the shield tunnel into rings and blocks according to the bolt hole center points, including: According to the collected three-dimensional point cloud of the shield tunnel, use the final bolt hole point cloud, adopt the mean-shift clustering algorithm to cluster each bolt hole and obtain the center point of the corresponding bolt hole; According to the preset splicing block design data, define the recognition template of the bolt hole center of the splicing block, match the obtained center points of the bolt holes with the recognition template to obtain the center points of the bolt holes of different splicing blocks; Determine the center points of the bolt holes of each splicing block according to the relative position relationship of the center points of the bolt holes of different splicing blocks; Use the center points of the bolt holes of adjacent splicing blocks, and through interpolation and linear fitting, locate the longitudinal joints between adjacent splicing blocks. Using the center points of the bolt holes within the same splicing block, through linear fitting and translation, locate the longitudinal joints between adjacent splicing blocks; Using the center points of the bolt holes in two adjacent rings, through interpolation and linear fitting, locate the circumferential joints; Using the located joints, divide the collected three-dimensional point cloud of the shield tunnel into rings and blocks to obtain the point cloud of the shield tunnel after ring and block division.

6. The mobile tunnel detection method according to claim 5, wherein: The splicing block includes: a crown block, an adjacent block, and a standard block; The crown block is located at the crown of the tunnel and is assembled by multiple splicing blocks. There are multiple bolt holes in the crown block, and the center points of the bolt holes in the crown block are distributed in a ring shape. By identifying the center points of the bolt holes in the crown block, determine the spatial position of the tunnel crown; The adjacent blocks are located on both sides of the crown block, adjacent to and connected to the crown block. There are multiple bolt holes in the adjacent blocks, and the center points of the bolt holes in the adjacent blocks are distributed in the same horizontal plane; by identifying the center points of the bolt holes in the adjacent blocks, determine the spatial positions on both sides of the tunnel; The standard blocks are located below the crown block and the adjacent blocks, arranged longitudinally and circumferentially along the tunnel to form the main body of the tunnel lining structure. There are multiple bolt holes in the standard blocks, and the center points of the bolt holes in the standard blocks are distributed in the same vertical plane; by identifying the center points of the bolt holes in the standard blocks, determine the longitudinal and circumferential joints of the tunnel lining.

7. The mobile tunnel detection method according to any one of claims 2 to 6, wherein: Construct a tunnel detection model based on deep learning, including: Obtain the point cloud data of the shield tunnel after ring and block division or the point cloud data of the mined tunnel after positioning, and convert the point cloud data into tunnel lining images; Crop the tunnel lining images into sub-images of size MxM to obtain subsets of shield tunneling method tunnel lining images and mined tunneling method tunnel lining images; Preprocess the subsets of shield tunneling method tunnel lining images and mined tunneling method tunnel lining images respectively; Label the preprocessed subsets of shield tunneling method tunnel lining images and mined tunneling method tunnel lining images to label tunnel defects; tunnel defects include tunnel leakage; Use the preprocessed and labeled subsets of shield tunneling method tunnel lining images and mined tunneling method tunnel lining images as the training set, adopt a convolutional neural network as the backbone network, and set a ConvNeXtBlock network in the backbone network to extract tunnel defects; Set a neck network after the backbone network, and the neck network adopts a CBAM attention mechanism; During the training process of the tunnel detection model, use GIOU-Loss as the positioning loss function; Use the trained tunnel detection model to detect the point cloud of the shield tunnel after ring and block division or the point cloud of the mined tunnel after positioning. Through the index relationship between the point cloud and the tunnel lining image, map the detected tunnel defects to the point cloud position to obtain the three-dimensional spatial position of the tunnel defects, and output it as the tunnel detection result.

8. A mobile tunnel detection system, wherein, It includes: At least one processing unit; used to execute instructions to implement the mobile tunnel detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Tunnel lining surface crack detection device and method, medium and equipment

    CN118707546A