Geological radar underground pipeline target detection method based on improved YOLOv8n
By improving the YOLOv8n network and using the ConvNext and Inner-SIoU bounding box loss functions, the problems of small and medium-sized target recognition accuracy and speed in geological radar image recognition are solved, and more efficient underground pipeline target detection is achieved.
Patent Information
- Application Number
- CN202510613492.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-09-23
AI Technical Summary
The existing geological radar image recognition technology has problems with recognition accuracy and speed when processing underground pipeline targets, especially small targets. In particular, the existing YOLOv8n has problems with the direction mismatch between the target frame and the real frame during model training, which leads to problems in model processing speed and accuracy. The existing YOLOv8n has deficiencies in processing the direction between the target frame and the real frame, which affects the stability of the model and the recognition effect.
The improved YOLOv8n network is adopted, ConvNext is used as the backbone neural network, combined with the feature fusion network Neck and the detection head Head, and the Inner-SIoU bounding box loss function and auxiliary bounding box are introduced to replace the CIoU loss function, thereby improving the positioning accuracy and recognition speed of the model.
It significantly improves the detection performance and recognition accuracy of small and medium-sized targets in geological radar images, enhances the overall detection effect, and especially performs well in the recognition of small targets in images, thereby improving the stability and recognition accuracy of the model.
Smart Images

