Intelligent detection and positioning method for underground pipeline of residential area
By improving the YOLOv8n model, introducing the EFIM and LSKA modules, and combining the Wise-IoU loss function, an underground pipeline detection and positioning model is constructed. This solves the problems of high cost and low accuracy of underground pipeline detection in existing technologies, and realizes efficient and accurate intelligent detection and positioning of underground pipelines.
Patent Information
- Application Number
- CN202510726506.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-26
AI Technical Summary
Existing underground pipeline detection methods are costly, have poor multi-target recognition and detection effects in complex soil environments, and their positioning accuracy is less than ideal. Traditional methods rely on manual labeling and have cumbersome steps, making it difficult to accurately detect and locate underground pipelines in complex geological environments.
An improved YOLOv8n model is used to construct an underground pipeline detection and positioning model by introducing the edge feature combination module EFIM and the large kernel separation attention module LSKA, combined with the Wise-IoU loss function. Ground penetrating radar is used to acquire images and perform intelligent detection and positioning.
On the basis of lightweight design, the detection and positioning accuracy of underground pipelines is improved, the number of model parameters and calculation amount are reduced, the accuracy of target detection and key point positioning is improved, and the adaptability and robustness of the model in complex environments are enhanced.
Smart Images

Figure CN120707801A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of underground pipe network detection, and in particular relates to an intelligent detection and positioning method for underground pipelines in residential areas. Background Art
[0002] Underground pipelines are a key component of urban infrastructure, carrying important functions such as power, water, and gas supply. However, with the advancement of urbanization, the number and complexity of underground pipelines have increased dramatically, posing enormous challenges to their daily management and maintenance.
[0003] During the renovation and upgrading of older pipelines, detecting and locating existing underground pipelines in residential areas is a crucial task. Ground-penetrating radar (GPR), a crucial tool for urban exploration, is primarily used to detect the characteristics and distribution of objects within solid structures, such as underground structures and buildings. In GPR B-scan images, underground targets typically exhibit a hyperbolic shape, so detecting underground targets can be transformed into identifying and extracting the target's hyperbolic signal.
[0004] For the recognition and detection of hyperbolic echoes, existing traditional detection methods have high detection costs and poor recognition and detection effects on multiple targets in complex soil environments. The target detection model based on deep learning is not designed for the characteristics of B-scan images, but only regards them as ordinary optical images. Therefore, its feature extraction ability is weak, which can easily cause problems such as false detection and missed detection, resulting in less than ideal detection accuracy.
[0005] For pipeline location, methods that use the midpoint of the upper boundary of the detection box as the echo vertex have low accuracy and rely heavily on manual annotation. Location methods that use post-processing operations such as cluster fitting have difficulty determining the segmentation threshold due to the complexity of the geological environment and the diversity of hyperbolic signal characteristics. This directly affects the accuracy of subsequent hyperbolic fitting, and thus the accuracy of pipeline location detection and depth estimation. Furthermore, these methods are two-stage, cumbersome, and complex. Summary of the Invention
[0006] The purpose of the present invention is to overcome the defects of the prior art and provide a method for intelligent detection and positioning of underground pipelines in residential areas. It realizes intelligent detection and positioning of underground pipelines based on the underground pipeline detection and positioning model, and can improve the detection and positioning accuracy of underground pipelines on the basis of lightweight model.
[0007] The technical solution provided by the present invention is:
[0008] A method for intelligent detection and positioning of underground pipelines in residential areas, comprising:
[0009] Construct underground pipeline echo image dataset;
[0010] The YOLOv8n model is improved and trained based on the underground pipeline echo image dataset to obtain an underground pipeline detection and positioning model;
[0011] Among them, the method of improving the YOLOv8n model is as follows: introducing the edge feature combination module EFIM into the C2f module of the backbone network, introducing the large kernel separation attention module LSKA into the SPPF module, using the SCKD detection head as the head module, and using the Wise-IoU loss function as the bounding box loss function;
[0012] A radar echo image of the residential area to be measured is obtained by a ground-penetrating radar, and the radar echo image of the residential area to be measured is input into the underground pipeline detection and positioning model. The underground pipeline detection and positioning model identifies the underground pipelines in the residential area to be measured and outputs the buried depth and horizontal position of the underground pipelines.
[0013] Preferably, the intelligent detection and positioning method for underground pipelines in residential areas further comprises:
[0014] Improve the SCKD detection head and use the improved SCKD detection head as the head module of the improved YOLOv8n model;
[0015] Among them, the method for improving the SCKD detection head is: replacing the two 3×3 shared convolutions of the shared branch and the two 3×3 convolution modules of the key point detection branch in the SCKD detection head with DBB modules respectively.
[0016] Preferably, the method of introducing the edge feature integration module EFIM into the C2f module is: using the edge feature integration module EFIM to replace the Bottleneck module in the C2f structure.
[0017] Preferably, the large core separation attention module LSKA is introduced into the SPPF module as follows: the large core separation attention module LSKA is introduced after the multi-scale feature map splicing operation is completed in the SPPF module.
[0018] Preferably, the method for constructing the underground pipeline echo image dataset is:
[0019] The echo images of underground pipelines measured by ground penetrating radar are used as the first data set;
[0020] GprMax simulation software is used to generate an underground pipe network echo image, and random noise is added to the simulated underground pipe network echo image to obtain a second data set;
[0021] The first data set and the second data set are combined to obtain the underground pipeline echo image data set.
[0022] Preferably, the Peplinski simulated soil model is used as the medium model in the GprMax simulation software.
[0023] Preferably, the intelligent detection and positioning method for underground pipelines in residential areas further comprises:
[0024] The direct wave suppression, wavelet denoising and AGC gain methods are respectively used to preprocess the underground pipeline echo image dataset, and the preprocessed underground pipeline echo image dataset is used to train the improved YOLOv8n model.
[0025] Preferably, the preprocessed underground pipeline echo image dataset is randomly divided into a training set, a validation set and a test set in a ratio of 7:1:2.
[0026] Preferably, the intelligent detection and positioning method for underground pipelines in residential areas further comprises:
[0027] The samples in the training set are enhanced using the Mosaic data enhancement algorithm, affine transformation and HSV color adjustment, and the enhanced samples are used as training samples.
[0028] The beneficial effects of the present invention are:
[0029] The intelligent detection and positioning method for underground pipelines in residential areas provided by the present invention realizes intelligent detection and positioning of underground pipelines based on the YOLOv8-pose-ELWSD model. Compared with the YOLOv8-pose model, the YOLOv8-pose-ELWSD model reduces the number of parameters by 15.9% and the amount of calculation by 19.3%. The mAP@0.5 and mAP@0.5:0.95 of the target detection part reach 93.8% and 45.9% respectively, while the two indicators of the key point detection part are 93.4% and 60.5% respectively. On the basis of lightweight, the detection and positioning accuracy of the model are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is the simulated detection map of the ground penetrating radar described in the present invention.
[0031] Figure 2 This is a schematic diagram of the experimental site and pipeline burial described in the present invention.
[0032] Figure 3 (a) and (b) are the A-scan signal diagrams before and after denoising, respectively.
[0033] Figure 4 The figure is a schematic diagram of the process of constructing the underground pipeline echo image dataset according to the present invention.
[0034] Figure 5This is a structural diagram of the C2f module described in the present invention.
[0035] Figure 6 This is a structural diagram of the EFIM module described in the present invention.
[0036] Figure 7 This is the EdgeConv module structure diagram described in the present invention.
[0037] Figure 8 This is a structural diagram of the C2f-EFIM module described in the present invention.
[0038] Figure 9 This is a structural diagram of the SPPF-LSKA module described in the present invention.
[0039] Figure 10 This is the YOLOv8-ELW model structure diagram described in the present invention.
[0040] Figure 11 These are the target echo detection effect diagrams of the YOLOv8-ELW model pipeline described in the present invention; (a)-(c) are the detection effect diagrams of the model for different B-scan simulated images, and (d)-(f) are the detection effect diagrams of the model for different B-scan measured images.
[0041] Figure 12 (a) and (b) are the heat maps after detection using the YOLOv8n model and the YOLOv8-ELW model, respectively.
[0042] Figure 13 (a) and (b) are the heat maps after detection using the YOLOv8n model and the YOLOv8-ELW model, respectively.
[0043] Figure 14 (a) and (b) are visualizations of the receptive field of the feature map with 9 layers using the YOLOv8n model and the YOLOv8-ELW model, respectively.
[0044] Figure 15 This is the structural diagram of the SCKD Head described in the present invention.
[0045] Figure 16 This is a structural diagram of the DBB module described in the present invention.
[0046] Figure 17 This is a structural diagram of the YOLOv8-pose-ELWSD model described in the present invention.
[0047] Figure 18 This is the coordinate mapping diagram described in the present invention.
[0048] Figure 19These are the key point positioning effect diagrams of the YOLOv8-pose-ELWSD model described in the present invention on some images in the test set; (a)-(c) are the model positioning effect diagrams for different B-scan simulated images, and (d)-(f) are the model positioning effect diagrams for different B-scan measured images.
[0049] Figure 20 (a) and (b) are the heat maps of the YOLOv8-pose model and the YOLOv8-pose-ELWSD model, respectively.
[0050] Figure 21 This is the B-scan image selected for the positioning experiment in this invention. DETAILED DESCRIPTION
[0051] The present invention will be described in further detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.
[0052] The present invention provides a method for intelligent detection and positioning of underground pipelines in residential areas, and the specific implementation process is as follows.
[0053] 1. Dataset Construction and Data Preprocessing
[0054] This paper uses deep learning methods to study the detection and location of underground pipelines using ground-penetrating radar (GPR). Therefore, a large number of echo images are required as experimental datasets. However, due to the high cost of acquiring field-measured data and the limited data volume, the present invention combines field-measured radar datasets with batch-built datasets using GprMax simulation software to obtain the final dataset.
[0055] GprMax is electromagnetic simulation software for ultra-wideband radar used for electromagnetic wave forward simulation. It uses the finite-difference time-domain method to solve Maxwell's equations. Its built-in code is written in Python, and it can use GPU computing to accelerate the simulation calculation process.
[0056] The GprMax input file is used to set the various parameter data of the detection scene in the GPR simulation system, and to simulate the echo data of the ground penetrating radar in complex media. In the input file, the simulator usually needs to set the model size, model medium, various characteristics and position parameters of the target object, and the position of the transmitting antenna and receiving antenna. These input files are executed by entering interactive commands to calculate the output file with the ".out" suffix. The ".out" file saves the A-scan signal and time interval. By merging multiple A-scan signals, the "_merge.out" file representing two-dimensional data is obtained, and the B-scan image is obtained based on this for subsequent analysis. In addition, the generated ".vti" file can be read by Paraview to visualize the model, which is convenient for verifying the model structure and comparing it with the corresponding B-scan image.
[0057] When using GprMax for forward simulation, a uniform medium is usually used. The simulation results are quite different from the detection images under actual detection conditions, which is not conducive to the practical application of the model. Therefore, how to simulate the real underground soil environment through simulation is an important issue for the construction of the data set.
[0058] The present invention adopts the Peplinski simulated soil model during simulation. This model constructs an anisotropic soil type model by setting parameters such as clay, gravel, density, and soil moisture content. This model sets different electromagnetic properties for each part of the soil, which affects the propagation of electromagnetic waves in the soil, adds interference to the simulated image, and improves the generalization of the model.
[0059] As a preferred embodiment, the parameters of the Peplinski simulated soil model used in the present invention are set based on typical soil characteristics, and the gravel density is set to 2.66 g / cm 3 , bulk density is 2g / cm 3 The gravel-to-clay ratio is set to 1:1, suitable for homogeneous mixed soil environments; the soil water volume fraction range is set to 0.001 to 0.01 to simulate dry soil on sunny days. Research and simulation experiments have shown that this parameter setting is consistent with general urban geological conditions, effectively simulating real soils and improving the model's generalization capabilities.
[0060] The soil model structure designed by the present invention is as follows Figure 1As shown in the figure, the grid length is set to 0.0025m×0.0025m×0.0025m, and the model space is 2.5m×1.5m×0.0025m. Since the z-axis has a range of only one grid length, it can be regarded as a two-dimensional calculation. The PML layer is set to 10 grid lengths to suppress the reflection of electromagnetic waves at the model boundary. The antenna excitation source is Ricker wavelet. To achieve a balance between detection resolution and detection depth, the radar center frequency is selected as 600MHz, and the time window size is 50ns. A separate transmitting and receiving antenna is used. The initial distance between the transmitting antenna is 0.06m, and the receiving antenna is 0. The height of the antenna is 0.04m, the antenna is 0.02m from the ground, and the step distance of the transmitting and receiving antennas is 0.02m. The final B-scan image is obtained by merging the multi-channel A-scan data. The Peplinski anisotropic soil model is used to simulate the actual underground uneven soil. The underground pipelines are made of metal pipes to simulate various pipelines such as underground natural gas pipelines, tap water pipelines, power and communication pipelines. The number of pipelines simulated each time is randomly selected from 1 to 5, and the depth of each pipeline is randomly selected from 0.3m to 0.9m. The pipe diameter and wall thickness are randomly selected within a reasonable range according to the "Technical Manual of Urban Underground Pipelines".
[0061] To construct the B-scan image dataset required for subsequent experiments, a Python script was developed to batch generate input files containing pipeline scenarios with varying numbers, depths, diameters, and wall thicknesses. These parameters were randomly selected within a reasonable range to enhance the diversity of the dataset and improve the generalization of the model. A script was also developed to batch execute the "*.in" files, ultimately generating 918 B-scan images, which served as the initial simulation dataset for subsequent experiments.
[0062] This paper uses ground-penetrating radar measured data provided by cooperative units and some open-source measured data from the Internet to enrich the data set and improve the robustness of the model. A total of 90 B-scan images are included. The ground-penetrating radar measured data provided by the cooperative units uses a ground-penetrating radar with a center frequency of 600MHz to conduct field detection in a self-built experimental field. Figure 2 The test site environment and some examples of buried pipelines are shown. The test site is 4 meters long, 3.5 meters wide, and 1.6 meters deep. The pipelines in the example are buried to a depth of 0.7 meters. B-scan images of metal pipelines show that the pipelines have distinct hyperbolic echoes on the B-scan images.
[0063] During ground-penetrating radar (GPR) detection, the echo image often contains stable, high-amplitude, high-energy echoes, known as direct waves. These echoes primarily consist of direct reflection waves and mutual coupling waves. Direct reflection waves originate from the ground surface, generated by the antenna receiving the reflected echo from the air-soil interface. Furthermore, because the GPR receiving antenna and transmitting antenna are in close proximity and lack adequate isolation, some electromagnetic waves are directly received by the receiving antenna after being transmitted by the transmitting antenna. These echoes are known as mutual coupling waves between the transmitting and receiving antennas.
[0064] In a GPR B-scan image, the energy of the direct wave is significantly higher than that of the target's echo. Therefore, the direct wave compresses the dynamic range of the target signal, obscuring the characteristics of the target echo in the B-scan image. This adversely affects the subsequent detection and positioning of underground pipelines and also interferes with the GPR system's detection capabilities. Therefore, before subsequent processing, the direct wave should be suppressed to reduce interference with signal processing and facilitate clearer analysis of the target echo.
[0065] For scenes with small changes in direct wave characteristics, the average cancellation method is very effective. Therefore, the present invention uses the average cancellation method to suppress direct waves. After using the average cancellation method to suppress direct waves, the direct waves at the top of the image are basically eliminated, and the pipeline target signal strength is significantly enhanced.
[0066] The complex underground soil environment often causes noise in ground-penetrating radar images. Some of this noise is caused by electromagnetic waves reflecting off impurities in the soil, while others are internal to the instrument, primarily due to antenna coupling. The combined effects of pipeline target echoes and noise clutter reduce the image's signal-to-noise ratio, making it difficult to discern target signals and significantly interfering with subsequent echo detection and pipeline location.
[0067] Noise in ground-penetrating radar (GPR) B-scan images is typically simulated as additive white Gaussian noise. Image denoising not only suppresses random noise but also enhances the echo signal of the target pipeline. Currently, many denoising methods are used for GPR images, such as wavelet threshold denoising, bilateral filtering, and median filtering. This paper employs wavelet threshold denoising to suppress noise in B-scan images.
[0068] Wavelet transform is a transformation method that can decompose signals or images into multiple scales and frequencies and has good time-frequency characteristics.
[0069] The main process of the two-dimensional wavelet threshold denoising method is as follows: First, the noisy image is decomposed using wavelet decomposition, selecting an appropriate wavelet basis function and number of decomposition levels. This yields a wavelet coefficient matrix, which contains both low-frequency and high-frequency components. Subsequently, a threshold function is constructed and determined based on the noise characteristics. This threshold function is then used to process the high-frequency components, effectively removing the noise. Finally, the processed wavelet coefficients are reconstructed using an inverse wavelet transform to obtain the denoised image.
[0070] In the wavelet threshold denoising method, the threshold function for decomposing high-frequency components mainly includes hard thresholding and soft thresholding. The hard thresholding method directly sets the coefficients less than or equal to the threshold to zero, while the soft thresholding method subtracts the threshold from the wavelet coefficients greater than the threshold after setting them to zero.
[0071] To achieve better denoising results, experiments were conducted using the pipeline image dataset constructed using this method. First, Gaussian white noise was added to the existing dataset to simulate the noise and interference found in actual detection scenarios. The Gaussian noise had a mean of 0 and a standard deviation randomly distributed between 5 and 50, mimicking the uncertainty of noise in real scenes. Based on the experimental results, the wavelet basis function and number of decomposition levels that achieved the best denoising results were selected and used to process the dataset.
[0072] In this experiment, Peak Signal Noise Ratio (PSNR) is selected as the denoising evaluation indicator. The higher the PSNR value, the stronger the denoising ability of the algorithm. The calculation formula of PSNR is as follows:
[0073]
[0074] Among them, MAX I is the maximum pixel value of the image, and MSE is the mean square error, which is defined as:
[0075]
[0076] Where M and N are the number of rows and columns of the image, I(i,j) and K(i,j) are the pixel values of the original image and the denoised image at the i-th row and j-th column, respectively.
[0077] Because the soft threshold function improves the discontinuous wavelet transform coefficients obtained by the hard threshold function, the performance is smoother, and the soft threshold can reduce the ringing effect. Experimental verification shows that among the wavelet basis functions selected by the present invention, the soft threshold function has a better denoising effect than the hard threshold function. Therefore, the soft threshold function is selected as the threshold function in the present invention.
[0078] The experimental results show that the denoising trends of each wavelet basis function are essentially the same as the number of decomposition layers increases. That is, the denoising effect gradually increases with the number of wavelet decomposition layers, and converges between layers 4 and 6. Among all the wavelet basis functions, RBIO6.8 has the best denoising effect. Therefore, this paper uses RBIO6.8 to denoise the original data set, improve the image signal-to-noise ratio, and enhance the target echo signal.
[0079] The present invention selects the rbio6.8 wavelet basis function with 6 layers and the soft threshold function, and uses the wavelet threshold denoising method to denoise the ground penetrating radar B-scan image dataset of the present invention. To further verify the denoising effect, the A-scan signal image corresponding to the 200th channel of the B-scan image before and after denoising is plotted. Figure 3 As shown in the figure, (a) is the original A-scan, and (b) is the A-scan signal after denoising using the wavelet threshold denoising method. It can be seen that the denoised A-scan signal is smoother and the target signal amplitude is effectively highlighted, which shows that the denoising method used in this invention has a good denoising effect on GPR images.
[0080] Because the simulation environment is relatively simple and fewer clutter and noise factors are considered, the hyperbolic features of targets in simulated GPR B-scan images are typically clear and easy to extract and identify. However, in actual detection, due to system interference, clutter and noise, unknown targets, uneven soil distribution, and surface roughness, the hyperbolic features in measured data are often blurred or distorted, making target signal identification and detection more difficult. This discrepancy between simulation and measurement results in significant differences in the performance of the same algorithm between simulation and field applications, which is a major challenge in GPR research.
[0081] To address this issue, the present invention uses the Peplinski simulated soil model to simulate the real underground soil environment. Random noise is added to the original data set to improve the robustness of the model. The number of pipelines and related parameters are randomly set within a reasonable range to enhance the diversity of the data set. After combining the simulated data with the measured data, direct wave suppression, wavelet denoising, and AGC gain methods are used to preprocess the data set images to enhance the target signal and suppress irrelevant clutter and noise. Finally, a data set with 1008 B-scan data is constructed. The overall data set construction process is as follows: Figure 4 shown.
[0082] Since it is necessary to detect the hyperbola signal and locate the vertex, left endpoint and right endpoint of the target hyperbola in the future, the present invention uses the LabelMe annotation tool to annotate the data set.
[0083] For this research, LabelMe provides annotation for pipeline echo signal detection and key point detection. Key point detection is a key function of LabelMe, enabling precise annotation of target points in an image and defining key point category names based on task requirements. Because LabelMe's annotation files are in JSON format, we converted the annotations to YOLO format using a script before conducting subsequent experiments.
[0084] After labeling, the dataset is randomly divided into three categories in a ratio of 7:1:2, as training set, validation set and test set respectively.
[0085] 2. Build the pipeline echo detection model YOLOv8-ELW
[0086] The C2f (Cross-Stage Partial with Two Convolutions Faster Implementation) module is a key module for efficient feature extraction in the YOLOv8 network. The main structure of C2f is as follows Figure 5 As shown in the figure, the input features are first reduced in dimension through a 1×1 convolution operation, and the features are divided into two parts. One part is directly retained as the main branch, and the other part enters multiple bottleneck submodules for deep feature extraction. Subsequently, these submodules process the features layer by layer. Each module accepts the features output by the previous module and generates new features. Finally, the outputs of all submodules are spliced with the main branch features and fused through 1×1 convolution to obtain the final output. The C2f design aims to preserve the ability to transfer features across stages while achieving effective decomposition and fusion of input features. It also enhances the diversity of feature expression through a multi-branch strategy, allowing feature information of different scales to fully interact in a local range, improving the module's feature extraction capabilities.
[0087] However, in the context of ground-penetrating radar pipeline detection, the original C2f module in the YOLOv8n model has limitations in target feature extraction, especially when processing pipeline target signals with complex backgrounds and intersecting echoes. Because GPR images are generated based on the reflection intensity of echo signals, differences in reflection intensity between different materials lead to significant contrast between the image target signal and the background. These differences often appear at signal edges, such as the boundary between pipelines and soil, or between different media. Bottleneck, which primarily relies on residual learning to enhance feature representation, has limited ability to capture edge details in target signals, making it difficult to effectively distinguish pipeline signals from the surrounding complex background. Furthermore, ground-penetrating radar data is often subject to strong noise interference, making it very easy for traditional convolutional structures to lose subtle target boundary features during feature extraction.
[0088] To solve the above problems, the present invention adopts an edge feature integration module (EFIM) to replace the Bottleneck module in the C2f structure, so as to improve the edge feature extraction capability of the C2f module and thus enhance the performance of pipeline detection.
[0089] The structure of the EFIM module is as follows Figure 6 As shown in the figure, this module consists of two parallel branches: an edge branch and a convolution branch. The edge branch extracts edge information from the input features, while the convolution branch enhances local feature extraction through standard convolution operations. The input features first pass through the edge branch module to calculate horizontal and vertical gradient information to obtain edge feature maps. Simultaneously, the input features also undergo a 3×3 standard convolution to extract local features, preserving complete spatial information and global context. The outputs of these two branches are then concatenated along the channel dimension and compressed using a 1×1 convolution to fuse the edge information extracted by the Sobel branch with the local features extracted by the convolution branch. The fused feature map is then element-wise added to the original input features through a residual connection, ensuring that the model preserves the original information while enhancing the representation of edge and local features. Finally, a 1×1 convolution is performed to adjust the number of channels to match the target output channel count.
[0090] The edge branch module EdgeConv structure used in the EFIM structure is as follows: Figure 7 As shown in the figure, this module first accepts input features, then uses two fixed convolution kernels to detect the horizontal and vertical gradients of the input features, respectively. Finally, the horizontal and vertical gradient responses are summed to form a comprehensive edge feature map. This structure uses a Sobel operator with fixed weights and implements edge extraction via a non-trainable convolution kernel, ensuring stability during the extraction process. By extracting edge features, the EdgeConv module significantly enhances the boundary information of target echoes, enabling the model to accurately detect and identify pipeline locations even in complex backgrounds.
[0091] In the ground penetrating radar pipeline detection task, the boundary of the pipeline is often relatively fuzzy, and the gradient information of the target signal is an important feature for determining its existence. Since the edge branch can directly focus on the area with significant gradient changes and highlight the outline of the target echo, the convolution branch can enhance the strength of local features, so that the network can detect pipeline information more stably. Therefore, after introducing EFIM into the C2f structure, it can further improve the perception of the edge information of the target signal on the basis of the multi-branch feature extraction of the original structure, thereby enhancing the ability to distinguish pipeline targets under complex backgrounds. In addition, the information interaction between multiple layers of EFIM further enhances the edge features of different scales, making the model more adaptable when detecting pipeline targets of different sizes. The C2f structure after the introduction of EFIM (C2f-EFIM module structure) is as follows Figure 8 shown.
[0092] In the original YOLOv8n architecture, SPPF (SpatialPyramidPoolingFast) is an efficient multi-scale feature extraction module that appears at the final stage of the backbone network. SPPF uses multiple max pooling operations to capture information from different receptive fields, improving the model's perception of global context and multi-scale objects, and providing richer feature information for the network. In B-scan images, differences in target depth, size, and shape result in echo signals exhibiting features at different scales. This multi-scale nature poses challenges for subsequent target detection and recognition. Therefore, the SPPF module is crucial for multi-scale feature extraction from B-scan images.
[0093] However, the SPPF module in the original YOLOv8n structure is not capable of distinguishing key areas from complex backgrounds, especially in scenes with complex backgrounds and echoes of multiple cross-structures such as GPR images. It is difficult to directly obtain feature maps with rich semantic information through multiple pooling. To this end, the present invention introduces a large kernel separation attention (LargeSeparableKernelAttention, LSKA) module after the multi-scale feature map splicing operation in the SPPF module is completed. The large kernel separation convolution is used to perform global context calibration on the spliced multi-scale information, thereby enhancing SPPF's perception of key areas and improving the robustness and accuracy of the model's detection in complex scenes.
[0094] In the field of object detection, large convolution kernels typically improve model performance because they can capture a larger receptive field and better capture the overall feature dependencies of long-distance echo signals in B-scan images, that is, consider a wider range of contextual information in the image. However, this also leads to a sharp increase in computational complexity and memory consumption. To address this issue, LSKA decomposes large convolution kernels into multiple serially connected 1D convolution kernels. This effectively reduces computational and memory consumption while maintaining performance similar to traditional methods while using large convolution kernels.
[0095] The SPPF structure (SPPF-LSKA module structure) with LSKA is introduced as follows Figure 9 As shown in the figure, the structure on the right is the LSKA module, an attention mechanism based on large convolution kernels. The input features first undergo two progressively decomposed 1D depthwise separable convolutions. The first layer performs a horizontal convolution to extract horizontal feature information, while the second layer performs a vertical convolution to capture vertical global context. This separation of vertical and horizontal operations effectively reduces the computational overhead of large 2D convolution kernels while preserving important feature information. Next, based on this initial extraction, the convolution module performs feature extraction in the horizontal direction, further expanding the horizontal receptive field to capture longer-range dependencies. Specifically, this module uses dilated convolutions to cover more distant pixels without increasing the kernel size. Subsequently, the convolution module expands the receptive field in the vertical direction to capture long-range information. Finally, the features extracted in both directions are fused through a 1×1 convolution to generate an attention weight map, which is used to recalibrate the original input to produce the final global feature representation. In addition, a skip connection mechanism is introduced into the structure to fuse the input features with the output features after convolution through element-by-element multiplication. This residual design enhances the feature transfer capability while alleviating the gradient vanishing problem, further improving the stability and performance of the model.
[0096] The design of this module balances computational efficiency with the ability to capture global context. While capturing both local details and global long-range information, it reduces the computational complexity of the original large convolution kernels and improves the overall efficiency and adaptability of the network. At the same time, the LSKA module retains the advantages of multi-scale feature extraction while improving the semantic relevance of feature maps, further enhancing feature expression. When combined with the SPPF module, LSKA expands the receptive field in specific directions, focusing on capturing long-range dependencies. Combined with an adaptive attention mechanism, this enables the model to more effectively capture and highlight the overall structure and detailed information of extended targets such as pipeline echo signals.
[0097] The design of the loss function can significantly affect the detection performance of the target detection model. YOLOv8n uses CIoU as the bounding box loss by default. This loss function takes into account multiple factors such as the overlap area and center point distance between the predicted box and the true box. However, most of them assume that the data set contains high-quality data. For B-scan image datasets, due to the influence of multiple factors such as noise clutter, missing structure, and overlapping intersections, there will be some low-quality examples. If the loss function continuously strengthens the regression of the bounding box on these low-quality examples, it will have a certain impact on the detection performance of the model. Therefore, the present invention uses the v3 version of the Wise-IoU (WIoU) loss function to improve the original loss function to compensate for the impact of low-quality samples.
[0098] The Wise-IoU loss function in version 3 uses a dynamic, non-monotonic focusing strategy to evaluate the quality of detection boxes by identifying outliers, thereby reducing unnecessary penalties on geometric attributes such as distance and aspect ratio. Furthermore, when the intersection-over-union (IoU) ratio between the predicted box and the target box is high, the geometric penalty can be weakened without excessively interfering with training, thereby improving the model's generalization performance.
[0099] Based on the YOLOv8n model, this paper designs an edge feature extraction module EFIM to improve the C2f module in the backbone network to enhance the ability to extract the edge characteristics of the target echo. At the same time, the large kernel separation attention module LSKA is introduced in the SPPF module to effectively improve the semantic relevance of the feature map and enhance the model's perception of long-distance echoes. Finally, based on the low-quality samples in the B-scan data, the v3 version Wise-IoU loss function is used as the model bounding box loss function. The final YOLOv8-ELW network model structure is as follows: Figure 10 shown.
[0100] In order to further improve the model detection performance and generalization ability, the present invention also provides a data enhancement strategy for B-scan images.
[0101] Through online data augmentation methods, real-time transformations can be performed on limited original data to generate new training samples, thereby simulating the impact of different environments on B-scan images, improving the adaptability and generalization of the detection model for complex scenarios, and effectively alleviating the problem of model overfitting.
[0102] Based on the characteristics of GPR detection data, this paper strategically uses the Mosaic data augmentation algorithm, affine transformation, and HSV color adjustment method during the training process to improve training results and enhance model generalization capabilities. When using the HSV color adjustment scheme, the parameter is set to 0.2.
[0103] In order to verify the detection performance of the YOLOv8-ELW model, the present invention evaluates it from two aspects: target detection performance and model calculation performance. In terms of target detection performance, accuracy (Precision, P), recall rate (RecallRate, R) and mean average precision (MeanAveragePrecision, mAP) are used as evaluation indicators, specifically including mAP@0.5 and mAP@0.5:0.95. mAP is a comprehensive evaluation indicator of P and R, which is the average value of the average precision of all target categories. Since the present invention only involves one category of metal pipelines, mAP is simplified to a single average precision (AveragePrecision, AP). In terms of model calculation performance, model parameters (Params) and calculation amount (GFLOPs) are selected as evaluation indicators. mAP@0.5 represents the mean average precision when the IoU threshold is 0.5, and mAP@0.5:0.95 represents the mean average precision when the IoU threshold is from 0.50 to 0.95 and the step size is 0.05.
[0104] The model computational complexity is used to measure the computational complexity of the model in terms of floating-point operations, while the model parameter quantity refers to the sum of all trainable parameters in the model. This indicator is one of the important indicators for measuring model complexity and computational requirements.
[0105] The experimental environment used in the present invention is shown in Table 1:
[0106] Table 1 Experimental hardware and software environment configuration
[0107]
[0108]
[0109] The initial learning rate for training the YOLOv8-ELW model is 0.01, the final learning rate is 0.0001, the batch size is 32, the number of experimental rounds is set to 300, and the SGD optimizer is used. An early stopping mechanism is introduced in the training stage to determine whether convergence has been achieved by monitoring the performance of the model on the validation set. Once the model meets the convergence conditions, the training will be terminated early, thereby effectively avoiding overfitting. The number of early stopping waiting rounds is set to 100. Under the above parameters, the model is trained using the training set, and the model is evaluated using the validation set. The optimal model is selected based on mAP@0.5 and mAP@0.5:0.95, with a weight of 1:9. In addition, the data enhancement strategy proposed in the present invention is used to perform online data enhancement on the model during training.
[0110] Figure 11 The figure shows the detection performance of the YOLOv8-ELW model on some data in the test set, where (a) to (c) are simulated images, and (d) to (f) are measured images. Figure 11 (a) shows the model's detection effect on pipeline echoes of different scales in B-scan images. It can be seen that the detection model can accurately identify and select small, medium, and large-scale target signals through structural multi-scale feature extraction and fusion design; Figure 11 As shown in (b), the model can also accurately detect pipeline echoes with overlapping signals one by one; Figure 11 Figure (c) demonstrates the model's ability to interpret B-scan images of pipelines with widely varying depths. The model can not only identify shallower, higher-intensity signals, but also detect deeper, weaker-intensity target echoes, accurately distinguishing them from background clutter and multiple reflections from overhead pipelines. Figure 11 The clutter in (d) to (f) is more complex than the forward modeling data, but the detection model still accurately detects all pipeline echoes and performs box selection and calibration, demonstrating the robustness and generalization of the YOLOv8-ELW model. Figure 11 In (f), multiple pipeline echo signals overlap with each other and are confused with random noise, clutter, and multiple reflections from structural defects, but the model can still identify and select the target hyperbolic signals.
[0111] To explore how the echo detection model makes decisions in radar images with incomplete structures, occlusions, cross-overlaps, and complex backgrounds, this paper uses Grad-Cam++ to visualize the prediction results of the deep learning model as a heatmap, intuitively displaying the key areas of focus during the model reasoning process. This method utilizes convolutional feature maps and gradient information to generate activation heatmaps aligned with the input space, thereby intuitively explaining the visual basis of the model's decisions and providing support for model interpretability. The closer the heatmap color is to red, the higher the model's activation or attention in that area, while blue areas indicate lower activation or model attention.
[0112] Figure 12 and 13 The heatmaps after detection using the YOLOv8n model and the YOLOv8-ELW model are shown. Figure 12 As can be seen from the figure, both models successfully detect the target hyperbolic echo, but the heat map of the YOLOv8-ELW model is more concentrated and prominent in the target area, indicating that the model pays more attention to key features; Figure 13 In the results, the YOLOv8n model only identified four echo signals due to its low perception of key areas, resulting in missed detections. The YOLOv8-ELW model has a significantly stronger perception of the pipeline echo area and thus detected all target echoes. This shows that compared with the YOLOv8n model, this model is better at extracting the shape, edge, and intensity features of B-scan image echoes.
[0113] The introduction of the LSKA module enhances the model's focus on long-distance dependencies. In order to verify the changes in the effective receptive field after the model is improved, the receptive field of the feature map with 9 layers of the model is visualized, as shown in the figure below. Figure 14 Improved image Figure 14 (b) The dark area is significantly larger than the original model image Figure 14 (a) shows that the effective receptive field of this module is larger, which enhances the model's ability to capture large-scale semantic information, enables it to perceive hyperbolic echoes at longer distances, and effectively improves the recognition ability of occlusion signals and reduces false detection problems.
[0114] In order to verify the impact of different loss functions on model training, this paper selects four loss functions, SIoU, GIoU, CIoU, and Wise-IoU (WIoU), as the model bounding box loss function based on the YOLOv8n model. A comparative experiment is conducted on the dataset built by this paper, and the four indicators of P, R, mAP@0.5, and mAP@0.5:0.95 are used to evaluate the model performance. Table 2 shows the comparison of the indicators after optimization of each loss function.
[0115] Table 2 Comparative experiments based on loss functions
[0116]
[0117] It can be observed from Table 2 that the model optimized using the Wise-IoU loss function performs best, with Precision and Recall of 90.9% and 86.7% respectively. The mAP@0.5 is improved by 0.4% compared to the original YOLO-v8, and is significantly better than the performance of other loss functions.
[0118] Ablation experiments are conducted to verify the effects of different improvements on the model’s target detection performance, thereby demonstrating the effectiveness of the improved method. The experimental results are shown in Table 3:
[0119] Table 3. Ablation experiment of target detection model
[0120]
[0121]
[0122] As shown in Table 3, when C2f-EFIM, SPPF-LSKA, and Wise-IoU are introduced individually, the model's detection capabilities are improved to varying degrees. When EFIM and LSKA are introduced simultaneously, the P, R, mAP@0.5, and mAP@0.5:0.95 indicators increase by 1.4%, 3.6%, 2.2%, and 1.6%, respectively, significantly improving the overall performance of the model. When all three are introduced simultaneously, the YOLOv8-ELW model achieves various indicators of 88.9%, 89.0%, 93.2%, and 45.4%, respectively, with mAP@0.5 and mAP@0.5:0.95 increasing by 3.0% and 1.9%, respectively. These experimental results verify the important role of the combination of the improved modules of the present invention in improving the detection performance of underground pipeline echo signals.
[0123] To further verify the detection advantages of the YOLOv8-ELW model, a comparative experiment was conducted with the model and other common target detection models. The specific experimental results are shown in Table 4, which shows the comparison of the precision, recall, and average precision of each detection model on the test set of this invention. It can be seen that while basically maintaining the low parameter and computational complexity of YOLOv8n, YOLOv8-ELW achieves the highest indicators such as P, R, mAP@0.5, and mAP@0.5:0.95, demonstrating the model's strong recognition and extraction capabilities in pipeline target echo detection.
[0124] Table 4. Comparative experiments on target detection models
[0125]
[0126] Comparative experiments and ablation experiments have verified that the YOLOv8-ELW model designed in this paper has achieved good results in GPR image pipeline detection tasks, can meet the efficiency and accuracy requirements in practical applications, and provides a solid foundation for downstream tasks such as pipeline positioning and instance segmentation.
[0127] 3. Pipeline detection and positioning model YOLOv8-pose-ELWSD based on key point detection model
[0128] In order to obtain the horizontal position and burial depth information of underground buried pipelines and realize intelligent positioning of pipelines, it is usually achieved by locating the vertex of the echo signal in the B-scan image. However, most of the existing echo vertex positioning methods based on deep learning adopt a two-stage approach, which is complex and highly dependent on the selection of thresholds. In addition, some methods directly regard the midpoint of the bounding box of target detection as the vertex position, but the accuracy of such methods is low. Therefore, in order to improve the detection and extraction capabilities of target echo signals and key points while avoiding complex post-processing processes, the present invention makes an improvement on the basis of the YOLOv8-ELW model and constructs the YOLOv8-pose-ELWSD model.
[0129] The YOLOv8n-pose model can achieve end-to-end key point detection, but it adds key point positioning heads at different scales in the detection head, uses multiple convolution operations to extract key point features and regress key point positions, and maintains multiple groups of convolution modules of the classification branch and the bounding box regression branch in parallel, which greatly increases the number of parameters and computational complexity of the model detection head. In resource-constrained scenarios such as embedded systems, mobile devices, or edge computing devices, it is easy to cause computational delays or memory overflows. Therefore, the present invention proposes a shared convolutional keypoint detection head (Shared Convolutional Keypoint Detection Head, SCKD Head), which realizes the lightweighting of the model through multi-branch feature sharing.
[0130] Since echo features of different scales usually exist in GPR detection, the detection head retains the output structure of the original model's three-layer feature map of different scales. P3, P4, and P5 correspond to feature maps of different scales extracted from the feature pyramid, which are used for small, medium, and large target detection, respectively. Figure 15 The SCKDHead structure of a single scale is shown. It can be seen that SCKDHead supports classification, bounding box regression, and key point detection tasks simultaneously. The three scales share the multi-scale shared module in the detection head, namely the Multi-scale Shared Block part in the figure, to reduce the computational complexity and parameter amount of the detection head.
[0131] First, the input of each scale is processed by 1×1 convolution. The purpose of this step is to reduce the number of channels and unify the feature dimension. Then, a shared convolution module is used to perform further convolution operations on the feature maps from different scales. The shared convolution module consists of two 3×3 convolution layers. By sharing the same set of convolution parameters, feature maps of different scales significantly improve parameter utilization and achieve cross-scale fusion of features. Finally, after processing, the feature map of each scale is divided into a classification branch and a bounding box regression branch. After the channel is processed by the 1×1 convolution layer, the output is also shared by these two convolution modules for the three scale feature maps to reduce the number of parameters. In order to address the problem of inconsistent target scales detected by each detection head, a scaling layer is used to scale the regression branch features.
[0132] Since the key point detection task is a sophisticated regression task with high requirements for local features and contextual information, in order to ensure that the model is lightweight while the key point positioning accuracy is not affected, this branch is strategically designed as a separate branch, using a combination of 3×3 convolution and 1×1 convolution to independently optimize the key point prediction task.
[0133] Compared to traditional detection heads, SCKDHead further optimizes parameter utilization, improves the model's real-time performance, and makes the model more portable, enabling faster processing of GPR images and meeting the requirements for efficient keypoint detection. Therefore, SCKDHead has strong adaptability and efficiency in GPR image keypoint detection tasks.
[0134] SCKDHead uses shared convolutions to reduce the number of model parameters and computational complexity, making the model more lightweight. However, due to the limitations of shared parameters on feature extraction, the model's expressiveness may be affected. Ground-penetrating radar signals are often accompanied by noise interference and complex backgrounds, and shallow edges and deep semantics in B-scan images require differentiated feature representations. Simple shared parameters cannot fully capture these fine-grained features, so different convolution kernels are required to effectively capture complex patterns. If all features use the same parameters, the model may have difficulty fully learning and distinguishing these features, thus affecting the accuracy of target detection and keypoint localization.
[0135] In order to solve this problem while still maintaining the advantage of lightweight, this section introduces the Diverse Branch Block (DBB), which is a structurally reparameterizable module used to replace the two shared convolutions of the shared branch and the two convolution modules of the key point detection branch in the SCKD detection head. This improvement considers adding more learnable parameters so that the network can more fully extract information from the data, improve the extraction ability of shared convolutions in shared branches, and enhance the perception and detection ability of signal key points in key point branches. In addition, the reparameterizable convolution can dynamically adjust the convolution weights during training to improve the efficiency of parameter utilization, and can be converted to ordinary convolution in the inference stage without adding additional computational costs. It can maintain a lightweight design while effectively improving the expression ability and detection accuracy of the model. The DBB module structure is as follows Figure 16 As shown, the left side is the structure in training mode, and the right side is the structure in inference mode.
[0136] In training mode, input features are processed through multiple parallel branches, including standard convolution branches, average pooling convolution branches, and combined convolution branches. Each branch extracts different types of features and processes them through convolutional layers and batch normalization. The standard convolution branch includes conventional convolution operations and combines them with batch normalization for feature extraction. The average pooling branch first adjusts the number of channels through 1×1 convolution, then extracts global information through batch normalization and average pooling layers, and finally performs further feature processing. The combined convolution branch combines a series of 1×1 convolutions and k×k convolutions to extract richer local spatial features while reducing computational complexity. This module improves the diversity and depth of feature extraction through a multi-path structure, effectively enhancing the network's expressive power.
[0137] In inference mode, DBB optimizes computation by merging multiple branches into a standard convolution operation, that is, through reparameterizable convolution, the computation of all branches is merged into a regular convolution operation, thereby significantly reducing the amount of computation and inference time.
[0138] like Figure 17 As shown, the YOLOv8-pose-ELWSD model uses the backbone network, neck network, and bounding box loss of YOLOv8-ELW. The input image undergoes feature extraction through the backbone network and feature fusion through the neck network. Finally, the proposed keypoint detection head (SCKDHead) outputs keypoint coordinates, target box coordinates, and classification results, simultaneously achieving overall detection of pipeline echoes and specific location of keypoints. The introduction of the reparameterizable DBB module in the SCKDHead not only reduces model size but also effectively compensates for the accuracy loss caused by shared convolution.
[0139] In this paper, key points are defined as the vertex, left endpoint, and right endpoint of the hyperbola echo signal. The vertex calculates the horizontal position and depth of each pipeline underground and is directly used for pipeline positioning. The left and right endpoints, through conditional constraints, enhance the robustness and reliability of the model, enabling the model to more accurately learn vertex positions. Furthermore, the detection and location of the left and right endpoints help determine information such as the echo opening size and pipeline radius, enabling cross-task model transfer.
[0140] After using the keypoint detection model to extract target echoes and detect keypoints in the B-scan image, the model's prediction results are saved as a file containing the target category, detection box location, keypoint locations, and confidence levels. Since B-scan data, as ground-penetrating radar (GPR) detection images, typically have varying sizes and horizontal and vertical coordinate lengths, it's impossible to directly convert pixel coordinates into detection coordinates. Therefore, to determine the actual buried depth and horizontal position of the pipeline corresponding to each echo signal, the keypoint pixel coordinates output by the model must be converted into echo detection coordinates using the B-scan coordinate system. This allows for further determination of the pipeline's actual buried location and precise positioning.
[0141] The positioning method mainly includes two steps: first, the coordinates of the key points output by the model are converted into the detection coordinates corresponding to the coordinate axes of the B-scan data; second, the detection coordinates are converted into the buried depth and horizontal position of the pipeline using the detection principle of ground penetrating radar.
[0142] First, since the key point coordinates output by the key point detection model are normalized coordinates, it is necessary to convert the normalized coordinates into image pixel coordinates. Then, based on OpenCV, the straight lines in the image are detected through image processing technology to determine the positions of the x and y axes. Next, a mapping relationship between pixel coordinates and detection coordinates is established, such as Figure 18 Specifically, we slide the window along the coordinate axis and use the optical character recognition (OCR) technology to identify the coordinate values of two sample points on the x-axis and y-axis respectively. a 、x b , the y-axis takes y a 、y b , and let x a 、x b The corresponding pixel horizontal coordinate is p x_a 、p x_b , similarly, y a 、y b The corresponding pixel ordinate is p y_a 、p y_b , since the distances between adjacent coordinates on the horizontal and vertical axes are the same, we have:
[0143]
[0144] Among them, R x is the ratio between the horizontal detection coordinate and the pixel coordinate, R y is the ratio between the vertical detection coordinate and the pixel coordinate.
[0145] The detected coordinate value of any point in the coordinate system can be obtained by calculation. The calculation formula is as follows:
[0146] (x c ,y c )=(x a +(p x_c -p x_a )·R x ,y a +(p y_c -p y_a )mR y )
[0147] Among them, (p x_c ,p y_c ) is the pixel coordinate of any point in the image, (x c ,y c ) is the detection coordinate corresponding to the point.
[0148] After obtaining the detection coordinates of the vertex of each target echo signal in the image, the predicted horizontal distance of the pipeline can be calculated based on the step distance and the number of A-scan channels. The calculation formula is as follows:
[0149] X pred =rx_step×trace_num+rx_init_pos
[0150] Among them, X pred Represents the predicted horizontal distance of the pipeline, rx_step represents the step size of the ground penetrating radar, trace_num represents the number of A-scan channels, and rx_init_pos represents the initial position of the receiver.
[0151] The pipeline burial depth information can be calculated according to the following formula:
[0152]
[0153] Among them, z0 is the coordinate in the depth direction, v is the propagation speed of electromagnetic waves in the medium, and t0 is the time delay when the transmitting and receiving antenna moves to the top of the pipeline.
[0154] by Figure 18Taking the detection of a single pipeline as an example, the YOLOv8-pose-ELWSD model located the pipeline echo signal vertices at 83 and 0.70 on the B-scan image coordinate axes, indicating an A-scan scan of 83 channels and a round-trip delay of 0.70 seconds. The formula calculates the predicted horizontal distance of the pipeline to be 1.76 meters and the predicted depth to be 0.35 meters. The forward modeling input file shows that the actual buried depth of the pipeline is 0.36 meters, and the horizontal distance is 1.77 meters. The horizontal and depth positioning errors are both 0.01 meters, demonstrating the effectiveness of the key point detection and pipeline positioning methods described in this chapter.
[0155] To evaluate the YOLOv8-pose-ELWSD model and pipeline localization performance, we conducted an evaluation based on four aspects: target detection performance, model computation performance, keypoint localization performance, and pipeline localization performance. The experimental software, hardware, and environment configuration were identical to those used in the YOLOv8-ELW evaluation process.
[0156] In terms of target detection performance, mAP@0.5 and mAP@0.5:0.95 are used as evaluation indicators; in terms of model calculation performance, the number of model parameters, the amount of calculation and the model size are selected as evaluation indicators; in terms of key point positioning performance, mAP@0.5 is used as the evaluation indicator.
[0157] Object Keypoint Similarity (OKS) is used as an evaluation indicator to measure the similarity between actual keypoints and predicted keypoints.
[0158] In terms of positioning accuracy, the mean absolute error and the mean relative error in the horizontal and vertical directions are used as evaluation indicators.
[0159] The YOLOv8-pose-ELWSD model was trained with an initial learning rate of 0.01, a final learning rate of 0.0001, a batch size of 32, 300 epochs, 100 early stopping epochs, and the SGD optimizer. The bounding box loss gain was set to 7.5, the classification loss gain was set to 0.5, and the pose loss gain was set to 12.0. The GPR image data augmentation strategy proposed in this paper was also used during training to enhance model generalization.
[0160] Figure 19 The key point positioning performance of YOLOv8-pose-ELWSD on some images in the test set is shown. Figure 19 (a) to (c) are B-scan simulation data. Figure 19 (d) to (f) are measured data.
[0161] It can be seen that the model can effectively extract the characteristics of the hyperbola echo signal, distinguish between clutter such as multiple reflection waves and coupled waves and target echoes, select the pipeline target echo, and accurately extract the left endpoint, vertex, and right endpoint of the hyperbola signal. Figure 19 From the comparison between (d) and (f), we can observe that, thanks to the multi-scale feature extraction and fusion structure, the model can still accurately identify and carefully perceive the key point positions of hyperbolic echoes with large scale differences.
[0162] The heat map method is used to visualize the key decision effects of the YOLOv8n-pose and YOLOv8-pose-ELWSD models, such as Figure 20 As shown in the comparison chart, we can observe that both the YOLOv8-pose model and the YOLOv8-pose-ELWSD model can accurately select the target echo of the B-scan image, but Figure 20 The brightness of the target key area in (b) is obviously higher than Figure 20 (a) shows that the YOLOv8-pose-ELWSD model has stronger perception capabilities. In addition, Figure 20 In (a), the positioning deviation between the right endpoint of the left echo and the left endpoint of the right echo is large, which indicates that the YOLOv8n-pose model has insufficient perception of the key point area of the hyperbola, resulting in the key point being located at the intersection of the two hyperbolas.
[0163] To analyze the impact of module introduction on model performance, this section conducts ablation experiments, analyzing the performance changes of the model by gradually introducing different modules. To simplify the presentation, the improvements of YOLOv8-ELW, SCKD Head, and DBB are represented by ELW, S, and D, respectively, as shown in Table 5.
[0164] Table 5 Ablation experiment of key point detection model
[0165]
[0166] Observing the data in the table, we can see that after introducing the EFIM module, LSKA module, and Wise-IoU, the model achieves significant improvements in both object detection and keypoint detection accuracy compared to the original YOLOv8-pose model. Further introducing the SCKD Head reduces the model's parameter count and computational complexity by 19.31% and 20.24%, respectively, compared to YOLOv8-pose-ELW, achieving model lightweighting. However, the accuracy of both object detection and keypoint detection decreases slightly. To address the accuracy loss associated with lightweighting, the reparameterizable DBB module is introduced in the shared convolutional module and the keypoint detection head, respectively. This allows YOLOv8-pose-ELWSD to achieve improvements in both object detection and keypoint detection accuracy while maintaining the same parameter count and computational complexity, demonstrating the impact of the integration of these improved modules on model performance.
[0167] When using reparameterized convolution to replace the shared convolution module in SCKDHead, in order to select the most appropriate reparameterized convolution to optimize its ability to extract feature maps of different scales, the present invention selects four reparameterized convolutions: RepConv, DiverseBranchBlock, ACNet (Asymmetric Convolution Net), and WideDiverseBranchBlock. A comparative experiment is conducted on the model after introducing SCKDHead based on YOLOv8-pose. The evaluation indicators are mAP@0.5 and mAP@0.5:0.95 for target detection and key point detection, respectively. The experimental results are shown in Table 6:
[0168] Table 6 Comparative experiment of reparameterizable modules
[0169]
[0170] The comparative experimental results show that when the DiverseBranchBlock module is used as the shared convolution of SCKDHead, the mAP@0.5 and mAP@0.5:0.95 indicators in the target detection task reach 92.6% and 44.8% respectively, and in the key point detection task, they achieve 92.6% and 59.5% respectively. Compared with other reparameterizable convolution modules, the performance is better. It can be seen that the parallel convolution structure of DiverseBranchBlock has a great advantage in extracting B-scan echo signals.
[0171] In order to verify the effectiveness and accuracy of the YOLOv8-pose-ELWSD model proposed in this invention in the key point detection task, the model is compared with other common key point detection models on the B-scan image dataset constructed by this invention using three indicators: the number of model parameters, the amount of computation, and the average precision of key point detection. The experimental results are shown in Table 7. It can be seen that the number of parameters and the amount of computation of the YOLOv8-pose-ELWSD model are 2.59M and 6.7G respectively, which are significantly lower than those of other key point detection models. In addition, the mAP@0.5 index of key point detection reaches 93.4%, indicating that the model can accurately locate the key points in the image, providing a basis for subsequent pipeline positioning.
[0172] Table 7 Comparative experiments on key point detection models
[0173]
[0174] To evaluate the effectiveness of the pipeline positioning method based on the key point detection model proposed in this invention, a comparative experiment was conducted with other positioning methods. In the Faster RCNN experiment, the positioning errors resulting from missed detections and multiple detections were considered the maximum error, representing the actual distance to the pipeline. The experimental results are shown in Table 8. The pipeline positioning method using the key point detection model proposed in this invention achieved the lowest mean absolute and relative errors in both the horizontal and depth directions, demonstrating the effectiveness and high usability of this positioning method.
[0175] Table 8 Pipeline positioning comparison experiment
[0176]
[0177] In addition, in order to intuitively compare the performance of each model in the underground pipeline positioning task, Figure 21 Table 9 shows the pipeline location information generated by various models based on B-scan data from underground pipelines in the dataset. This information primarily includes the predicted position values and absolute errors for each pipeline location. The proposed model achieves the lowest absolute errors in both the horizontal and vertical directions, further validating the advantages of this positioning method.
[0178] Table 9 Comparison example of pipeline positioning results
[0179]
[0180]
[0181] Experiments show that the introduction of the EFIM module, LSKA module, and Wise-IoU loss function also performs better in key point detection tasks by enhancing the feature extraction of radar echo signals in key areas at multiple scales. In addition, the YOLOv8-pose-ELWSD model provided by the present invention reduces the number of parameters and the amount of calculation by 15.9% and 19.3% respectively, while improving the accuracy of target detection and key point detection. The AP@0.5 and AP@0.5:0.95 of the key point detection model reach 93.4% and 60.5% respectively, indicating that the model can accurately locate the target echo hyperbola while achieving lightweight. In the pipeline positioning experiment, the positioning method based on this model has lower average absolute error and relative error values than other positioning methods. This positioning method provides a more refined solution for the automated processing of GPR images and pipeline positioning research.
[0182] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
Claims
1. A method for intelligent detection and positioning of underground pipelines in residential areas, characterized in that: include: Construct underground pipeline echo image dataset; The YOLOv8n model is improved and trained based on the underground pipeline echo image dataset to obtain an underground pipeline detection and positioning model; Among them, the method of improving the YOLOv8n model is as follows: introducing the edge feature combination module EFIM into the C2f module of the backbone network, introducing the large kernel separation attention module LSKA into the SPPF module, using the SCKD detection head as the head module, and using the Wise-IoU loss function as the bounding box loss function; A radar echo image of the residential area to be measured is obtained by a ground-penetrating radar, and the radar echo image of the residential area to be measured is input into the underground pipeline detection and positioning model. The underground pipeline detection and positioning model identifies the underground pipelines in the residential area to be measured and outputs the buried depth and horizontal position of the underground pipelines.
2. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 1 is characterized in that: Also includes: Improve the SCKD detection head and use the improved SCKD detection head as the head module of the improved YOLOv8n model; Among them, the method for improving the SCKD detection head is: replacing the two 3×3 shared convolutions of the shared branch and the two 3×3 convolution modules of the key point detection branch in the SCKD detection head with DBB modules respectively.
3. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 2 is characterized in that: The method of introducing the edge feature combination module EFIM into the C2f module is: using the edge feature combination module EFIM to replace the Bottleneck module in the C2f structure.
4. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 3 is characterized in that: The large kernel separation attention module LSKA is introduced into the SPPF module as follows: the large kernel separation attention module LSKA is introduced after the multi-scale feature map splicing operation is completed in the SPPF module.
5. The intelligent detection and positioning method for underground pipelines in residential areas according to any one of claims 1 to 4, characterized in that: The method for constructing the underground pipeline echo image dataset is: The echo images of underground pipelines measured by ground penetrating radar are used as the first data set; GprMax simulation software is used to generate an underground pipe network echo image, and random noise is added to the simulated underground pipe network echo image to obtain a second data set; The first data set and the second data set are combined to obtain the underground pipeline echo image data set.
6. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 5 is characterized in that: The Peplinski simulated soil model is used as the medium model in the GprMax simulation software.
7. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 6 is characterized in that: Also includes: The direct wave suppression, wavelet denoising and AGC gain methods are respectively used to preprocess the underground pipeline echo image dataset, and the preprocessed underground pipeline echo image dataset is used to train the improved YOLOv8n model.
8. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 7 is characterized in that: The preprocessed underground pipeline echo image dataset is randomly divided into a training set, a validation set, and a test set in a ratio of 7:1:
2.
9. The intelligent detection and positioning method for underground pipelines in residential areas according to claim 8 is characterized in that: Also includes: The samples in the training set are enhanced using the Mosaic data enhancement algorithm, affine transformation and HSV color adjustment, and the enhanced samples are used as training samples.