Transformer substation underground pipeline real-time detection and identification method based on GPR and CDG-YOLOv13n
By constructing a CDG-YOLOv13n ground-penetrating radar image target detection model, and combining the CBAM attention mechanism, DySample upsampling module, and GIoU loss function, the problems of low efficiency and misjudgment in traditional detection methods are solved, and efficient and stable identification of underground pipelines in substations is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES UNIV
- Filing Date
- 2025-12-02
- Publication Date
- 2026-04-24
AI Technical Summary
Traditional underground pipeline detection methods are inefficient, costly, and have limited generalization performance in complex environments. Existing deep learning methods have the risk of missed detections and false positives in GPR image detection, making it difficult to meet the needs of substation construction and operation and maintenance.
A method based on GPR and CDG-YOLOv13n is adopted. By constructing a target detection model of CDG-YOLOv13n ground penetrating radar image, and combining the CBAM attention mechanism, DySample upsampling module and GIoU loss function, real-time detection and identification of underground pipelines are achieved.
It significantly improves detection efficiency, reduces human intervention and post-processing time costs, and maintains high identification accuracy and stability under complex soil media environments and various types of pipeline targets.
Smart Images

Figure CN121921485A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ground-penetrating radar image processing technology, specifically to a method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n. Background Technology
[0002] With the continuous development of power systems, the renovation and maintenance of aging substations are becoming increasingly prominent issues. Due to long-term operation, some substations have missing or incomplete records of underground pipeline distribution data, which may not only cause construction risks but also delay the construction period and increase operation and maintenance costs. Traditional pipeline detection methods mainly rely on manual excavation or electromagnetic induction, which, while able to obtain some underground information, generally suffer from drawbacks such as high destructiveness, low efficiency, and high cost. In contrast, Ground Penetrating Radar (GPR), as a non-destructive testing technology, can achieve rapid detection and target location of underground structures, and is suitable for identifying pipelines such as cables, drainage pipes, and metal pipes, providing reliable data support for substation renovation while saving manpower and resources. However, GPR generates a large number of images in practical applications, and relying on manual interpretation is not only inefficient but also carries the risk of missed detections and misjudgments for weakly reflective or small targets. Therefore, there is an urgent need to develop efficient automatic identification methods to improve the accuracy and intelligence level of GPR image interpretation, thereby providing stronger technical support for power system construction and operation and maintenance.
[0003] In underground pipeline identification research, traditional methods are mostly based on manual feature extraction and image processing techniques, such as Hough transform, support vector machine (SVM), cluster analysis, and backpropagation neural network. These methods rely on manually set features, have high requirements for training samples, and have limited generalization performance in complex environments, making them difficult to meet practical engineering needs. In recent years, deep learning technology, with its end-to-end feature learning advantages, can automatically extract high-level semantic information and has shown good performance in grayscale image analysis, providing a new solution for GPR image detection. Currently, the mainstream deep learning methods applied to GPR images mainly include Faster R-CNN, SSD (Single Shot MultiBox Detector), and YOLO (You Only LookOnce). Among them, Faster R-CNN, as a two-stage detection algorithm, separates candidate box generation and target classification, achieving high detection accuracy but insufficient efficiency. In contrast, YOLO and SSD are single-stage methods that can perform bounding box regression and object classification simultaneously in the same network, giving them a significant real-time advantage. Furthermore, YOLO is superior to SSD in detection accuracy, thus finding wider application in GPR image object detection.
[0004] Existing research has largely focused on directly applying YOLO series models to GPR image detection. For example, Yang Bisheng et al., in their paper "Real-time Detection Method for Underground Targets by Vehicle-Mounted Ground Penetrating Radar," used YOLOv3 to identify road structure targets in B-Scan images, verifying the potential of single-stage detection methods in improving detection speed and accuracy, but overall performance remains insufficient. Wang Huiqin et al., in their paper "Improved YOLOv5 for Identification of Common Underground Pipelines by Ground Penetrating Radar," proposed an underground pipeline detection method suitable for GPR images by introducing the ConvNeXt module into the YOLOv5 backbone network. This method improves the accuracy of small target identification and visualizes the spatial distribution of pipelines through 3D reconstruction; however, when the background medium changes, this method requires retraining with simulation data to maintain performance. In their paper "A Ground Penetrating Radar Pipeline Target Detection Method Based on Improved YOLOv8", Li Xi et al. proposed an improved model based on YOLOv8, which integrates the PConv operator, the Triplet Attention mechanism and the Wise-IoU loss function to improve detection accuracy and model lightweightness. However, due to the reliance on a limited dataset for training, its robustness in complex underground environments and multi-class target detection is still insufficient. Summary of the Invention
[0005] This invention provides a real-time detection and identification method for underground pipelines in substations based on GPR and CDG-YOLOv13n. Compared with traditional methods that rely on offline processing after data acquisition, this method significantly improves detection efficiency and reduces the time cost required for human intervention and post-processing. It maintains high identification accuracy and stability even in complex soil environments and with multiple types of pipeline targets.
[0006] The technical solution adopted in this invention is as follows:
[0007] A real-time detection and identification method for underground pipelines in substations based on GPR and CDG-YOLOv13n includes the following steps:
[0008] Step 1: Collect raw ground-penetrating radar image data of underground pipelines in the substation based on ground-penetrating radar, and preprocess the ground-penetrating radar image data;
[0009] Step 2: Enhance and manually annotate the preprocessed ground-penetrating radar image data from Step 1 to create a ground-penetrating radar image dataset;
[0010] Step 3: Construct a target detection model for CDG-YOLOv13n ground-penetrating radar images;
[0011] Step 4: Train the CDG-YOLOv13n ground-penetrating radar image target detection model using the ground-penetrating radar image dataset created in Step 2;
[0012] Step 5: Based on the trained CDG-YOLOv13n ground-penetrating radar image target detection model, realize the real-time detection and identification of underground pipeline targets.
[0013] In step 1, the ground-penetrating radar (GPR) image data acquisition utilized the WGPR-MFC dual-frequency wireless GPR system manufactured by Wuhan Chiyu Technology Co., Ltd., equipped with both 200MHz and 900MHz ground-coupled antennas to meet both shallow and deep detection needs. Combined with the accompanying data acquisition software Multi-Gprview, detection was conducted in areas with clearly defined underground pipeline distribution and types to improve the accuracy and representativeness of the acquired data. The target underground pipelines in the selected area were all common types found in substations, ultimately resulting in the acquisition of 388 GPR images of real-world scenarios.
[0014] Subsequently, the acquired raw ground-penetrating radar image data was systematically preprocessed using data processing software. The main steps included zero-point correction, background removal, smoothing filtering, zero-drift correction, and Laplace filtering, as detailed below:
[0015] In the ground-penetrating radar (GPR) image preprocessing workflow, zero-point correction adjusts the starting point of the time axis to eliminate system transmission delay, ensuring accurate positioning of depth information of underground reflective interfaces. Background removal effectively suppresses strong background interference caused by direct waves from the surface and system ring interference by subtracting the average value or fitted trend term of the signal, thereby highlighting deep, weak target signals. Smoothing filtering can suppress random noise and abnormal spikes in the spatial or frequency domains, improving the image signal-to-noise ratio, but may sacrifice some detail resolution. Zero-drift correction aims to eliminate signal baseline drift caused by electronic component temperature drift or DC offset, ensuring that the signal waveform oscillates accurately around the zero baseline. Laplace filtering, as a spatial sharpening method, enhances the high-frequency components of the signal to highlight the edge and curvature features of targets, making the shapes of targets such as pipeline hyperbolic curves clearer and sharper. These techniques suppress background noise, correct signal distortion, and enhance target features, thereby significantly improving the accuracy of underground pipeline information extraction and image quality.
[0016] In step 2, a total of 388 ground-penetrating radar images of real-world scenarios were acquired through step 1. Considering that deep learning models are highly dependent on the scale and diversity of data during training, in order to avoid overfitting due to limited data and to improve the generalization performance of the model in complex environments, this invention performs systematic enhancement processing on the preprocessed ground-penetrating radar images, specifically including four methods: horizontal flipping, Gaussian blurring, noise perturbation, and contrast enhancement. At the same time, samples that do not meet the quality requirements are removed to ensure the effectiveness and reliability of the dataset.
[0017] Horizontal flipping is a basic data augmentation technique that generates new samples by mirroring an image along its vertical axis. This effectively expands the dataset size and introduces directional diversity, thereby improving the model's robustness in recognizing features with different orientations. Gaussian blur uses a normal distribution kernel to smooth the image, simulating the diffusion of electromagnetic waves in a medium, which helps improve the model's stability in recognizing distorted signals. Noise perturbation injects random noise into the image, mimicking equipment interference in actual detection, prompting the model to learn anti-interference feature extraction capabilities. Contrast enhancement stretches the pixel intensity distribution of the image, strengthening the contrast between bright and dark areas, making the target outline and background layers more distinct, thereby improving the model's accuracy in recognizing feature boundaries.
[0018] After the above preprocessing, a ground-penetrating radar image enhancement dataset containing 1,673 qualified samples was finally constructed, which significantly improved the diversity and representativeness of the data.
[0019] After completing the ground-penetrating radar (GPR) image data augmentation, the GPR images were further manually annotated using LabelImg software, resulting in 2794 instances representing four target categories. These categories included: metallic pipes, cement pipes, cables, and non-metallic pipes. The annotation results were generated into corresponding .txt files in YOLO format to ensure compatibility with subsequent model training.
[0020] Finally, based on the conventional division principles of deep learning tasks, the ground-penetrating radar image dataset was divided into a training set, a validation set, and a test set, with proportions of 80%, 10%, and 10%, respectively. The training set consisted of 1339 images, the validation set of 167 images, and the test set of 167 images.
[0021] In step 3, the constructed CDG-YOLOv13n ground-penetrating radar image target detection model specifically includes:
[0022] Add the CBAM attention mechanism to the backbone of the YOLOv13n network model;
[0023] Replace the UpSample module of the neck network in the YOLOv13n network model with the DySample module; replace the CIoU loss function in the YOLOv13n network model with the GIoU bounding box loss function;
[0024] The CDG-YOLOv13n network was obtained.
[0025] The aforementioned CDG-YOLOv13n network consists of three parts: Backbone, Neck, and Head.
[0026] 3.1: Building the Backbone Part of the CDG-YOLOv13n Network:
[0027] A Convolutional Block Attention Module (CBAM) is introduced into the backbone of the YOLOv13n network model. Through joint modeling of the channel and spatial domains, adaptive filtering and weighting of multi-scale features are achieved. This design can effectively highlight salient features related to the pipeline and suppress redundant background interference while maintaining a lightweight structure, providing a cleaner and more discriminative input representation for subsequent multi-scale feature fusion.
[0028] The Convolutional Block Attention Module (CBAM) consists of a Channel Attention Module (CAM) and a Spatial Attention Module (SAM), which operate on the channel and spatial dimensions of features, respectively. The Channel Attention CAM extracts global channel information through max pooling and average pooling, and uses a multilayer perceptron with shared parameters to generate channel weight distributions, thereby enhancing feature channels that are more discriminative for detection tasks. The Spatial Attention CAM, based on channel aggregation, generates a spatial weight map through convolution and activation operations, further focusing on potential target regions in the image.
[0029] Channel attention CAM maintains consistency across channel dimensions while reducing spatial dimensions. Its calculation formula is as follows:
[0030]
[0031] In equation (1), M c (F) represents the generated channel attention; Maxpool(F) represents the input features through the Maxpool layer; Avgpool(F) represents the input features through the Avgpool layer; MLP represents a multilayer perceptron; This represents the characteristics of the max pooling layer along the channel axis; σ represents the features of the average pooling layer along the channel axis; W1 and W0 represent the weight matrices of the MLP, respectively; σ represents the Sigmoid activation function.
[0032] Spatial Attention (SAM) maintains the integrity of the spatial dimension while compressing the channel dimension. Its calculation formula is as follows:
[0033]
[0034] In equation (2), M s (F) represents the generated spatial attention; f 7*7 This represents a 7×7 convolution operation; Represents the max-pooling feature map; This represents the average pooling feature map.
[0035] The improvement of the Convolutional Block Attention (CBAM) module focuses on optimizing the representation quality of the feature extraction stage. By refining the selection of input features, it makes the feature maps output by the Backbone part more robust and discriminative, thereby improving the model's effective representation ability in low-contrast ground-penetrating radar images from the source.
[0036] 3.2: Building the Neck section of the CDG-YOLOv13n network:
[0037] This invention replaces the original UpSample module in YOLOv13n with the DySample module. This module dynamically adjusts the sampling point positions using learnable offsets, enabling the upsampling process to adaptively fit the input feature distribution. During this process, the model can more effectively recover fine-grained details in low-resolution images, thereby enhancing its ability to perceive small-scale targets. Unlike CBAM, which emphasizes feature weight allocation, the DySample module focuses more on preserving spatial information and detailed structure during the feature fusion stage, achieving accurate reconstruction of small targets and reducing missed and false detections in underground pipeline detection.
[0038] The DySample module takes a feature of size C×H1×W1 as input. Figure X Where C represents the number of channels in the feature map, H1 represents the height of the feature map, and W1 represents the width of the feature map. The sampling point generator first outputs a dynamically adjusted set of sampling points S. The sampling positions are adaptively optimized according to the distribution of the input features to enhance the recovery capability of fine-grained features; the specific principle is as follows:
[0039] The DySample module dynamically analyzes the distribution of the input feature map through a light quantum network, learning an offset vector with height and width adjustments for each standard sampling position, thereby generating a set of dynamically adjusted irregular sampling points. This adaptive optimization mechanism enables the sampling positions to intelligently "move" according to the image content, especially focusing on key regions with strong feature responses. The final upsampling process interpolates based on these optimized positions, which can more accurately align feature boundaries and restore fine-grained details, significantly improving the model's feature reconstruction capability for small-scale targets.
[0040] Subsequently, by calling the grid_sample function and combining the spatial coordinates of the sampling points, the features are processed. Figure X Resampling is performed to generate a high-resolution feature map X' with the same size as the sampling set. C is the number of channels in the feature map; H and W are the height and width of the feature map, respectively; g is the number of groups. The specific expression is:
[0041] X' = grid_sample(X,S)(3);
[0042] In equation (3): X' represents the input features processed by the grid_sample function based on the dynamic sampling point set S. Figure X The high-resolution output feature map generated after resampling.
[0043] In the generation process of the point sampling set S based on the dynamic range factor, σ is the standard deviation, and the C channel is mapped to 2gs by a linear layer. 2 The offset O is obtained in 3D space and transformed into a high-resolution reference sampling grid of size 2g×sH1×sW1 through pixel space transformation. Then, it is superimposed with the original grid to form a point sampling set S. This process realizes dynamic controllability of the upsampling position and adaptively formulates the upsampling strategy from the point sampling perspective. The specific expression is as follows:
[0044] O = Linear(X)(4);
[0045] S=O+G'(5);
[0046] In the above formula: Linear(i) represents a fully connected layer; G' represents a high-resolution original reference sampling grid.
[0047] In summary, the DySample module offers high flexibility, allowing for the formulation of upsampling strategies from a point sampling perspective, and enabling dynamic generation of sampling points based on specific task requirements. Compared to traditional dynamic upsampling methods, this approach improves model stability while achieving systematic optimization of parameter quantity and computational efficiency, thus meeting the real-time detection requirements of application scenarios.
[0048] 3.3: The loss function part of building the CDG-YOLOv13n network:
[0049] This invention replaces the original CIoU loss function of the YOLOv13n network model with the GIoU (Generalized IoU) loss function to enhance the model's bounding box regression ability under complex environments and small target conditions.
[0050] GIoU introduces a minimum bounding rectangle on top of IoU. By simultaneously considering the overlap between the predicted and ground truth boxes and their coverage within the minimum bounding rectangle, it can still provide an effective optimization signal when the predicted box does not overlap with the ground truth box. The specific form is as follows:
[0051]
[0052] Wherein, IOU can be represented as:
[0053]
[0054] In the above formula, A is the predicted bounding box, and B is the ground truth bounding box; S A∩B S is the area of the intersection of A and B; A∪B S is the area of the union of A and B; (A∪B)' It is the area of the smallest enclosing region containing A and B; GIoU introduces the constraint of the smallest enclosing region area on the basis of IoU, which not only measures the degree of overlap between the predicted box and the ground truth box, but also comprehensively reflects the differences in shape and scale of the bounding boxes. When the two are completely identical, GIoU takes the value of 1; if the two do not overlap, it is 0; and when the shape or size difference is large, its value may be less than 0.
[0055] In underground pipeline detection, the geometric constraints of GIoU can limit the offset direction of the predicted bounding box caused by noise or interference, prevent divergence during training, and effectively reduce the impact of noise on loss calculation. In scenarios where small targets are easily confused with the background, GIoU can also suppress the expansion of the predicted bounding box into the background, thereby improving the distinction between the target and the background.
[0056] In step 4, the CDG-YOLOv13n ground-penetrating radar image target detection model is trained using the ground-penetrating radar image dataset created in step 2, including the following steps:
[0057] Step 4.1: The proposed CDG-YOLOv13n model is trained using the constructed dataset. To further explore the specific performance of the CDG-YOLOv13n model, a series of ablation experiments were conducted on a ground-penetrating radar image pipeline dataset. These experiments compared the traditional model with models using different improved methods such as CBAM attention mechanism, DySample upsampling module, and GIoU loss function, and further compared the effects of combining the three improved methods sequentially. Step 4.2: To verify the effectiveness and accuracy of the proposed algorithm, YOLOv5n, YOLOv8n, YOLOv11n, and YOLOv13n methods were selected as comparison objects. The same training parameters were set, and comparative experiments were conducted with the improved CDG-YOLOv13n model on the dataset created in this invention.
[0058] In step 5, real-time detection and identification of underground pipeline targets are achieved based on the trained CDG-YOLOv13n model. This includes the following steps:
[0059] To verify the feasibility of the improved model CDG-YOLOv13n in practical engineering and to achieve real-time detection and identification of underground pipelines in aging substations, this invention conducted a field experiment in an aging substation area in Wuhan. Based on actual engineering needs, the trained CDG-YOLOv13n model was deployed in the ground-penetrating radar detection process.
[0060] The equipment used in the experiment was the WGPR wireless ground-penetrating radar system manufactured by Wuhan Chiyu Technology Co., Ltd., equipped with a hand-push auxiliary support to ensure stability during the data acquisition process. The experiment employed a distance measurement mode, with the pushing speed controlled at approximately 1 m / s to ensure the uniformity and reliability of radar data acquisition. During the experiment, the research team further developed the system, writing a dedicated program to automatically call and run the Multi-Gprview ground-penetrating radar data acquisition software. This program, combined with the improved and trained model of this invention, enables the system to simultaneously call upon the model for processing and identification in real time while acquiring GPR B-scan data.
[0061] This process allows for real-time display of underground pipeline identification results on-site without additional manual preprocessing of the collected radar data. Compared to traditional methods that rely on offline processing after data acquisition, this approach significantly improves detection efficiency and reduces the time costs associated with human intervention and post-processing.
[0062] This invention provides a real-time detection and identification method for underground pipelines in substations based on GPR and CDG-YOLOv13n, with the following technical advantages:
[0063] 1) Advantages of step 1 of the present invention: Based on the non-destructive testing technology of ground penetrating radar, the original radar data of underground pipelines can be obtained, which can detect underground pipelines without damaging the structure, detect the distribution of underground pipelines and provide high-resolution images.
[0064] 2) Advantages of step 2 of this invention: Data augmentation is performed on the obtained target image data based on image enhancement technology. Data augmentation technology can make full use of limited data, helps prevent overfitting, and thus significantly improves the diversity and representativeness of the data.
[0065] 3) Advantages of step 3 of this invention: Constructing a CDG-YOLOv13n ground-penetrating radar image target detection model. CDG-YOLOv13n involves adding a CBAM attention mechanism to the backbone network of the YOLOv13n network model; replacing the UpSample module in the neck network of the YOLOv13n network model with a DySample module; and replacing the CIoU loss function of the YOLOv13 network model with a GIoU bounding box loss function. CBAM optimizes the representation quality of the feature extraction stage. Through refined selection of input features, it makes the feature map output by the backbone more robust and discriminative, improving the model's effective representation ability in low-contrast ground-penetrating radar images from the source. DySample, without increasing the number of additional parameters and computational cost, can improve the expressive power of feature mapping, equivalent to introducing a more flexible spatial pyramid pooling method in the upsampling stage. The additional penalty term of GIoU can continuously provide gradient information, guide the model to gradually correct the localization error, improve convergence stability and accuracy, and enhance the model's bounding box regression ability under complex environments and small target conditions.
[0066] 4) Advantages of step 4 of this invention: The CDG-YOLOv13n model is trained using the dataset created in step 2. The B-Scan image to be detected is input into the trained target detection network to realize the detection of underground pipeline target signals. Compared with other methods, this model performs better and shows high application potential and development prospects.
[0067] 5) Advantages of step 5 of this invention: Real-time detection and identification of underground pipeline targets are achieved based on the trained CDG-YOLOv13n model. Through this process, the collected radar data does not require additional manual preprocessing, and the underground pipeline identification results can be displayed in real time on site. Compared with the traditional method that relies on offline processing after data collection, this method significantly improves detection efficiency and reduces the time cost required for human intervention and post-processing. Attached Figure Description
[0068] The present invention will be further described below with reference to the accompanying drawings and examples;
[0069] Figure 1 This is a flowchart of a real-time detection and identification method for underground pipelines in substations based on GPR and CDG-YOLOv13n.
[0070] Figure 2 Comparison images before and after preprocessing;
[0071] in: Figure 2 (a) The original data image; Figure 2 Figure (b) shows the data image after zero-point correction. Figure 2Figure (c) shows the data image after background removal processing; Figure 2 Figure (d) shows the data image after smoothing filtering; Figure 2 Figure (e) shows the data image after zero-drift correction. Figure 2 Figure (f) shows the data image after Laplace filtering.
[0072] Figure 3 A diagram illustrating data augmentation:
[0073] in: Figure 3 Figure (a) is the measured image; Figure 3 Figure (b) is the image obtained after horizontal flipping; Figure 3 Figure (c) is the image obtained after Gaussian blurring; Figure 3 Figure (d) is the image obtained after noise perturbation processing; Figure 3 Figure (e) is the image obtained after contrast enhancement processing.
[0074] Figure 4 Here is a partial illustration with annotations:
[0075] in: Figure 4 Figure (a) shows labeled images of metal pipes, non-metal pipes, and cables from left to right; Figure 3 Figure (b) is an annotated image of a cement pipe; Figure (c) is an annotated image of a metal pipe.
[0076] Figure 5 This is a diagram of the CDG-YOLOv13n network structure.
[0077] Figure 6 This is the schematic diagram of the CBAM module.
[0078] Figure 7 This is a structural diagram of the DySample module.
[0079] Figure 8 This is a diagram of the point sampling set structure based on the dynamic range factor.
[0080] Figure 9 The diagram shows the structure of the GIoU loss function.
[0081] Figure 10 The detection results of different algorithm models are shown in the image.
[0082] Among them: the top row is the original image;
[0083] The second row shows the detection results using the YOLOv5n model;
[0084] The third row shows the detection results using the YOLOv8n model;
[0085] The fourth row shows the detection results using the YOLOv11n model;
[0086] The fifth row shows the detection results using the YOLOv13n model;
[0087] The last line shows the detection results using the CDG-YOLOv13n model.
[0088] Figure 11 Images are used for real-time detection and processing in actual engineering projects. Detailed Implementation
[0089] A real-time detection and identification method for underground pipelines in substations based on GPR and CDG-YOLOv13n includes the following steps:
[0090] S1: Obtain raw radar data of underground pipelines based on ground-penetrating radar non-destructive testing technology;
[0091] S2: Data augmentation is performed on the obtained target image data based on image enhancement technology;
[0092] S3: Construct a target detection model for CDG-YOLOv13n ground-penetrating radar images;
[0093] S4: Train the CDG-YOLOv13n model using the dataset created in S2;
[0094] S5: Real-time detection and identification of underground pipeline targets based on the trained CDG-YOLOv13n model.
[0095] In step S1, raw radar data of underground pipelines is acquired based on ground-penetrating radar non-destructive testing technology. This includes the following:
[0096] This data acquisition utilized the WGPR-MFC dual-frequency wireless ground-penetrating radar system manufactured by Wuhan Chiyu Technology Co., Ltd., equipped with both 200MHz and 900MHz ground-coupled antennas to meet both shallow and deep detection needs. Combined with the accompanying data acquisition software Multi-Gprview, detection was conducted in areas with clear underground pipeline distribution and relatively well-defined categories to improve the accuracy and representativeness of the acquired data. The target pipelines in the selected area were all common types found in substations, ultimately yielding 388 radar images of real-world scenarios. Subsequently, the acquired raw radar data underwent systematic preprocessing using data processing software. Key steps included zero-point correction, background removal, smoothing filtering, zero-drift correction, and Laplace filtering to suppress background noise, correct signal distortion, and enhance target features, thereby significantly improving the accuracy of underground pipeline information extraction and image quality. Comparisons before and after each processing step are provided. Figure 2 As shown.
[0097] In step S2, the obtained target image data is augmented using image enhancement technology. This includes the following steps:
[0098] S2.1: A total of 388 radar images from real-world scenarios were acquired through S1. Considering the high dependence of deep learning models on data scale and diversity during training, and to avoid overfitting due to limited data volume and improve the model's generalization performance in complex environments, this invention systematically enhanced the original images. Specific measures included horizontal flipping, Gaussian blurring, noise perturbation, contrast enhancement, and other methods. Simultaneously, samples that did not meet quality requirements were removed to ensure the validity and reliability of the dataset. The data enhancement process is as follows: Figure 3 As shown in the figure. After the above processing, an augmented dataset containing 1673 qualified samples was finally constructed, thus significantly improving the diversity and representativeness of the data.
[0099] S2.2: After data augmentation, the ground-penetrating radar images were further manually annotated using LabelImg software, resulting in 2794 instances across four target categories. These categories included metallic pipes, cement pipes, cables, and non-metallic pipes. The annotation results were generated as corresponding .txt files in YOLO format to ensure compatibility with subsequent model training. Some annotation examples are shown below. Figure 4 As shown. Finally, based on the conventional principles of deep learning task partitioning, the dataset was divided into training set, validation set, and test set, with proportions of 80%, 10%, and 10%, respectively, including 1339 images in the training set, 167 images in the validation set, and 167 images in the test set.
[0100] In step S3, a CDG-YOLOv13n ground-penetrating radar image target detection model is constructed. CDG-YOLOv13n involves adding a CBAM attention mechanism to the backbone network of the YOLOv13n network model; replacing the UpSample module in the neck network of the YOLOv13n network model with a DySample module; and replacing the CIoU loss function of the YOLOv13 network model with the GIoU bounding box loss function. This includes the following:
[0101] The improved CDG-YOLOv13n network described above consists of three parts: Backbone, Neck, and Head. The CDG-YOLOv13n network structure diagram is shown below. Figure 5 As shown.
[0102] 3.1: Constructing the Backbone of the CDG-YOLOv13n Network. This invention introduces a Convolutional Block Attention Module (CBAM) into the YOLOv13n backbone network. Through joint modeling of the channel and spatial domains, it achieves adaptive filtering and weighting of multi-scale features. This design can effectively highlight pipeline-related salient features and suppress redundant background interference while maintaining a lightweight structure, providing a cleaner and more discriminative input representation for subsequent multi-scale feature fusion.
[0103] CBAM consists of a Channel Attention Module (CAM) and a Spatial Attention Module (SAM), which operate on the channel and spatial dimensions of features, respectively. CAM extracts global channel information through max pooling and average pooling, and uses a multilayer perceptron with shared parameters to generate channel weight distributions, thereby strengthening feature channels that are more discriminative for detection tasks. SAM, based on channel aggregation, generates a spatial weight map through convolution and activation operations, further focusing on potential target regions in the image. The synergistic effect of these two modules allows the network to consider both global information and local details during feature extraction, achieving efficient modeling of key information. The principle diagram of the CBAM module is shown below. Figure 6 As shown.
[0104] CAM maintains consistency in the channel dimension while reducing the spatial dimension. Its calculation formula is as follows:
[0105]
[0106] In the formula, M c (F) represents the generated channel attention, Maxpool(F) represents the input features through the Maxpool layer, Avgpool(F) represents the input features through the Avgpool layer, and MLP represents a multilayer perceptron. This represents the characteristics of the max pooling layer along the channel axis. This represents the features of the average pooling layer along the channel axis, where W1 and W0 represent the weight matrices of the MLP, and σ represents the Sigmoid activation function.
[0107] SAM maintains the integrity of the spatial dimension while compressing the channel dimension. Its calculation formula is as follows:
[0108]
[0109] In the formula, M s (F) represents the generated spatial attention, f 7*7This represents a 7×7 convolution operation. Represents the max-pooling feature map. This represents the average pooling feature map.
[0110] The improvement of CBAM focuses on optimizing the representation quality of the feature extraction stage. By refining the selection of input features, it makes the feature maps output by Backbone more robust and discriminative, thereby improving the model's effective representation ability in low-contrast ground-penetrating radar images from the source.
[0111] 3.2: Constructing the Neck section of the CDG-YOLOv13n network. This invention replaces the original UpSample module of YOLOv13n with the DySample module. This module dynamically adjusts the sampling point position through learnable offsets, enabling the upsampling process to adaptively fit the input feature distribution. During this process, the model can more effectively recover fine-grained detail features in low-resolution images, thereby enhancing the perception of small-scale targets. Unlike CBAM, which emphasizes feature weight allocation, DySample focuses more on maintaining spatial information and detailed structure during the feature fusion stage, achieving accurate reconstruction of small targets and reducing missed and false detections in underground pipeline detection.
[0112] The structure of the DySample module is as follows: Figure 7 As shown, the input is a feature of size C×H1×W1. Figure X The sampling point generator first outputs a dynamically adjusted set of sampling points S. The sampling positions are adaptively optimized based on the distribution of the input features to enhance the recovery capability of fine-grained features. Then, by calling the `grid_sample` function and combining the spatial coordinates of the sampling points, the features are processed... Figure X Resampling is performed to generate a high-resolution feature map X' with the same size as the sample set. Figure 7 In this context, C represents the number of channels in the feature map; H and W represent the height and width of the feature map, respectively; and g represents the number of groups. The specific expression is:
[0113] X' = grid_sample(X,S) (3);
[0114] The process of generating point sampling sets based on dynamic range factors is as follows: Figure 8 As shown, where σ is the standard deviation. The C channel is mapped to 2gs by a linear layer. 2 An offset O is obtained in 3D space and transformed into a high-resolution reference sampling grid of size 2g×sH1×sW1 through pixel space transformation. This grid is then superimposed on the original grid to form a point sampling set S. This process achieves dynamic controllability of the upsampling position and adaptively formulates the upsampling strategy from the point sampling perspective. The specific expression is as follows:
[0115] O = Linear(X) (4);
[0116] S=O+G' (5);
[0117] In summary, DySample offers high flexibility, employing a point-sampling perspective to formulate upsampling strategies and dynamically generating sampling points based on task-specific requirements. Compared to traditional dynamic upsampling methods, this approach improves model stability while achieving systematic optimization of parameter count and computational efficiency, thus meeting the real-time detection requirements of application scenarios.
[0118] 3.3: The loss function part of the CDG-YOLOv13n network is constructed. This invention replaces the original CIoU loss function of YOLOv13n with the GIoU (Generalized IoU) loss function to enhance the model's bounding box regression ability under complex environments and small target conditions.
[0119] GIoU introduces a minimum bounding rectangle on top of IoU. By simultaneously considering the overlap between the predicted and ground truth boxes and their coverage within the minimum bounding rectangle, it can still provide an effective optimization signal when the predicted box does not overlap with the ground truth box. The specific form is as follows:
[0120]
[0121] Wherein, IOU can be represented as:
[0122]
[0123] The structure of the GIoU loss function is as follows: Figure 9 As shown in the figure. Where A is the predicted bounding box, B is the ground truth bounding box; S A∩B S is the area of the intersection of A and B. A∪B S is the area of the union of A and B. (A∪B)' It is the area of the smallest enclosing region containing A and B. GIoU introduces the constraint of the smallest enclosing region area on the basis of IoU, which not only measures the degree of overlap between the predicted box and the ground truth box, but also comprehensively reflects the differences in shape and scale of the bounding boxes. When the two are completely identical, GIoU is 1; if the two do not overlap, it is 0; and when the shape or size difference is large, its value may be less than 0.
[0124] In underground pipeline detection, the geometric constraints of GIoU can limit the offset direction of the predicted bounding box caused by noise or interference, prevent divergence during training, and effectively reduce the impact of noise on loss calculation. In scenarios where small targets are easily confused with the background, GIoU can also suppress the expansion of the predicted bounding box into the background, thereby improving the distinction between the target and the background.
[0125] In step S4, the CDG-YOLOv13n model is trained using the dataset created in step S2, including the following steps:
[0126] S4.1: The proposed CDG-YOLOv13n model was trained using the constructed dataset. To further explore the specific performance of the CDG-YOLOv13n model, a series of ablation experiments were conducted on a ground-penetrating radar image pipeline dataset. These experiments compared the traditional model with models using different improved methods, such as the CBAM attention mechanism, the DySample upsampling module, and the GIoU loss function, and further compared the effects of combining the three improved methods sequentially.
[0127] Table 1 presents the comparison results of the YOLOv13n structure under different improvement conditions.
[0128] Table 1 Ablation Experiment
[0129]
[0130] By comprehensively applying the CBAM attention mechanism, the DySample upsampling module, and the GIoU loss function, the model performance reached its optimal level, with P increasing to 98.1%, R increasing to 95.5%, mAP50 increasing to 98.4%, and mAP50-95% increasing to 78.7%. This series of sequentially combined improvements significantly enhanced the model's ability to identify pipeline targets while improving detection accuracy. This ablation experiment verified the effectiveness of the various techniques in a step-by-step superposition and showed that their combined application can comprehensively improve the detection performance of ground-penetrating radar pipeline targets, achieving a balanced optimization of the model in terms of accuracy, recall, and overall stability.
[0131] S4.2: To verify the effectiveness and accuracy of the proposed algorithm, this invention selected YOLOv5n, YOLOv8n, YOLOv11n, and YOLOv13n methods as comparison objects, setting the same training parameters, and conducted comparative experiments with the improved CDG-YOLOv13n model of this invention on the dataset created in this invention. To intuitively observe the recognition and localization effects of different algorithm models, the detection results of each model are shown in Table 2. The detection effects of different algorithm models are as follows: Figure 10 As shown.
[0132] Table 2 Comparison of different models
[0133]
[0134] Table 2 shows that the CDG-YOLOv13n model has a P-value of 98.1%, an R-value of 95.5%, a mAP50 of 98.4%, and a mAP50-95% of 78.7%, all higher than other detection models. However, its FPS is significantly lower compared to other models. This indicates that while the model improves the detection accuracy of underground pipeline targets, it sacrifices computational speed. Compared to other methods, this model performs better, demonstrating high application potential and development prospects.
[0135] In step S5, real-time detection and identification of underground pipeline targets are achieved based on the trained CDG-YOLOv13n model. This includes the following steps:
[0136] To verify the feasibility of the improved model CDG-YOLOv13n in practical engineering and to achieve real-time detection and identification of underground pipelines in aging substations, this invention conducted a field experiment in an aging substation area in Wuhan. Based on actual engineering needs, the trained CDG-YOLOv13n model was deployed in the ground-penetrating radar detection process.
[0137] The equipment used in the experiment was the WGPR wireless ground-penetrating radar system manufactured by Wuhan Chiyu Technology Co., Ltd., equipped with a hand-push auxiliary support to ensure the stability of the data acquisition process. The experiment employed a distance measurement mode, with the pushing speed controlled at approximately 1 m / s to ensure the uniformity and reliability of radar data acquisition. During the experiment, the research team further developed the system, writing a dedicated program to automatically call and run the Multi-Gprview ground-penetrating radar data acquisition software. This program, combined with the improved and trained model of this invention, enables the system to simultaneously process and identify GPR B-scan data in real time, allowing for real-time detection and processing of underground pipelines, such as... Figure 11 As shown, the left side is the real-time acquisition screen of the data acquisition software Multi-Gprview, and the right side is the screen showing the real-time detection and processing of the acquired data by running the improved CDG-YOLOv13n model of this invention while calling the acquisition software.
[0138] This process allows for real-time display of underground pipeline identification results on-site without additional manual preprocessing of the collected radar data. Compared to traditional methods that rely on offline processing after data acquisition, this approach significantly improves detection efficiency and reduces the time costs associated with human intervention and post-processing. Experimental results demonstrate that the proposed model maintains high accuracy and stability even in complex soil environments and with various types of pipeline targets. Furthermore, this study further validates the feasibility of this model for real-time detection and identification of underground pipelines in aging substations, providing an important reference for the subsequent promotion of deep learning-based real-time underground pipeline detection in power engineering.
Claims
1. A method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n, characterized in that... Includes the following steps: Step 1: Collect raw ground-penetrating radar image data of underground pipelines in the substation based on ground-penetrating radar, and preprocess the ground-penetrating radar image data; Step 2: Enhance and manually annotate the preprocessed ground-penetrating radar image data from Step 1 to create a ground-penetrating radar image dataset; Step 3: Construct a target detection model for CDG-YOLOv13n ground-penetrating radar images; Step 4: Train the CDG-YOLOv13n ground-penetrating radar image target detection model using the ground-penetrating radar image dataset created in Step 2; Step 5: Based on the trained CDG-YOLOv13n ground-penetrating radar image target detection model, realize the real-time detection and identification of underground pipeline targets.
2. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 1, characterized in that: In step 1, the ground-penetrating radar image data acquisition dual-frequency wireless ground-penetrating radar system is equipped with two types of ground coupling antennas, 200MHz and 900MHz, to meet both shallow and deep detection needs. Combined with the accompanying data acquisition software Multi-Gprview, detection was carried out in areas where underground pipelines were clearly distributed and categorized, ultimately acquiring a total of 388 ground-penetrating radar images of real-world scenarios.
3. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 2, characterized in that: The raw ground-penetrating radar image data was systematically preprocessed using data processing software. The steps included: zero-point correction, background removal, smoothing filtering, zero drift correction, and Laplace filtering. Zero-point correction eliminates system launch delay by adjusting the starting point of the time axis, ensuring that the depth information of the underground reflective interface can be accurately located. Background removal suppresses strong background interference caused by direct surface waves and system ring disturbances by subtracting the average value or fitted trend term of the signal, thereby highlighting deep weak target signals. Smoothing filters suppress random noise and abnormal spikes in the spatial or frequency domains, thereby improving the image signal-to-noise ratio. Zero drift correction is used to eliminate signal baseline drift caused by temperature drift or DC offset of electronic components, ensuring that the signal waveform oscillates accurately around the zero baseline. Laplace filtering enhances the high-frequency components of the signal to highlight the edge and curvature features of the target, making the shape of targets such as pipeline hyperbolas clearer and sharper.
4. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 3, characterized in that: In step 2, a total of 388 ground-penetrating radar images of real scenes were acquired through step 1. The preprocessed ground-penetrating radar images were systematically enhanced, including four methods: horizontal flipping, Gaussian blurring, noise perturbation, and contrast enhancement. At the same time, samples that did not meet the quality requirements were removed to ensure the validity and reliability of the dataset. After preprocessing, a ground-penetrating radar image enhancement dataset containing 1,673 qualified samples was finally constructed.
5. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 4, characterized in that: After completing the ground-penetrating radar image data augmentation, the ground-penetrating radar images were further manually annotated using LabelImg software. A total of four types of targets were annotated, namely: metal pipes, cement pipes, cables, and non-metallic pipes. The annotation results were generated into corresponding .txt files in YOLO format. Finally, based on the conventional principles of deep learning task division, the ground-penetrating radar image dataset was divided into a training set, a validation set, and a test set.
6. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 5, characterized in that: In step 3, the constructed CDG-YOLOv13n ground-penetrating radar image target detection model specifically includes: Add the CBAM attention mechanism to the backbone of the YOLOv13n network model; Replace the UpSample module of the neck network in the YOLOv13n network model with the DySample module; Replace the CIoU loss function of the YOLOv13n network model with the GIoU bounding box loss function; The CDG-YOLOv13n network was obtained.
7. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 6, characterized in that: Step 3 includes setting up the backbone of the CDG-YOLOv13n network: Convolutional Block Attention (CBAM) is introduced into the backbone of the YOLOv13n network model. Through joint modeling of the channel domain and the spatial domain, adaptive filtering and weighting of multi-scale features are achieved. The Convolutional Block Attention Module (CBAM) consists of Channel Attention (CAM) and Spatial Attention (SAM), which act on the channel dimension and spatial dimension of the features, respectively. Channel attention CAM extracts global channel information through max pooling and average pooling, and uses a multilayer perceptron with shared parameters to generate channel weight distribution, thereby enhancing feature channels that are more discriminative for detection tasks. Spatial Attention (SAM) builds upon channel aggregation by generating a spatial weight map through convolution and activation operations, further focusing on potential target regions in the image.
8. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 7, characterized in that: Channel attention CAM maintains consistency across channel dimensions while reducing spatial dimensions. Its calculation formula is as follows: In equation (1), M c (F) represents the generated channel attention; Maxpool(F) represents the input features through the Maxpool layer; Avgpool(F) represents the input features through the Avgpool layer; MLP represents a multilayer perceptron; This represents the characteristics of the max pooling layer along the channel axis; This represents the features of the average pooling layer along the channel axis; W1 and W0 represent the weight matrices of the MLP, respectively; σ represents the Sigmoid activation function. Spatial Attention (SAM) maintains the integrity of the spatial dimension while compressing the channel dimension. Its calculation formula is as follows: In equation (2), M s (F) represents the generated spatial attention; f 7*7 This represents a 7×7 convolution operation; Represents the max-pooling feature map; This represents the average pooling feature map.
9. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 8, characterized in that: Step 3 includes building the Neck portion of the CDG-YOLOv13n network: The original UpSample module in YOLOv13n is replaced with the DySample module. The DySample module takes a feature map X of size C×H1×W1 as input, where C represents the number of channels in the feature map, H1 represents the height of the feature map, and W1 represents the width of the feature map. The sampling point generator first outputs a set of dynamically adjusted sampling points S. The sampling positions are adaptively optimized according to the distribution of the input features to enhance the recovery capability of fine-grained features. Subsequently, by calling the `grid_sample` function and combining the spatial coordinates of the sampling points, the feature map X is resampled to generate a high-resolution feature map X' with the same size as the sampling set; C is the number of channels in the feature map; H and W are the height and width of the feature map, respectively; g is the number of groups; the specific expression is: X' = grid_sample(X,S)(3); In equation (3): X' represents the high-resolution output feature map generated by resampling the input feature map X using the grid_sample function based on the dynamic sampling point set S; In the generation process of the point sampling set S based on the dynamic range factor, σ is the standard deviation, and the C channel is mapped to 2gs by a linear layer. 2 The offset O is obtained in 3D space and transformed into a high-resolution reference sampling grid of size 2g×sH1×sW1 through pixel space transformation. Then, it is superimposed with the original grid to form a point sampling set S. This process realizes dynamic controllability of the upsampling position and adaptively formulates the upsampling strategy from the point sampling perspective. The specific expression is as follows: O = Linear(X)(4); S=O+G'(5); In the above formula: Linear(i) represents a fully connected layer; G' represents a high-resolution original reference sampling grid.
10. The method for real-time detection and identification of underground pipelines in substations based on GPR and CDG-YOLOv13n according to claim 9, characterized in that: Step 3 includes constructing the loss function part of the CDG-YOLOv13n network: The original CIoU loss function of the YOLOv13n network model was replaced with the GIoU loss function to enhance the model's bounding box regression ability under complex environments and small target conditions; GIoU introduces a minimum bounding rectangle on top of IoU. By simultaneously considering the overlap between the predicted and ground truth boxes and their coverage within the minimum bounding rectangle, it can still provide an effective optimization signal when the predicted box does not overlap with the ground truth box. The specific form is as follows: Wherein, IOU can be represented as: In the above formula, A is the predicted bounding box, and B is the ground truth bounding box; S A∩B S is the area of the intersection of A and B; A∪B S is the area of the union of A and B; (A∪B)' It is the area of the smallest enclosing region containing A and B; GIoU introduces the constraint of the smallest enclosing region area on the basis of IoU, which not only measures the degree of overlap between the predicted box and the ground truth box, but also comprehensively reflects the differences in shape and scale of the bounding boxes; when the two are completely identical, GIoU takes the value of 1; if the two do not overlap, it is 0; and when the shape or size difference is large, its value may be less than 0.