Figure CN120689850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of geological radar image recognition, and in particular to a geological radar underground pipeline target detection method based on improved YOLOv8n. Background Art
[0002] As a nondestructive detection device based on high-frequency electromagnetic waves, geological radar, when propagating through underground media, generates hyperbolic reflection waves upon encountering interfaces with electrical differences in underground targets. This phenomenon is known as hyperbolic waves. By studying the shape, amplitude, and temporal evolution of these hyperbolic waves, it is possible to determine crucial information such as the exact location, structural characteristics, and burial depth of underground targets. This provides valuable insights into the characteristics of underground targets. However, due to system noise and the heterogeneity of the underground medium, the resulting images can be highly complex.
[0003] Traditional geological radar image recognition technologies primarily include generalized Hough transforms, support vector machines, and backpropagation neural networks. These methods are optimization approaches focused on small sample sizes and local search, making them inadequate for many practical applications. The successful application of deep learning in geological radar image recognition has provided innovative solutions to the challenges faced by traditional recognition methods. Currently, some popular deep learning recognition technologies include Faster R-CNN, YOLO, and SSD. These technologies have played a key role in improving recognition accuracy and efficiency. Faster R-CNN, in particular, utilizes a two-stage framework and cascade mechanism to handle object classification, resulting in high recognition accuracy. However, due to the multiple runs of the detection and classification process, its recognition speed is relatively slow. Compared to Faster R-CNN, YOLO and SSD only require a single input to the network to complete recognition. YOLO, in particular, is computationally efficient and achieves higher recognition accuracy than SSD.
[0004] With the continuous iteration of the YOLO series of algorithms, it has significantly improved the accuracy of recognition while maintaining fast detection, and has been successfully applied to target recognition in open-pit mines, dangerous goods detection, and forest fire monitoring. In the field of geological radar image recognition, Yang Bisheng et al. used YOLOv3 to detect road structure targets on GPR B-Scan images in "Real-time Detection Method of Underground Targets by Vehicle-mounted Ground Penetrating Radar". The initial data set was small and was expanded by 6.2 times using conventional enhancement methods such as cropping, cutting, and flipping. Excessive enhancement of the data may lead to potential overfitting of the model. Hu et al.
[0005] "A study of automatic recognition and localization of pipeline for ground penetration mapping based on deep learning" uses Faster R-CNN, YOLOv5 and SSD for recognition on a self-made dataset, and uses the center position of the upper boundary of the predicted bounding box as the buried position of the pipeline, thereby realizing the positioning function. This method is relatively accurate in positioning on standard hyperbolic images, but has a large error in positioning non-standard hyperbolic images under complex conditions.
[0006] The original YOLOv8n model uses CIoU as a localization loss function, which is widely used to evaluate the degree of overlap between the predicted box and the ground-truth box. While CIoU effectively measures the degree of match between the two, it is inadequate when handling directional mismatches between the target box and the predicted box. This can slow model convergence during training and even lead to instability. Specifically, CIoU fails to adequately penalize directional deviations between the predicted box and the ground-truth box, causing the predicted box to fluctuate in position during training rather than steadily converging towards the ground-truth box. This fluctuation can cause the model to fall into a local optimum, affecting final detection performance.
[0007] ConvNext utilizes a lightweight convolutional neural network architecture that enables rapid model training and inference, making it particularly suitable for real-time applications such as geological radar image detection and recognition. The network also utilizes multi-scale feature fusion and dilated convolution techniques to effectively improve the recognition accuracy of small objects. Summary of the Invention
[0008] The present invention proposes a geological radar underground pipeline target detection method based on improved YOLOv8n, which can significantly improve the detection performance and recognition accuracy of small and medium-sized targets in geological radar images, better capture the characteristics of small targets, and thus enhance the overall detection effect.
[0009] The underground pipeline target detection method of geological radar based on improved YOLOv8n includes the following steps:
[0010] Step 1: Collect geological radar image data of underground pipelines based on geological radar non-destructive testing technology;
[0011] Step 2: Use enhancement technology to expand the dataset and manually annotate the acquired B-scan images;
[0012] Step 3: Improve the YOLOv8n network, replace its backbone neural network with the ConvNext network, and build the Convnext-YOLOv8n network;
[0013] Step 4: Input the B-Scan image to be detected into the trained Convnext-YOLOv8n network to detect the target signal of the underground pipeline.
[0014] In step 1, the geological radar image dataset consists of two parts: one part is the B-scan image collected in the actual environment; the other part is the simulated geological radar image obtained by using the FDTD principle.
[0015] For B-scan images collected in a real-world environment, the measured scene was a sand pit model constructed with uniform sand as the medium. Geological radar used a shielded antenna to transmit signals to detect underground pipelines. The pipelines used were galvanized steel water pipes, PVC pipes, cables, and plastic bottles filled with water. These pipes, PVC pipes, cables, and plastic bottles filled with water were buried in the constructed sand pit model to determine their burial depth. Geological radar scanned the above scene multiple times at different speeds and positions, generating multiple B-scan images of the real-world environment.
[0016] For the simulated geological radar images generated using the FDTD principle, the GPRMax 3.0 toolbox was used to simulate different scenarios to generate more GPR images. The simulated scenarios used sand as the background medium, and steel pipes, PVC pipes, and cables as buried pipelines. The simulation parameters were set based on the parameter values from the actual experimental measurements. After multiple simulations, a total of multiple simulated geological radar images were generated.
[0017] In step 2, the data set is expanded using data enhancement technology, and the data enhancement methods used include: image flipping, scale transformation, random cropping, and enhanced contrast.
[0018] In step 2, LabelImg software is used to label the acquired B-Scan image with hyperbolic features, as follows:
[0019] A total of four categories were marked, and the marked category information was: galvanized water pipe, PVC pipe, cable and water-containing plastic bottle. In the B-Scan image, the hyperbolic feature of the galvanized water pipe is usually more obvious, and its reflection signal is strong and regular in shape; in the B-Scan image, the hyperbolic feature of the PVC pipe is relatively weak; the cable is used for power transmission and communication in the underground environment, and its hyperbolic feature appears as a thinner reflection signal in the B-Scan image; the hyperbolic feature of the water-containing plastic bottle is more obvious. The measured B-scan images and the simulated geological radar images after data enhancement are used to construct a dataset, and the dataset is divided into a training set and a test set in a ratio of 8:2.
[0020] In step 3, the Convnext-YOLOv8n network includes three parts: feature extraction network Backbone, feature fusion network Neck, and detection head Head, where:
[0021] The feature extraction network Backbone part of the Convnext-YOLOv8n network includes Convnext;
[0022] The feature fusion network Neck is located between the feature extraction network Backbone and the detection head. It is composed of a combination of FPN (Feature Pyramid Network) and PAN (Path Aggregation Network) to perform feature fusion. The function of the feature fusion network Neck is to perform deep processing and feature integration on the feature graphs received from the Backbone.
[0023] The detection head is used to perform multi-scale target recognition on the feature maps extracted by the feature extraction network backbone. Specifically, the detection head first reduces the number of channels and size of the feature maps output by the feature extraction network backbone through a convolution (Conv) module. Then, the detection head efficiently integrates the feature maps at each level, specifically including:
[0024] The detection head constitutes the classification and regression components of the Convnext-YOLOv8n network. After the first two stages of processing, the model generates three enhanced feature layers, each with attributes such as width, height, and number of channels. At this stage, each feature map can be viewed as a collection of multiple feature points, each associated with three predefined anchor boxes, and each anchor box contains feature values corresponding to the number of channels. The core task of the detection head module is to evaluate these feature points and determine whether the predefined anchor boxes match the actual target.
[0025] In step 4, the Convnext-YOLOv8n network is used for geological radar image recognition. The recognition process is as follows. 4.1: Target Feature Extraction from Geological Radar Images. During the initial data feature extraction, 640×640×3 geological radar images are input. These geological radar images are processed in the feature extraction network Backbone to obtain feature maps of three different sizes: 80×80×192, 40×40×384, and 20×20×768. Multi-scale feature information is obtained from the original geological radar images.
[0026] Among them, the first feature map is obtained by using the 2-layer Conv2D_LN_GELU and ConvNext Block modules for feature extraction and normalization;
[0027] The second and third feature maps are obtained by processing the first feature through a layer of Conv2D_LN_GELU module and a ConvNext Block module.
[0028] 4.2: The second feature extraction is as follows:
[0029] After obtaining the three effective features, the feature fusion network Neck is used to perform secondary feature extraction and feature fusion to obtain an enhanced feature map of size 80×80×192. Specifically:
[0030] The low-level features of the 20×20×768 feature map are up-sampled twice through a 1×1 convolutional layer and then fused and extracted by the CSPlayer module to obtain an enhanced feature map of size 80×80×192.
[0031] 4.4: The third feature extraction is as follows:
[0032] The enhanced feature map of size 80×80×192 is sent to the PAN network for downsampling, and fused with the feature map of size 40×40×384 and the feature map of size 20×20×768 respectively. At the same time, the CSPlayer module is used for feature extraction to obtain features of three different scales.
[0033] In step 4, the detection head is used to predict the location and category of underground pipelines, as follows:
[0034] In step 4, the detection head predicts the underground pipeline category. Specifically, the training set from the enhanced dataset is fed into the Convnext-YOLOv8n network for training. This allows the Convnext-YOLOv8n network to recognize individual pipeline images and distinguish their characteristics. This allows the network to automatically distinguish the target pipeline category during field detection.
[0035] In step 4, the detection head predicts the location of the underground pipeline. The details include the following:
[0036] The Inner-SIoU bounding box loss function is used to replace CIoU. The angle loss between the predicted box and the real box is introduced. In addition, the auxiliary bounding box and the ratio factor are introduced. The specific calculation process is as follows:
[0037] (1) According to the ratio factor (ratio) and the coordinates of the center point of the real frame (x gt c ,y gt c ), width w gt and height h gt Calculate the coordinates of the auxiliary real box. That is, calculate the coordinates of the upper left vertex of the auxiliary real box (b gt l , b gt b ) and the coordinates of the lower right vertex (b gt r , b gt t ). The calculation formula of its vertex coordinates is
[0038]
[0039]
[0040] (2) According to the scale factor (ratio) and the coordinates of the center point of the prediction box (x c ,y c ), width w and height h to calculate the coordinates of the auxiliary prediction box. That is, calculate the coordinates of the upper left vertex of the auxiliary prediction box (b l , b b ) and the coordinates of the lower right vertex (b r , b t The calculation process of its vertex coordinates is the same as that of formula (1), formula (2), formula (3) and formula (4).
[0041] (3) Calculate the intersection area (inter) and union area (union) of the auxiliary real box and the auxiliary prediction box, and calculate the intersection over union (IOU) based on this. inner The calculation process is:
[0042]
[0043] union=(w gt ×h gt )×ratio 2 +(w×h)radio 2 -inter (6);
[0044]
[0045] (4) Calculate the intersection over union (IoU) based on the area of the predicted box and the area of the real box, and add IoU and IoU inner Introducing SIOU’s loss function (Loss SIoU ). The final Inner_SIoU loss function (Lossinner The calculation formula of _SIoU is
[0046] Loss inner_SIOU =LOSS SIOU +IOU_IOU inner (8).
[0047] The present invention provides a method for detecting underground pipeline targets using geological radar based on improved YOLOv8n, and the technical effects are as follows:
[0048] 1) In step 1 of the present invention, radar data of underground pipelines are collected based on geological radar non-destructive testing technology, which can detect underground pipelines without destroying the structure, detect underground pipeline distribution problems and provide high-resolution images.
[0049] 2) In step 2 of the present invention, the data set is expanded using enhancement technology, and the acquired B-scan images are manually labeled using LabelImg software. The use of data enhancement technology can make full use of limited data and help prevent overfitting.
[0050] 3) In step 3 of the present invention, the backbone neural network of the improved YOLOv8n is replaced by a pure convolutional neural network ConvNeXt. ConvNext adopts a lightweight convolutional neural network structure, which can complete model training and reasoning in a relatively short time, and is particularly suitable for real-time application scenarios such as geological radar image detection and recognition. Secondly, Convnext adds a layer LN before and after each downsampling. It only needs to calculate the mean and variance of each sample in the feature dimension, so the amount of calculation is relatively small. Moreover, LN normalizes each sample in the feature dimension and can be applied to single sample reasoning and small batch training data. The network significantly improves the recognition accuracy of geological radar images, especially in the recognition of small targets in images. By improving the network architecture and feature extraction technology, the network can more accurately identify the features of small targets, thereby enhancing the overall recognition performance. This optimization has a significant impact on improving the accuracy of geological radar image analysis.
[0051] 4) In step 4 of this invention, the Inner-SIoU bounding box loss function is used instead of CIoU. This aims to compensate for the shortcomings of CIoU by adding an angle loss between the predicted box and the ground-truth box. Secondly, an auxiliary bounding box and a ratio factor are introduced to improve the positioning accuracy of the predicted box and accelerate its regression process. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The present invention will be further described below with reference to the accompanying drawings and examples:
[0053] Figure 1This is a flow chart of the underground pipeline target detection method of geological radar based on improved YOLOv8n.
[0054] Figure 2(a) is the B-can image measured by geological radar;
[0055] Among them, Figure 2(a) shows the measured images of a galvanized water pipe, a PVC pipe, and a water-containing plastic bottle from left to right.
[0056] Figure 2(b) shows the measured image of the galvanized water delivery steel pipe;
[0057] Figure 2(c) shows the B-can image measured by geological radar;
[0058] Among them, Figure 2(c) shows the measured images of cable, cable, PVC pipe, and plastic bottle containing water from left to right.
[0059] Figure 3(a) shows the simulation images corresponding to FDTD model 1 and model 2 of the underground pipeline;
[0060] Figure 3(b) shows the underground pipeline FDTD model 2 and the corresponding simulation image of model 2.
[0061] Figure 4(a) is a schematic diagram of an expanded sample of the underground pipeline FDTD model (the image is obtained by flipping the image);
[0062] Figure 4(b) is a schematic diagram of an expanded sample of the underground pipeline FDTD model (image obtained by scale transformation);
[0063] Figure 4(c) is a schematic diagram of an expanded sample of the underground pipeline FDTD model (an image obtained by random cropping);
[0064] Figure 4(d) is a schematic diagram of an expanded sample of the underground pipeline FDTD model (image obtained by enhanced contrast);
[0065] Figure 4(a) to Figure 4(d) This is the result of processing the simulation image in Figure 3(a).
[0066] Figure 4(e) is a schematic diagram of the second expanded sample of the underground pipeline FDTD model (the image is obtained by flipping the image);
[0067] Figure 4(f) is a schematic diagram of the second expanded sample of the underground pipeline FDTD model (image obtained by scale transformation);
[0068] Figure 4(g) is a schematic diagram of the second expanded sample of the underground pipeline FDTD model (image obtained by random cropping);
[0069] Figure 4(h) is a schematic diagram of the second expanded sample of the underground pipeline FDTD model (image obtained by enhanced contrast);
[0070] Figure 4(e) to Figure 4(h)This is the result of processing the simulation image in Figure 3(b).
[0071] Figure 5(a) shows the hyperbolic feature annotation of the measured B-Scan image using LabelImg software (hyperbolic feature annotation of galvanized steel pipe, PVC pipe and plastic bottle filled with water)
[0072] Figure 5(b) shows the hyperbolic marking of the PVC pipe;
[0073] Figure 5(c) shows the hyperbolic feature annotation of the measured B-Scan image using LabelImg software (from left to right, the hyperbolic annotations are cable, cable, PVC pipe, and plastic bottle containing water).
[0074] Figure 6 This is the Convnext-YOLOv8n network structure diagram.
[0075] Figure 7(a) shows the recognition results of the Convnext-YOLOv8n network for galvanized steel pipes, PVC pipes, and plastic bottles filled with water;
[0076] Figure 7(b) shows the recognition result of the galvanized water pipe by the Convnext-YOLOv8n network;
[0077] Figure 7(c) shows the recognition results of the Convnext-YOLOv8n network for cables, electric cables, PVC pipes, and plastic bottles containing water. DETAILED DESCRIPTION
[0078] The underground pipeline target detection method of geological radar based on improved YOLOv8n includes the following steps:
[0079] Step 1: Collect geological radar image data of underground pipelines based on geological radar non-destructive testing technology;
[0080] Step 2: Use enhancement technology to expand the dataset and manually annotate the acquired B-scan images;
[0081] Step 3: Improve the YOLOv8n network, replace its backbone neural network with a pure convolutional neural network ConvNext network, and build a Convnext-YOLOv8n network;
[0082] Step 4: Input the B-Scan image to be detected into the trained Convnext-YOLOv8n network to detect the target signal of the underground pipeline.
[0083] In step 1, the geological radar image dataset consists of two parts: one part is the B-scan image collected in the actual environment; the other part is the simulated geological radar image obtained by using the FDTD principle.
[0084] For the B-scan images collected in the actual environment, the measured scene is a sand pit model that is 6m long and 1m wide, and its medium is uniform sand. The geological radar uses a shielded antenna with a center frequency of 800MHz to transmit signals, with a detection depth of 40ns, to detect underground pipelines, with a maximum penetration of 2.5m. Since buried objects of different materials have different dielectric constants, the underground pipelines used in the present invention are galvanized water pipes, PVC pipes, cables, and plastic bottles filled with water. The galvanized water pipes, PVC pipes, cables, and plastic bottles filled with water are buried in the constructed sand pit model to determine the burial depth. The geological radar is used to scan the above scenes multiple times at different speeds and positions, and a total of 360 B-scan images in actual environments are obtained, such as Figure 2(a) to Figure 2(c) shown.
[0085] For the simulated geological radar images obtained using the FDTD principle, the present invention uses the GPRMax3.0 toolbox to simulate different scenarios to generate more GPR images. The background medium of the simulated scenario is sand, and the buried pipelines are steel pipes, PVC, and cables. The relevant parameters of the simulation experiment are set according to the parameter values of the measured experiment. Among them, the dielectric constants of the steel pipe, PVC pipe, and cable are 1, 3.5, and 9.1, respectively, and their diameters are 2.5 cm, 7 cm, and 1 cm, respectively. Among them, the simulation model uses an 800 MHz shielded antenna for scanning, and the pulse length is 8.7 ns. After multiple simulations, a total of 1,000 simulated geological radar images were generated, as shown in Figure 3(a) and Figure 3(b).
[0086] In step 2, the data set is expanded using enhancement technology. Since overfitting may occur during network training, the present invention uses data enhancement technology to expand the data set to 1800 images. Data enhancement technology can make full use of limited data and help prevent overfitting. The data enhancement methods mainly used in the present invention are: image flipping, scale transformation, random cropping and enhanced contrast. The sample data after expansion processing is as follows: Figure 4(a) to Figure 4(h) shown.
[0087] Image flipping is a simple and effective enhancement method. It generates new image samples by flipping the image horizontally. This method can significantly increase the size of the dataset while exposing the model to more diverse image orientation changes, thereby enhancing its robustness to image orientation.
[0088] Scaling refers to the operation of enlarging or reducing an image. Through scaling, we can simulate the performance of hyperbolas at different scales, enabling the network to better recognize and process objects of different sizes.
[0089] Random cropping is a method that randomly selects a sub-region of an image and crops it as a new image sample; this method can simulate the different positions and partial visibility of the hyperbola in the image, thereby increasing the diversity of the data.
[0090] Contrast enhancement is a method of highlighting the outlines and details of objects in an image by adjusting the contrast of the image. It can make the bright areas in the image brighter and the dark areas darker, thereby highlighting the difference between the object and the background and making it easier for the model to recognize the boundaries and features of the object. Figure 4(a) to Figure 4(h) It can be seen that the original image can be expanded and overfitting can be avoided by image flipping, scaling, random cropping and contrast enhancement.
[0091] In step 2, LabelImg software is used to label the acquired B-Scan image with hyperbolic features, as follows:
[0092] A total of 4 categories are marked, and the marked category information is: galvanized water pipe (Rebar), PVC pipe (PVC), cable (Cable) and water-containing plastic bottle (Waterbottle). The marked images are as follows Figure 5(a) to Figure 5(c) As shown in the figure. Galvanized steel pipes are a common underground pipeline material, widely used in water supply systems. In B-scan images, the hyperbolic features of galvanized steel pipes are usually more obvious, with strong reflection signals and a relatively regular shape. PVC pipes are lightweight, corrosion-resistant plastic pipes commonly used in drainage and irrigation systems. In B-scan images, the hyperbolic features of PVC pipes may be relatively weak. Electrical cables are used for power transmission and communication in underground environments. Their hyperbolic features appear as thin reflection signals in B-scan images. The hyperbolic features of plastic bottles containing water are usually more obvious because the surface of plastic bottles containing water is relatively smooth, and the high dielectric constant of water can produce strong reflection signals. A dataset was constructed by combining the measured B-scan images and the simulated geological radar images after data enhancement, and the dataset was divided into training and test sets in an 8:2 ratio.
[0093] In the step 3, in the target detection link, YOLOv8 adopts a more advanced decoupling architecture, separates the target recognition and detection functions, abandons the anchor frame dependency, and adopts a detection mechanism that does not require anchors. The structure of YOLOv8n is more streamlined, with lower computational load and excellent operating efficiency. Convnext is an advanced deep learning model based on convolutional neural networks. It can adaptively adjust the shape and position of the convolution kernel to improve the flexibility and efficiency of feature extraction. It is also a very powerful and general image classification model that can perform well in a variety of scenarios and fields. By replacing the backbone network in YOLOv8n with a pure convolutional neural network Convnext, the present invention proposes a new geological radar image recognition model Convnext-YOLOv8n to enhance the recognition performance of YOLOv8n for small targets in geological radar images;
[0094] The Convnext-YOLOv8n network consists of three parts: the feature extraction network Backbone, the feature fusion network Neck, and the detection head Head.
[0095] The feature extraction network Backbone is the backbone network of YOLOv8, which is responsible for extracting features from the input image. Its main components include Residual, CSPnet, Focus and SPP. Among them, the Residual structure is used to solve the problems of gradient disappearance and gradient explosion in deep neural network training. By introducing residual connections, the network can increase the number of layers without affecting performance, thereby improving the network's expression and learning capabilities. CSPnet is a modular structure used to enhance the network's modeling capabilities and generalization performance for complex scenes. The Focus module reduces the amount of model calculation and improves detection performance through grouped convolution operations. As a multi-scale feature fusion method, SPP can significantly improve the detection speed while maintaining high detection accuracy, and optimize the actual application performance of YOLOV8. After Backbone processing, the image generates three feature maps of different sizes and passes them to the Neck module. The feature extraction network Backbone part of the Convnext-YOLOv8n network described in the present invention is mainly composed of Convnext, such as Figure 6As shown in the figure. Convnext further improves the accuracy of image recognition by adopting 7×7 depthwise separable convolution and moving the module upward, effectively reducing the loss caused by high-dimensional information. Secondly, Convnext adds a layer normalization (LN) before and after each downsampling. It only needs to calculate the mean and variance of each sample in the feature dimension, so the amount of calculation is relatively small. Moreover, the layer normalization LN normalizes each sample in the feature dimension and can be applied to single-sample reasoning and small-batch training data.
[0096] This paper selects ConvNeXt as the backbone network of the proposed network, aiming to effectively improve the recognition performance of small targets in GPR images while ensuring that the original YOLOv8 backbone function remains unchanged.
[0097] The feature fusion network Neck is located between the feature extraction network Backbone and the detection head Head. The feature fusion network Neck is composed of FPN (Feature Pyramid Network) and PAN (Path Aggregation Network), and mainly plays the role of feature fusion. Figure 6 As shown in the figure. FPN is a neural network architecture for target detection and semantic segmentation, which identifies targets of different sizes by constructing a multi-scale feature pyramid. Generally, although shallow features have limited semantic information, they accurately locate targets, while deep features are semantically rich but have relatively vague positioning. FPN significantly improves the performance of target detection by fusing the advantages of shallow and deep features. However, FPN has the problem of a long path when transmitting shallow information to the top layer. Sometimes the information needs to pass through hundreds of layers, resulting in the loss of hyperbolic details in the GPR image. In contrast, PANet adopts a bottom-up path design, effectively utilizing the precise positioning information of the bottom layer, strengthening the entire feature hierarchy, and shortening the information transmission path, thereby better preserving the hyperbolic detail information in the GPR image.
[0098] This technology successfully captures the properties of targets of various sizes by integrating features of different resolutions, thereby significantly improving the accuracy and reliability of target detection.
[0099] The main function of the feature fusion network Neck is to perform deep processing and feature integration on the feature maps received from Backbone, thereby enhancing the accuracy and stability of target detection.
[0100] The detection head is used to perform multi-scale target recognition on the feature maps extracted by the feature extraction network Backbone. The details are as follows:
[0101] First, the detection head uses a convolutional (Conv) module to reduce the number of channels and size of the feature maps output by the feature extraction network backbone. Then, by efficiently integrating feature maps at all levels, comprehensive information is captured, further enhancing detection accuracy. Specifically, this includes:
[0102] The detection head constitutes the classification and regression components of the Convnext-YOLOv8n network. After the first two stages of processing, the model generates three enhanced feature layers, each with properties such as width, height, and number of channels. At this stage, each feature map can be viewed as a collection of multiple feature points, each of which is associated with three predefined anchor boxes, and each anchor box contains feature values of the same number of channels. The core task of the detection head module is to evaluate these feature points and determine whether the preset anchor boxes match the actual target. Similar to earlier versions of YOLO, Convnext-YOLOv8n uses an integrated decoupled head design, which simultaneously completes classification and regression tasks through a 1×1 convolutional layer.
[0103] In step 4 above, the Convnext-YOLOv8n network was used for ground-penetrating radar image recognition. The recognition process is as follows. 4.1) Target Feature Extraction from Ground-Penetrating Radar Images. During the initial data feature extraction, 640×640×3 ground-penetrating radar images were input. These ground-penetrating radar images were processed in the feature extraction network Backbone to obtain feature maps of three different sizes: 80×80×192, 40×40×384, and 20×20×768. This process aims to obtain multi-scale feature information from the original ground-penetrating radar images.
[0104] Among them, the first feature map is obtained by using the 2-layer Conv2D_LN_GELU and ConvNext Block modules for feature extraction and normalization; the details are as follows:
[0105] Conv2D_LN_GELU and Convnext Block modules, such as Figure 6 As shown in the figure, the Convnext Block utilizes a unique design that combines large convolution kernels with an inverse bottleneck architecture. By optimizing the computational effort within each layer within the block, this architecture effectively reduces computational complexity while enhancing the model's feature extraction capabilities. Specifically, a 7x7 convolution kernel is first used for feature extraction, followed by batch normalization to stabilize model training. Next, a 1x1 convolution is used to map features from a low-dimensional space to a high-dimensional space to extract richer semantic information. The feature map is then further processed using the GELU activation function. Finally, a further 1x1 convolution is used for dimensionality reduction to maintain the appropriate dimensionality of the feature map.
[0106] The workflow of the Conv2D_LN_GELU module is to first pass a 7x7 convolution kernel with a stride of 2, then pass a layer normalization (LN), and finally introduce the GELU activation function to process the feature map after dimensionality increase.
[0107] The second and third feature maps are obtained by processing the first feature through a layer of Conv2D_LN_GELU module and a ConvNext Block module respectively; the details are as follows:
[0108] The workflow of the Conv2D_LN_GELU and Convnext Block modules is the same as described above, and the second feature map is generated by processing the first layer of feature maps with another layer of Conv2D_LN_GELU and Convnext Block modules; similarly, the third feature map is generated by processing the second layer of feature maps with another layer of Conv2D_LN_GELU and Convnext Block modules.
[0109] 4.2) Second feature extraction: After obtaining the three valid features, the feature fusion network Neck is used for secondary feature extraction and fusion to obtain an enhanced feature map of size 80×80×192. Specifically, the low-level features of the 20×20×768 feature map are upsampled twice through a 1×1 convolutional layer and then fused and extracted using the CSPlayer module, resulting in an enhanced feature map of size 80×80×192. The details are as follows:
[0110] CSPlayer module such as Figure 6 As shown in the figure. The CSPlayer module of the FPN network is mainly responsible for feature fusion and enhancement. In the FPN network, the CSPlayer module receives feature maps from different scales, fuses shallow features with deep features through cross-layer connections, and then splices these feature maps to form a multi-channel feature map. Next, 1x1 convolution is used to reduce the number of channels and integrate features, and then 3x3 convolution is used to further extract local features and enhance the spatial information of the feature map. After that, the activation function SiLU is applied to perform a nonlinear transformation on the feature map, introducing nonlinear characteristics to learn more complex feature representations. Finally, the CSPlayer module achieves multi-scale feature fusion through upsampling, and finally outputs the enhanced feature map, providing high-quality feature representation for subsequent target detection tasks, significantly improving the performance and robustness of the model.
[0111] 4.3) The third feature extraction is as follows: The enhanced feature map of size 80×80×192 is fed into the PAN network for downsampling. It is then fused with feature maps of size 40×40×384 and 20×20×768, respectively. Simultaneously, the CSPlayer module is used for feature extraction, resulting in features at three different scales. Specifically, the CSPlayer module of the PAN network functions similarly to the CSPlayer module of the FPN network. Both integrate feature maps of different scales through cross-layer connections and feature concatenation. 1x1 convolutions are then used for channel adjustment and feature integration, and 3x3 convolutions are used to further extract local features. The introduction of activation functions enhances the nonlinear representation capabilities of features. The CSPlayer module of the PAN network achieves multi-scale feature fusion through downsampling, ultimately outputting a set of enhanced feature maps that provide high-quality feature representation for subsequent object detection tasks.
[0112] In step 4, the detection head is used to predict the location and category of underground pipelines. The enhanced feature map obtained by the feature extraction network Backbone and FPN is regarded as a collection of countless feature points, and image classification is performed to obtain the category of the hyperbolic target in the geological radar image; the details are as follows:
[0113] In step 4, the detection head predicts the underground pipeline category. Specifically, the training set from the enhanced dataset is fed into the Convnext-YOLOv8n network for training. This allows the Convnext-YOLOv8n network to recognize individual pipeline images and distinguish their characteristics. This allows the network to automatically distinguish the target pipeline category during field detection.
[0114] In step 4, the detection head predicts the location of the underground pipeline. The details include the following:
[0115] This paper uses the Inner-SIoU bounding box loss function instead of CIoU, and compensates for the shortcomings of CIoU by introducing the angle loss between the predicted box and the ground-truth box. In addition, an auxiliary bounding box and a ratio factor are introduced to improve the positioning accuracy of the predicted box and speed up its regression. The specific calculation process is as follows:
[0116] (1) According to the ratio factor (ratio) and the coordinates of the center point of the real frame (x gt c ,y gt c ), width w gt and height h gt Calculate the coordinates of the auxiliary real box. That is, calculate the coordinates of the upper left vertex of the auxiliary real box (b gt l, b gt b ) and the coordinates of the lower right vertex (b gt r , b gt t ). The calculation formula of its vertex coordinates is
[0117]
[0118] (2) According to the scale factor (ratio) and the coordinates of the center point of the prediction box (x c ,y c ), width w and height h to calculate the coordinates of the auxiliary prediction box. That is, calculate the coordinates of the upper left vertex of the auxiliary prediction box (b l , b b ) and the coordinates of the lower right vertex (b r , b t The calculation process of its vertex coordinates is the same as that of formula (1), formula (2), formula (3) and formula (4).
[0119] (3) Calculate the intersection area (inter) and union area (union) of the auxiliary real box and the auxiliary prediction box, and calculate the intersection over union (IOU) based on this. inner The calculation process is:
[0120]
[0121] union=(w gt ×h gt )×ratio 2 +(w×h)radio 2 -inter (6);
[0122]
[0123] (4) Calculate the intersection over union (IoU) based on the area of the predicted box and the area of the real box, and add IoU and IoU inner Introducing SIOU’s loss function (Loss SIoU ). The final Inner_SIoU loss function (Loss inner The calculation formula of _SIoU is
[0124] Loss inner_SIOU =LOSS SIOU +IOU_IOU inner (8);
[0125] The above Convnext-YOLOv8n network uses the Inner-SIoU bounding box loss function to replace the original CIoU, making the positioning efficiency and accuracy higher.
[0126] Verification example:
[0127] The Convnext-YOLOv8n network was used to experiment with the self-built data set, and the simulation results were as follows: Figure 7(a) to Figure 7(c) As shown, the location and category of the hyperbola can be seen.
[0128] To verify the superiority of the proposed ConvNeXt-YOLOv8n network in recognition performance, we conducted a detailed experimental comparison on a self-built dataset and compared its performance with mainstream networks such as YOLOv4, YOLOv5, YOLOv7, and Faster R-CNN. The accuracy and average precision of these networks were calculated, as shown in Table 1.
[0129] Table 1 Comparison of accuracy and average precision of different network models
[0130]
[0131] ConvNeXt-YOLOv8n demonstrated excellent performance in identifying various objects commonly found in GPR imagery, including galvanized steel pipes, PVC pipes, cables, and plastic bottles containing water. ConvNeXt-YOLOv8n achieved the best performance in three key evaluation metrics: precision and average precision. ConvNeXt-YOLOv8n achieved improvements in precision of 3.83%, 1.82%, 7.47%, and 12.40% over YOLOv4, YOLOv5, YOLOv7, and Faster R-CNN, respectively, while average precision improved by 5.96%, 4.22%, 7.58%, and 1.56%, respectively. This demonstrates that ConvNeXt-YOLOv8n performs well in GPR image recognition.
Claims
1. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar is characterized by The following steps are involved: Step 1: Collect geological radar image data of underground pipelines based on geological radar non-destructive testing technology; Step 2: Use enhancement technology to expand the dataset and manually annotate the acquired B-scan images; Step 3: Improve the YOLOv8n network, replace its backbone neural network with the ConvNext network, and build the Convnext-YOLOv8n network; Step 4: Input the B-Scan image to be detected into the trained Convnext-YOLOv8n network to detect the target signal of the underground pipeline.
2. The underground pipeline target detection method based on ground penetrating radar using improved YOLOv8n according to claim 1 is characterized in that: In step 1, the geological radar image dataset includes B-scan images collected in an actual environment. For the B-scan images collected in the actual environment, the measured scene is a constructed sand pit model, and its medium is uniform sand. The geological radar detects underground pipelines by transmitting signals using a shielded antenna. The underground pipelines used are galvanized water pipes, PVC pipes, cables, and plastic bottles filled with water. The galvanized water pipes, PVC pipes, cables, and plastic bottles filled with water are buried in the constructed sand pit model to determine the burial depth. The geological radar is used to scan the above scenes multiple times at different speeds and positions to obtain a total of multiple B-scan images in the actual environment.
3. The underground pipeline target detection method based on ground penetrating radar using improved YOLOv8n according to claim 2 is characterized in that: The geological radar image dataset includes geological radar images simulated using the FDTD principle. For the geological radar images simulated using the FDTD principle, the GPRMax3.0 toolbox is used to simulate different scenes to generate more GPR images. The background medium of the simulated scene is sand, and the buried pipelines are steel pipes, PVC and cables. The relevant parameters of the simulation experiment are set according to the parameter values of the measured experiment. After multiple simulations, a total of multiple simulated geological radar images are generated.
4. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 1 is characterized in that : In step 2, the data set is expanded using data enhancement technology, and the data enhancement methods used include: image flipping, scale transformation, random cropping and enhanced contrast.
5. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 1 is characterized in that In step 2, the acquired B-Scan image is labeled with hyperbolic features using LabelImg software, as follows: Four categories were labeled: galvanized water pipes, PVC pipes, cables, and plastic bottles containing water. In B-Scan images, the hyperbolic features of galvanized water pipes are typically more pronounced, with strong, regularly shaped reflection signals. In B-Scan images, the hyperbolic features of PVC pipes are relatively weak. Cables are used for power transmission and communications in underground environments, and their hyperbolic features appear as thin reflection signals in B-Scan images. Plastic bottles containing water have more pronounced hyperbolic features. The measured B-scan images and the simulated geological radar images with data enhancement are used to construct a dataset, and the dataset is divided into a training set and a test set in a ratio of 8:
2.
6. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 1 is characterized in that In step 3, the Convnext-YOLOv8n network includes three parts: feature extraction network Backbone, feature fusion network Neck, and detection head Head, where: The feature extraction network Backbone part of the Convnext-YOLOv8n network includes Convnext; The feature fusion network Neck is located between the feature extraction network Backbone and the detection head Head. The feature fusion network Neck is composed of FPN and PAN, and plays the role of feature fusion. The function of the feature fusion network Neck is to perform deep processing and feature integration on the feature map received from the Backbone. The detection head is used to perform multi-scale target recognition on the feature map extracted by the feature extraction network Backbone.
7. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 6 is characterized in that First, the detection head uses a convolution module to reduce the number of channels and size of the feature map output by the feature extraction network Backbone, and then efficiently integrates the feature maps of each layer, as follows: The detection head constitutes the classification and regression components in the Convnext-YOLOv8n network. After the first two stages of processing, the model generates three enhanced feature layers, each with attributes such as width, height, and number of channels. At this stage, each feature map can be viewed as a collection of multiple feature points, each of which is associated with three predefined anchor boxes, and each anchor box contains feature values with the same number of channels. The detection head module evaluates these feature points to determine whether the preset anchor boxes match the actual target.
8. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 1 is characterized in that : In step 4, the Convnext-YOLOv8n network is used to perform geological radar image recognition, and the recognition process is as follows; 4.1: Target feature extraction from geological radar images. When performing the first data feature extraction, the input is a 640×640×3 geological radar image. These geological radar images are processed in the feature extraction network Backbone to obtain feature maps of three different sizes: 80×80×192, 40×40×384, and 20×20×768. Multi-scale feature information is obtained from the original geological radar image. Among them, the first feature map is obtained by using the 2-layer Conv2D_LN_GELU and ConvNext Block modules for feature extraction and normalization; The second and third feature maps are obtained by processing the first feature through a layer of Conv2D_LN_GELU module and a ConvNext Block module. 4.2: The second feature extraction is as follows: After obtaining the three effective features, the feature fusion network Neck is used to perform secondary feature extraction and feature fusion to obtain an enhanced feature map of size 80×80×192; specifically: The low-level features of the 20×20×768 feature map are up-sampled twice through a 1×1 convolutional layer and then fused and extracted by the CSPlayer module to obtain an enhanced feature map of size 80×80×192. 4.4: The third feature extraction is as follows: The enhanced feature map of size 80×80×192 is sent to the PAN network for downsampling, and fused with the feature map of size 40×40×384 and the feature map of size 20×20×768 respectively. At the same time, the CSPlayer module is used for feature extraction to obtain features of three different scales.
9. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 4 is characterized in that In step 4, the detection head predicts the underground pipeline category, and the specific steps include: The training set portion of the enhanced dataset is put into the Convnext-YOLOv8n network for training, allowing the Convnext-YOLOv8n network to identify the images of each pipeline and distinguish the image characteristics of each pipeline. During field detection, it can automatically distinguish the category of the target pipeline.
10. The underground pipeline target detection method based on the improved YOLOv8n ground penetrating radar according to claim 9 is characterized in that : The detection head predicts the location of underground pipelines as follows: The Inner-SIoU bounding box loss function is used to replace CIoU. The angle loss between the predicted box and the real box is introduced. In addition, the auxiliary bounding box and the scale factor are introduced. The specific calculation process is as follows: (1) According to the scale factor and the coordinates of the center point of the real frame (x gt c ,y gt c ), width w gt and height h gt Calculate the coordinates of the auxiliary real box; that is, calculate the coordinates of the upper left vertex of the auxiliary real box (b gt l , b gt b ) and the coordinates of the lower right vertex (b gt r , b gt t ); the calculation formula of its vertex coordinates is (2) According to the scale factor and the coordinates of the center point of the prediction box (x c ,y c ), width w and height h calculate the coordinates of the auxiliary prediction box; that is, calculate the coordinates of the upper left vertex of the auxiliary prediction box (b l , b b ) and the coordinates of the lower right vertex (b r , b t ); The calculation process of its vertex coordinates is the same as formula (1), formula (2), formula (3) and formula (4); (3) Calculate the intersection area inter and union area union of the auxiliary real box and the auxiliary prediction box, and calculate the intersection-union ratio IOU based on this inner ; The calculation process is union=(w gt ×h gt )×ratio 2 +(w×h)radio 2 -inter (6); (4) Calculate the intersection over union (IoU) based on the area of the predicted box and the area of the real box, and add IoU and IoU inner Introducing SIOU's loss function Loss SIoU Middle; Final Inner_SIoU loss function Loss inner The calculation formula for SIoU is: Loss inner_SIOU =LOSS SIOU +IOU_IOU inner (8)。