An automatic identification method for water leakage in shield tunnels based on point cloud data
Through three-dimensional laser scanning and YOLO model combined with CSF and SOR denoising processing, grayscale images are generated and the YOLO model is trained, which solves the inefficiency and accuracy of tunnel leakage detection, and realizes high-precision water leakage identification and area calculation in different environments.
Patent Information
- Application Number
- CN202510848076.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-24
AI Technical Summary
The existing tunnel leakage detection methods rely on manual inspection, are inefficient and inaccurate, cannot meet the needs of fast and accurate leakage identification, and are insufficient in adaptability in different lighting and environments.
The point cloud data is obtained by using a three-dimensional laser scanner, and converted into grayscale images through CSF and SOR denoising processing. The YOLO model is used to automatically identify and calculate the leakage area. The noise points are removed by combining the CSF and SOR denoising algorithms, and the grayscale image is generated by using the rasterization method and the YOLO model is trained for leakage detection.
It realizes accurate positioning and accurate area calculation of leaky water, has strong adaptability and robustness, and can accurately identify leaky water under different lighting and environments, improving detection efficiency and accuracy.
Smart Images

Figure CN120375356B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for analyzing water leakage in a tunnel, and in particular to a method for automatically identifying water leakage in a shield tunnel based on point cloud data. Background Art
[0002] In recent years, accelerated urbanization has led to the construction of numerous shield tunnel projects in dense urban environments. However, this presents tunnel risks, including segment leakage during construction and operation. Therefore, effective detection and analysis of the physical properties of water seepage in tunnels is crucial. To address this issue, the latest measurement technologies and methods are being applied. 3D laser scanning technology is used to capture point cloud data, and novel algorithms are employed to achieve highly accurate automated detection of tunnel water seepage.
[0003] Current methods for tunnel water leakage detection and analysis typically rely on manual inspections. Currently, most leak detection methods rely on manual inspections, which are hampered by inefficiencies and subjective judgement by inspectors. This approach fails to meet the growing demand for rapid and accurate leak identification and analysis. Leak identification is not only time-consuming but also prone to inaccuracies.
[0004] A search of existing technical literature revealed that Chinese invention patent publication number CN118799791A describes a method for detecting tunnel water leakage. This patent proposes establishing a water leakage dataset and constructing a water leakage semantic segmentation model based on the EfficientNet B0 network. The model is trained based on this dataset, and the optimized model is ultimately saved to detect tunnel water leakage. While this method has promising applications in water leakage detection, its adaptability under varying lighting conditions and tunnel environments remains to be verified. Furthermore, this method cannot calculate the leakage area within a specific tunnel section, presenting certain limitations. Summary of the Invention
[0005] The technical problem to be solved by the embodiments of the present invention is to provide a method for automatically identifying water leakage in a shield tunnel based on point cloud data, which can be used to detect and analyze the physical properties of water leakage in the tunnel.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a method for automatically identifying water leakage in a shield tunnel based on point cloud data, which is characterized by comprising the following steps:
[0007] S1: Use a 3D laser scanner to stitch and downsample according to the set station distance, and segment the resulting tunnel point cloud at the same interval and unfold it into a plane;
[0008] S2: denoising is performed using CSF and SOR methods in sequence;
[0009] S3: Use a rasterization-based method to convert point cloud data into grayscale images, map the coordinates and intensity information of the 3D point cloud onto a 2D image, and construct a dataset from grayscale images generated from point clouds of various tunnels;
[0010] S4: Use the dataset to train a YOLO-based leakage detection model;
[0011] S5: Process the target tunnel point cloud image according to steps S1 to S3, and divide the tunnel segment image into sub-images of a size suitable for model detection. Use the trained leakage detection model to analyze the sub-images, segment the leakage area, and calculate the leakage area using the following formula:
[0012] ;
[0013] Where: M l is the leakage area, m is the pixel of the leakage segmentation mask in the sub-image of the tunnel segment, p0 is the number of pixels in the grayscale image, n is the number of sub-images divided according to the tunnel wall perimeter, D is the actual width of the tunnel segment, l is the length pixel of the grayscale image, and w is the width pixel of the grayscale image.
[0014] Furthermore, the S1 further includes the steps of:
[0015] Convert the segmented tunnel point cloud from the rectangular coordinate system to the cylindrical coordinate system. After the conversion is completed, the segmented point cloud can be unfolded. The unfolding method is:
[0016]
[0017] The tunnel segment point cloud is unfolded along the Z axis. During the unfolding process, the position of point P (θ, r, z) is projected onto the plane to become point P' (x', y', z').
[0018] Furthermore, the step of using CSF to perform denoising in S2 includes:
[0019] S21: Flip the original point cloud and drop the virtual cloth onto the inverted point cloud. The cloth is modeled using a mass-spring system, where the cloth is composed of particles connected by springs to simulate the behavior of real cloth. The displacement of each particle under the action of gravity is calculated as follows:
[0020]
[0021] Where m is the mass of the particle, X(t) is the position of the particle at time t, ∆t is the time step, and G is the gravitational constant;
[0022] S22: After the cloth is affected by gravity, the position information of each particle is adjusted according to the force exerted by neighboring particles. The height difference of each particle relative to its neighbors is calculated, and the displacement vector of the particles connected by springs is calculated. The calculation formula is:
[0023]
[0024] in, is the displacement vector of the particle. When b=1, the particle can move, otherwise it is 0; is the current particle position, is the position of the neighboring particle connected to it, = (0,0,1) T is the vertical direction vector;
[0025] A height threshold is set according to the tunnel environment, and particles whose vertical distance exceeds the threshold are regarded as non-ground points and removed from the point cloud.
[0026] Furthermore, the step of using SOR to perform denoising in S2 includes:
[0027] S23: For each point in the point cloud p i , find its k nearest neighbor points { p i1 ,p i2 …p ij}, and calculate the target point p i With each neighbor point p ij Euclidean distance between d ij :
[0028]
[0029] S24: For each point p i , calculate the average distance within its neighborhood μ i and standard deviation σ i , the formulas are as follows:
[0030] ;
[0031] ;
[0032] S25: Calculate the segmentation threshold T, , λA multiple of the point cloud density. If the average distance of a point exceeds the threshold T, the point is considered an outlier and removed from the point cloud.
[0033] Furthermore, the step S3 of converting the point cloud data into a grayscale image includes:
[0034] S31: Image resolution calculation, calculate the range of the point cloud to determine the number of rows and columns in the generated image:
[0035]
[0036] where z min and z max Respectively represent the minimum and maximum values of the point cloud in the Z-axis direction, y min and y max Indicates the minimum and maximum values in the Y-axis direction, s is the pixel resolution, which is set according to the point cloud density;
[0037] S32: Linearly normalize the intensity value to a grayscale range of 0 to 255. The calculation formula is:
[0038]
[0039] Among them, intensity is the intensity value of each point in the point cloud, I min is the minimum intensity value, I max is the maximum intensity value, I mapped is the normalized grayscale value, γ is a nonlinear parameter used to control the normalized distribution. It adjusts the contrast of the image through gamma correction and is set according to the characteristics of different tunnel point clouds.
[0040] S33: The 2D coordinates z and y of each point are mapped to the corresponding position in the image matrix, and a normalized intensity value is assigned to the pixel at that position.
[0041] The implementation of the embodiments of the present invention has the following beneficial effects: the method of the present invention combines point cloud data processing with the YOLO deep learning network, can accurately locate the position of the leaking water, and provide accurate calculation of the leakage area. Compared with other methods, the present invention is not affected by tunnel lighting conditions and different environments, and has stronger adaptability and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a flow chart of the present invention;
[0043] Figure 2 This is a schematic diagram of the expansion of the tunnel segment point cloud of the present invention;
[0044] Figure 3 This is the point cloud denoising result of a tunnel section in one embodiment of the present invention;
[0045] Figure 4 This is a diagram showing the leakage area identification results in a tunnel section according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be described in further detail below with reference to the accompanying drawings.
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention. The present invention is described in more detail by way of example with reference to the drawings in the following paragraphs. The advantages and features of the present invention will become clearer according to the following description and claims. It should be noted that the drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0048] like Figure 1 As shown, an automatic identification method for water leakage in a shield tunnel based on point cloud data according to an embodiment of the present invention mainly includes the following steps:
[0049] S1: point cloud data preprocessing;
[0050] S2: point cloud denoising;
[0051] S3: Grayscale image generation and dataset establishment;
[0052] S4: Model training and evaluation;
[0053] S5: Identification of water leakage areas and area calculation.
[0054] In S1, the point cloud data obtained by 3D laser scanning is preprocessed according to the following steps:
[0055] First, point cloud stitching, registration, and denoising were performed. Trimble RealWorks software, which comes with the 3D laser scanner, was used to stitch and downsample the point cloud stations. Finally, the tunnel point cloud was segmented at equal intervals.
[0056] After that, the segmented tunnel point cloud needs to be converted from the rectangular coordinate system to the cylindrical coordinate system. After the conversion is completed, the segmented point cloud can be unfolded. The unfolding method is shown in formula (1). Among them, the tunnel segment point cloud is unfolded along the Z axis. The unfolding process converts point P ( θ, r,z ) is projected onto the plane to become point P' ( x', y', z' ),(See Figure 2 ).
[0057] (1)
[0058] The original point is a cylindrical coordinate system, θ, r, z represent the azimuth, radial distance and height value of the point respectively, and x', y', z' are the three-dimensional coordinates of the corresponding point after expansion.
[0059] Specifically, the tunnel under inspection was constructed using the shield method, with a 1.8 m segment width. In this example, the point cloud data was collected using a Tianbao stand-mounted 3D laser scanner, with a spacing of 15 m between stations. Three white targets were set between stations, on the left and right sides of the tunnel and at the bottom, as coordinate control points. The original tunnel point cloud was downsampled using the aforementioned steps, with a sampling interval of 0.01 m. After downsampling, the tunnel point cloud was segmented, with each segment separated by a fixed interval of five tunnel segments and renumbered sequentially starting at 1. Each segment of the tunnel point cloud was then unfolded into a plane using the aforementioned method.
[0060] In S2, CSF and SOR methods are used for denoising in sequence, which is implemented in two steps:
[0061] S21: Point cloud denoising based on CSF;
[0062] S22: Point cloud denoising based on SOR;
[0063] In S21, the tunnel slice point cloud is denoised based on CSF (cloth simulation filtering) as follows:
[0064] (1) Point cloud flip
[0065] First, the original point cloud is flipped, and the virtual cloth is dropped onto the inverted point cloud. The cloth is modeled using a mass-spring system, where the cloth is composed of particles connected by springs, simulating the behavior of real cloth. The displacement of each particle under the influence of gravity is calculated using the following formula.
[0066] (2)
[0067] (2) Position adjustment
[0068] When the cloth is affected by gravity, the position of each particle is adjusted based on the forces exerted by neighboring particles to control the particle's movement within the gaps on the inversion surface. The height difference of each particle relative to its neighbors is calculated, and the displacement vector of the particles connected by springs is calculated as follows:
[0069] (3)
[0070] in, is the particle's displacement vector, b =1 when the particle can move, otherwise it is 0; is the current particle position, is the position of the neighboring particle connected to it, = (0,0,1) T is the vertical direction vector. By analyzing the particle positions after cloth simulation, CSF can determine which particles are stably located on the "ground" and which are "in the air," or lifted up. Finally, by setting a threshold (based on the particle's height), CSF considers particles above this threshold as non-ground points (noise) and removes them from the point cloud.
[0071] In S22, since CSF cannot completely remove all noise points, the SOR method further eliminates the remaining noise points. The point cloud denoising based on SOR (statistical outlier removal) is determined as follows:
[0072] (1) Neighborhood search
[0073] For each point in the point cloud p i , find its k nearest neighbor points { p i1 ,p i2 …p ij}, and calculate the target point p i With each neighbor point p ij Euclidean distance between d ij :
[0074] (4)
[0075] (2) Calculate the average distance and standard deviation
[0076] For each point p i , calculate the average distance within its neighborhood μ i and standard deviation σ i , respectively as follows:
[0077] (5)
[0078] (6)
[0079] (3) Outlier judgment
[0080] Finally, the segmentation threshold T is calculated, which is usually the mean distance plus a multiple of the standard deviation. λ .
[0081] (7)
[0082] λ A multiple of the point cloud density. If the average distance of a point exceeds the threshold T , then the point is considered an outlier and removed from the point cloud. The SOR method also requires setting the number of neighborhood points k and multiples λ .
[0083] In the above, the cloth resolution is set to 0.1, the maximum number of iterations is set to 500, and the classification threshold is set to 0.02 in the step of filtering out noise points by the CSF algorithm. Therefore, the unfolded point cloud is divided into ground and non-ground points. Although CSF successfully filters out most of the noise (non-ground points), including pipes, shadows, bolt holes, and segment annular seams, the remaining noise points are further filtered using the SOR method. In order to further eliminate the remaining noise, SOR is applied. This method requires two key parameters: the number of neighborhood points k is set to 1000, because this value provides better filtering performance. The multiple of the standard deviation λ is set to 5. The denoising process is as follows Figure 3 shown.
[0084] In S3, grayscale image generation and dataset creation include the following steps:
[0085] S31: grayscale image generation;
[0086] S32: Data set creation.
[0087] In S31, the grayscale image is generated by the following steps:
[0088] Leaking areas have a stronger absorption capacity for laser light, and the reflection intensity is a reliable indicator of leak detection. Therefore, a rasterization-based method is used to convert the PCD into a grayscale image, mapping the coordinates and intensity information of the 3D point cloud onto a 2D image. This method primarily involves three steps: 1) calculating image resolution, 2) grayscale intensity mapping, and 3) rasterization.
[0089] (1) Image resolution calculation. The number of rows and columns in the generated image is determined by calculating the extent of the point cloud according to Equation 8. min and z max Respectively represent the minimum and maximum values of the point cloud in the Z-axis direction. min and y max Indicates the minimum and maximum values in the Y-axis direction. s is the pixel resolution. An image matrix is created.
[0090] (8)
[0091] (2) Grayscale intensity mapping, using Equation 9 to linearly normalize the intensity value to a grayscale range of 0 to 255. Where intensity is the intensity value of each point in the point cloud. min is the minimum intensity value. max is the maximum intensity value. mapped is the normalized grayscale value, γ is a nonlinear parameter used to control the normalized distribution. The contrast effect of the image is adjusted through gamma correction and is set according to the characteristics of different tunnel point clouds.
[0092] (9)
[0093] (3) Rasterization. The 2D coordinates z and y of each point are mapped to the corresponding position in the image matrix, and a normalized intensity value is assigned to the pixel at that position.
[0094] In S32, the data set is established as follows:
[0095] A dataset was constructed from grayscale images generated from point clouds of various tunnels. As previously mentioned, the tunnel point clouds were captured using a high-resolution 3D laser scanner, then processed and converted into 2D grayscale images using the steps above. Leakage areas in the images were manually annotated to ensure high-quality labeled data for model training.
[0096] Using the above method, the denoised tunnel segment point cloud was converted into a grayscale image. The pixel resolution of the generated grayscale image was set to 0.01. γ was set to 1. The leakage areas in the generated grayscale image were manually marked to create a dataset for model training.
[0097] In S4, the above dataset is used to train a YOLO-based leakage detection model. The YOLO algorithm is a deep learning model used for object detection in computer vision. The constructed dataset is used to train a YOLO-based leakage detection model. The YOLO framework is chosen because of its real-time object detection capability and accuracy. (1) During the training process, hyperparameters such as learning rate, batch size, and number of iterations need to be adjusted to optimize model performance. (2) In order to improve the diversity and robustness of the dataset, data augmentation techniques such as translation, scaling, and flipping in deep learning are used to improve the generalization ability of the model under different tunnel conditions. (3) The average average precision (mAP), precision, recall rate and other indicators obtained after training are used to continuously evaluate the model performance.
[0098] Training was performed on a Windows 11 system equipped with a 12th Generation Intel(R) Core(TM) i7-12700F processor and an Nvidia GeForce RTX3060Ti graphics card. The model was trained under these conditions using the aforementioned dataset. In this study, the hyperparameter settings were categorized into two types: training and data augmentation (see Table 1).
[0099] Table 1 Model training parameter settings
[0100]
[0101] The model's post-training output shows strong performance, with precision steadily increasing as training progressed, ultimately exceeding 0.8. Recall also showed a positive trend, ultimately reaching above 0.8, demonstrating strong object capture capabilities. Furthermore, the mean average precision (mAP50) continued to improve during training, ultimately stabilizing above 0.8. In summary, the model demonstrated strong improvements across all key metrics as training progressed, ultimately stabilizing above 0.8. Overall prediction and segmentation capabilities strengthened with training, making the model suitable for high-precision tasks.
[0102] In S5, in order to detect the leakage area in the actual tunnel project, the target tunnel point cloud is first processed using the above steps and converted into a grayscale image. Each image is then divided into three sub-images to match the target size (640*640) used during model training, thereby ensuring more accurate segmentation of the leakage area. The sub-images are then analyzed using the trained leakage detection model to effectively segment the leakage area. The segmentation result of the leakage area determines the number of pixels covered by the leakage area mask. In addition, the grayscale image width pixel of a tunnel segment corresponds to the value of the user-defined fixed interval mentioned in step S1, so that the actual measurement value of the leakage area in each tunnel segment can be calculated. The calculation is shown in Equation 10. Where M l is the leakage area. m is the number of pixels in the leakage segmentation mask in the tunnel segment sub-image, and n is 3, indicating the number of sub-images. p0 is the number of pixels in the grayscale image. D is the actual width of a tunnel segment slice. Furthermore, l is the length in pixels of the grayscale image, and w is the width in pixels of the grayscale image.
[0103] (10)
[0104] After evaluating the robustness of the model, it was applied to leakage detection in a shield tunnel in Guangzhou. The accuracy of the method was verified by comparing the leakage area detected by the model with the actual leakage area. Figure 4As shown in Figure 2, the model effectively detects and segments all leaking areas in one tunnel segment, unaffected by the complex background. Furthermore, the leaking area of the tunnel segment can be calculated using Equation 10. The proposed model segmented the leaking areas and calculated the leaking areas, which were then compared with manually labeled leaking area measurements, as shown in Table 2. The results demonstrate a 92% accuracy rate, further demonstrating its effectiveness in practical applications.
[0105] Table 2 Model detection accuracy
[0106]
[0107] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any ordinary technician in this industry can smoothly implement the present invention as shown in the drawings and described above. However, any equivalent changes, modifications and evolutions made by technicians familiar with this profession without departing from the scope of the technical solution of the present invention using the technical content disclosed above are all equivalent embodiments of the present invention. At the same time, any equivalent changes, modifications and evolutions made to the above embodiments based on the essential technology of the present invention are still within the scope of protection of the technical solution of the present invention.
Claims
1. A method for automatically identifying water leakage in shield tunnels based on point cloud data, characterized in that: The following steps are involved: S1: Use a 3D laser scanner to stitch and downsample according to the set station distance, and segment the resulting tunnel point cloud at the same interval and unfold it into a plane; S2: denoising is performed using CSF and SOR methods in sequence; S3: Use a rasterization-based method to convert point cloud data into grayscale images, map the coordinates and intensity information of the 3D point cloud onto a 2D image, and construct a dataset from grayscale images generated from point clouds of various tunnels; S4: Use the dataset to train a YOLO-based leakage detection model; S5: Process the target tunnel point cloud image according to steps S1 to S3, and divide the tunnel segment image into sub-images of a size suitable for model detection. Use the trained leakage detection model to analyze the sub-images, segment the leakage area, and calculate the leakage area using the following formula: ; Where: M l is the leakage area, m is the pixel of the leakage segmentation mask in the sub-image of the tunnel segment, p0 is the number of pixels in the grayscale image, n is the number of sub-images divided according to the tunnel wall perimeter, D is the actual width of the tunnel segment, l is the length pixel of the grayscale image, and w is the width pixel of the grayscale image.
2. The automatic identification method of shield tunnel water leakage based on point cloud data according to claim 1 is characterized in that: Said S1 further comprises the steps of: The segmented tunnel point cloud is converted from the rectangular coordinate system to the cylindrical coordinate system. After the conversion is completed, the segmented point cloud is unfolded. The unfolding method is: The tunnel segment point cloud is unfolded along the Z axis. During the unfolding process, the position of point P (θ, r, z) is projected onto the plane to become point P' (x', y', z').
3. The automatic identification method of shield tunnel water leakage based on point cloud data according to claim 1 is characterized in that: The denoising step using CSF in S2 includes: S21: Flip the original point cloud and drop the virtual cloth onto the inverted point cloud. The cloth is modeled using a mass-spring system, where the cloth is composed of particles connected by springs to simulate the behavior of real cloth. The displacement of each particle under the action of gravity is calculated as follows: Where m is the mass of the particle, X(t) is the position of the particle at time t, ∆t is the time step, and G is the gravitational constant; S22: After the cloth is affected by gravity, the position information of each particle is adjusted according to the force exerted by neighboring particles. The height difference of each particle relative to its neighbors is calculated, and the displacement vector of the particles connected by springs is calculated. The calculation formula is: in, is the displacement vector of the particle. When b=1, the particle can move, otherwise it is 0; is the current particle position, is the position of the neighboring particle connected to it, = (0,0,1) T is the vertical direction vector; A height threshold is set according to the tunnel environment, and particles whose vertical distance exceeds the threshold are regarded as non-ground points and removed from the point cloud.
4. The automatic identification method of shield tunnel water leakage based on point cloud data according to claim 3 is characterized in that: The denoising step using SOR in S2 includes: S23: For each point in the point cloud p i , find its k nearest neighbor points { p i1 ,p i2 …p ij }, and calculate the target point p i With each neighbor point p ij Euclidean distance between d ij : S24: For each point p i , calculate the average distance within its neighborhood μ i and standard deviation σ i , the formulas are as follows: ; ; S25: Calculate the segmentation threshold T, , λ A multiple of the point cloud density. If the average distance of a point exceeds the threshold T, the point is considered an outlier and removed from the point cloud.
5. The automatic identification method of shield tunnel water leakage based on point cloud data according to claim 1 is characterized in that: The step of converting point cloud data into a grayscale image in S3 includes: S31: Image resolution calculation, calculate the range of the point cloud to determine the number of rows and columns in the generated image: where z min and z max Respectively represent the minimum and maximum values of the point cloud in the Z-axis direction, y min and y max Indicates the minimum and maximum values in the Y-axis direction, and s is the pixel resolution; S32: Linearly normalize the intensity value to a grayscale range of 0 to 255. The calculation formula is: Where I is the intensity value of each point in the point cloud, I min is the minimum intensity value, I max is the maximum intensity value, I mapped is the normalized grayscale value, γ is a nonlinear parameter used to control the normalized distribution. It adjusts the contrast of the image through gamma correction and is set according to the characteristics of different tunnel point clouds. S33: The 2D coordinates z and y of each point are mapped to the corresponding position in the image matrix, and a normalized intensity value is assigned to the pixel at that position.
Citation Information
Patent Citations
Method for detecting water leakage of tunnel
CN118799791A
Automatic tunnel leakage identification method based on deep learning
CN113610052A
Multi-source data feature-based rail transit tunnel disease detection method and system
CN120070333A