Target background difference enhanced underground pipeline material identification method, medium and equipment
By using a target-background difference enhancement method and a bi-branch cross-attention material discrimination model, the problems of insufficient accuracy and low stability in the identification of underground pipeline materials in existing technologies are solved, and accurate identification of metal pipes, concrete pipes and plastic pipes is achieved.
Patent Information
- Application Number
- CN202611262746.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies suffer from insufficient accuracy and low stability in identifying underground pipeline materials, especially in complex on-site environments where it is difficult to accurately identify pipeline materials.
The target background difference enhancement method is adopted. Ground penetrating radar data is preprocessed to extract the pipeline target area and construct the target echo window and background reference window. A bi-branch cross-attention material discrimination model is used to combine one-dimensional echo signal and two-dimensional time-frequency map features to output the probability and confidence of pipeline material. The identification results are corrected by combining pipeline continuity.
It improves the accuracy and stability of underground pipeline material identification, reduces the impact of image brightness, burial depth attenuation and soil background changes on the identification results, and achieves accurate identification of metal pipes, concrete pipes and plastic pipes.
Smart Images

Figure CN123156301A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of underground pipeline detection and identification technology, and in particular to a method, medium and device for identifying underground pipeline materials by enhancing target-background difference. Background Technology
[0002] Underground pipelines are a crucial component of urban infrastructure, including water supply and drainage pipes, gas pipes, power pipes, and communication pipes. As cities age, the complexity of underground pipeline types, their age, and the availability of incomplete data or inaccurate drawings become increasingly prominent issues. During road construction, pipeline relocation, urban renewal, and underground space development, failure to accurately determine the location, depth, and materials of underground pipelines can easily lead to pipeline damage, construction safety accidents, road collapses, or pipeline leaks.
[0003] Ground-penetrating radar (GPR) is a commonly used non-destructive detection technology for underground targets. It infers the location and shape of underground targets by emitting high-frequency electromagnetic waves into the ground and receiving reflected signals from the interface between the underground media. When the electromagnetic waves propagate to the interface between the pipeline and the surrounding soil, reflection waves are generated due to differences in electromagnetic parameters such as dielectric constant and conductivity. Underground pipelines typically appear as hyperbolic curves in GPR B-scan images; therefore, existing GPR pipeline detection methods primarily focus on hyperbolic identification, target location, and depth estimation.
[0004] The existing technology still has the following shortcomings: (1) The manual interpretation method is highly subjective, and the results are greatly affected by the operator's experience, data quality and on-site environment, making it difficult to meet the needs of large-scale, batch and standardized underground pipeline surveys.
[0005] (2) Conventional ground-penetrating radar pipeline detection methods mainly focus on identifying hyperbolic reflection patterns and determining pipeline locations, addressing the questions of "whether there is a pipeline and where the pipeline is located," but lack the ability to automatically identify "what material the pipeline is made of."
[0006] (3) Material identification methods based on dual polarization parameters rely on dual polarization ground penetrating radar equipment, metal plate calibration, polarization alpha angle calculation and dielectric constant estimation. The on-site operation process is relatively complicated, and the judgment process usually depends on polarization parameters and threshold rules. When the soil moisture content changes, the backfill material is uneven, or the pipe diameter and burial depth change significantly, the identification stability may be affected.
[0007] (4) Existing pipeline detection methods based on deep learning such as YOLOv3 are mainly used to identify hyperbolic targets of pipelines in radar images and locate pipelines. They usually do not output material categories such as concrete pipes, steel pipes, and plastic pipes, and cannot directly know the material properties of underground pipelines.
[0008] (5) The existing time-frequency spectrum diagram for pipeline material identification shows that time-frequency information has certain value for material identification. However, if only the target signal is subjected to STFT or wavelet transform, the burial depth attenuation, soil moisture content change and equipment gain difference may still be regarded as material difference.
[0009] (6) Existing classification methods based on models such as XGBoost, random forest or support vector machine usually rely on manually organized feature vectors, which are difficult to utilize the correlation between one-dimensional echo waveforms, two-dimensional time-frequency images and physical compensation parameters at the same time, and are still insufficient in adaptability to complex field data.
[0010] Therefore, it is necessary to provide a new method, medium, and device for identifying underground pipeline materials by enhancing target-background differences to solve the above-mentioned technical problems. Summary of the Invention
[0011] The main objective of this invention is to provide a method, medium, and device for identifying underground pipeline materials by enhancing target-background differences, aiming to solve the problems of insufficient identification accuracy and low stability of existing methods.
[0012] To achieve the above objectives, this invention proposes a method for identifying the material of underground pipelines by enhancing target-background differences, comprising the following steps: S1: Acquire ground-penetrating radar data of underground pipelines in the area to be tested; S2: Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, and extract the pipeline target area from the radar data profile; S3: Define the target echo window and background reference window within the pipeline target area, and construct the target background difference enhancement feature of the pipeline target area based on the target echo window and background reference window; S4: Input the target echo window, background reference window, and target background difference enhancement features into the pre-trained dual-branch cross-attention material discrimination model, and output the recognition results respectively. The recognition results are the probability and confidence of the pipeline belonging to different underground pipeline materials.
[0013] Optionally, S1 includes: Set up survey lines in the area to be measured; Ground-penetrating radar (GPR) is used to scan underground pipelines in the area under test to obtain GPR data including multiple A-scan signals. The start and end coordinates of the survey line, sampling interval, rangefinder wheel information, radar antenna center frequency, time window, number of sampling points, and on-site soil conditions are recorded simultaneously. Each A-scan signal represents the echo amplitude of the radar at a certain measurement point over time. Multiple A-scan signals are arranged according to the survey line direction to form a B-scan image.
[0014] Optionally, S2 includes: S2.1. Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, wherein: data preprocessing includes one or more of the following: zero-time correction, DC removal, background removal, bandpass filtering, gain compensation, normalization, outlier removal, and offset imaging. S2.2 Extract multiple pipeline target areas from the preprocessed radar data profile; S2.3 For each pipeline target area, determine its hyperbola vertex position, target lateral range, target longitudinal time range, and estimated pipeline burial depth, and crop to obtain a local radar image block containing hyperbola reflection characteristics, while retaining its spatial coordinates and temporal depth information in the original survey line.
[0015] Optionally, S3 includes: The A-scan signal near the apex of the hyperbola within the pipeline target area and its neighboring B-scan local area are used as the target echo window; The target background difference enhancement feature is constructed by selecting areas that do not contain pipeline reflections on the left and right sides or within the same depth range of the target echo window as background reference windows; Spectral analysis and time-frequency analysis were performed on the target echo window and the background reference window, respectively, to obtain the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution. The target-background difference enhancement characteristics of the target echo relative to the background echo are calculated based on the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution.
[0016] Optionally, in step S4, the dual-branch cross-attention material discrimination model includes an input layer, a one-dimensional echo signal branch, a two-dimensional time-frequency graph branch, a physical parameter-guided branch, a cross-attention fusion module, and a classification layer. The input layer averages the multi-channel A-scan signals in the target echo window and the background reference window to obtain the target representative echo signal and the background representative echo signal, and normalizes the target echo and the background echo to obtain the target-background normalized difference signal. The input end of the one-dimensional echo signal branch is connected to the output end of the input layer. The one-dimensional echo signal branch performs short-time Fourier transform on the target echo signal and the background echo signal respectively to obtain the target time spectrum and the background time spectrum. Then, the target time spectrum energy map and the background time spectrum energy map are calculated respectively, and the difference between the two is calculated in the logarithmic domain to obtain the target and background time frequency difference map. The input end of the two-dimensional time-frequency graph branch is connected to the output end of the one-dimensional echo signal branch. The two-dimensional time-frequency graph branch can learn not only the time-frequency response of the underground pipeline target itself, but also the degree of change of the pipeline echo relative to the surrounding background by simultaneously retaining the target echo logarithmic time-frequency energy map, the background echo logarithmic time-frequency energy map, and the target background time-frequency difference map. The physical parameter guidance branch inputs the estimated pipeline burial depth, radar antenna center frequency, target echo signal-to-noise ratio, background energy level, target-background energy ratio, and target-background spectrum ratio into the multilayer perceptron to form a physical compensation vector. The physical compensation vector is used to adjust the weights of the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency graph branch to obtain the one-dimensional and two-dimensional features after physical parameter guidance. The one-dimensional features, two-dimensional features, and physical compensation vectors output by the physical parameter-guided branches are input into the cross-attention fusion module to obtain the fused features for underground pipeline material identification. The fusion features for identifying the material of underground pipelines are input into the classification layer, which outputs the probability values and corresponding confidence levels of the target pipeline belonging to metal pipes, concrete pipes, and plastic pipes, respectively.
[0017] Optionally, the specific process of weighting the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency plot branch using the physical compensation vector is as follows: ① The physical compensation vector is standardized to obtain the standardized physical parameter vector; ② The standardized physical parameter vector is sequentially input into two layers of multilayer perceptron to obtain the physical parameter embedding features. Both layers of multilayer perceptron use fully connected networks, and each fully connected network is followed by a ReLU activation function and a Dropout layer. ③ Embed the physical parameters into the feature inputs of two independent fully connected layers and a Sigmoid function to generate guiding weights for the one-dimensional echo signal branch. Guiding weights of two-dimensional time-frequency graph branches g 2; The specific formula is as follows: ; ; In the formula, A vector of physical parameters; This indicates element-wise multiplication; , , and The parameters obtained from model training; ④ Utilizing the guiding weights of one-dimensional echo signal branches g Guiding weights of 1-dimensional and 2D time-frequency graph branches g2. The physical parameter-guided one-dimensional and two-dimensional features are obtained by adjusting the characteristics of the one-dimensional echo signal branch and the two-dimensional time-frequency graph, respectively. The specific formulas are as follows: ; ; in: Features extracted from one-dimensional echo signal branches; Features extracted from the two-dimensional time-frequency graph branch; and These are one-dimensional and two-dimensional features guided by physical parameters, respectively.
[0018] Optionally, areas with dense underground pipelines can be identified based on existing design drawings, and multiple parallel survey lines can be laid out in these areas. The target background difference enhancement method for underground pipeline material identification also includes: S5: For the preliminary material identification results corresponding to multiple pipeline target points obtained at different survey line intersection locations for the same underground pipeline, a spatial continuity correction strategy is used to correct them to obtain target window-level results and pipeline segment-level results, specifically including: S5.1 Set the size of the target window. Using connected component analysis, nearest neighbor connection or graph clustering methods, the target windows that meet the association conditions on the preprocessed radar data profile are divided into several candidate pipeline groups, and each target window is sorted in order of pipeline mileage from smallest to largest. S5.2, Take the first The maximum value among the three class probabilities of a target window is used as the recognition quality of that target window. ; S5.3, for the first candidate pipeline within the same candidate pipeline group For each target window, a neighborhood is constructed centered on the current target window, consisting of several target windows within a defined distance range along the pipeline mileage direction. For the nth target window within this neighborhood... Each target window is assigned a neighborhood weight based on its distance along the pipeline, difference in burial depth, and identification quality from the current target window. The specific formula is as follows: ; in: and The first The and the first The pipeline mileage along each target window; and The estimated burial depths of pipelines corresponding to the two target windows acquired by the radar are respectively; The attenuation coefficient is the distance along the pipeline. The attenuation coefficient is the difference in burial depth. For the first j The recognition quality of each target window; S5.4. Based on the neighborhood weights obtained above, for the... The neighborhood reference probability is obtained by weighting the class probabilities of each target window within the neighborhood of each target window. S5.5 Identify isolated abnormal results and material change points; S5.6 For target windows that are determined to be isolated abnormal results or whose identification confidence is lower than a preset threshold, the original category probability of the target window is fused with the neighborhood reference probability to obtain the corrected category probability. S5.7, the first point obtained after dividing the material change points. g For each pipeline segment, the corrected category probabilities are weighted and averaged based on the recognition quality of each target window within that pipeline segment to obtain the overall probability. S5.8. Calculate the overall identification confidence level based on the overall probability. When the overall confidence level is lower than the set threshold or the number of effective target windows is insufficient, mark the pipeline segment as low confidence or pending manual verification, and output the following results: measurement point location, estimated burial depth, category probability after correction for the three materials, preliminary identification result, overall probability, identification confidence level, and target window level results for low confidence marking. S5.9 Output pipeline segment-level results based on the plane coordinates of the target window and the radar wave two-way travel time and estimated propagation velocity corresponding to the hyperbola vertex.
[0019] Optionally, in S5.1, the association condition is as follows: when the distance between two target windows in the plane is less than a preset spatial distance threshold, the estimated burial depth difference is less than a preset depth threshold, and the local pipeline orientation difference is less than a preset direction threshold, then the two target windows are initially associated as adjacent target windows on the same underground pipeline. In S5.1, the pipeline mileage is obtained as follows: for each candidate pipeline group, the pipeline centerline is fitted according to the planar coordinates of each target, and each target is projected onto the pipeline centerline to obtain the corresponding pipeline mileage. S5.5 includes: The first The category with the highest probability is initially identified for each target window and used as the initial material category for the current target window. The category with the highest probability in the neighborhood is used as the dominant material category in the neighborhood. Determine whether the initial material category of the target window is consistent with the dominant material category of its neighborhood. If so, retain the preliminary identification result of the current target window. Otherwise, further determine whether the current target window is an isolated anomalous result. If the following conditions are met simultaneously, the target window is determined to be an isolated anomalous result. If not, retain the preliminary identification result of the current target window: ① The recognition quality of the current target window is lower than the preset quality threshold; ② The maximum category probability of the current target window is lower than the preset confidence threshold; ③ The dominant category of multiple adjacent target windows before and after the current target window is consistent; ④ The average probability of the dominant category in the neighborhood is higher than a preset threshold; ⑤ There are no sudden changes in burial depth exceeding the change threshold or pipeline location interruptions between the current target window and adjacent target windows; When the initial material category of the same pipeline changes before and after a certain position, and the new material category remains unchanged in multiple consecutive target windows, and the probability of the new material category is higher than that of other materials, and the corresponding target echo has a complete hyperbolic reflection feature, the position is identified as a candidate material change point. The pipeline is divided into different segments based on candidate material change points, and the material category of each segment is determined. Continuity smoothing is performed without crossing these points. Specifically: ① For candidate material change points, assign the target windows on both sides of the candidate material change point to different pipeline segments; ② The neighborhood of the target window to the left of the candidate material change point does not include the target window within the pipeline segment on the right, and the target window to the right of the change point does not include the target window within the pipeline segment on the left. If different initial material categories only appear in locally discontinuous target windows, and both the areas before and after the locally discontinuous target window are identified as another initial material category, and any of the following conditions exist, then the corresponding target window is determined to be an isolated abnormal result: ① Among the three categories of probability of the target window, the differences between each pair are all lower than the set difference threshold; ② The hyperbolic reflection of the target window class is incomplete; ③ The target is obstructed; ④ There is interference in the background reference area.
[0020] In addition, the present invention also provides a readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the target background difference enhancement method for underground pipeline material identification as described above.
[0021] The present invention also provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the computer program instructions are executed by the processor using the target background difference enhancement method for underground pipeline material identification as described above. This invention's technical solution, after acquiring ground-penetrating radar data of underground pipelines, first performs data preprocessing and pipeline target region extraction; then, based on the pipeline target echo window and a background reference window at the same depth, it constructs target-background difference enhancement features; next, it inputs the one-dimensional echo signal, two-dimensional time-frequency difference map, and physical compensation parameters into a bi-branch cross-attention material discrimination model; finally, it outputs the probability and confidence level of whether the pipeline belongs to a metal pipe, concrete pipe, or plastic pipe, and corrects the identification results by incorporating pipeline continuity. This invention first extracts the pipeline target region and then compares it with the background region at the same depth, thereby effectively reducing the impact of image brightness, burial depth attenuation, and soil background changes on the identification results, thus improving identification accuracy and stability. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the method for identifying underground pipeline materials with enhanced target-background difference in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the construction of the target echo window and the background reference window in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the dual-branch cross-attention material discrimination model in an embodiment of the present invention; Figure 4 This is a schematic diagram of a typical hyperbolic response of a metal tube in a ground-penetrating radar B-scan image in an embodiment of the present invention; Figure 5 This is a schematic diagram of a typical hyperbolic response of a concrete pipe in a ground-penetrating radar B-scan image in an embodiment of the present invention; Figure 6 This is a schematic diagram of a typical hyperbolic response of a plastic pipe in a ground-penetrating radar B-scan image in an embodiment of the present invention; Figure 7 This is a schematic diagram of the amplitude characteristics of the A-scan image of the metal pipe at the center position of the pipeline in an embodiment of the present invention; Figure 8 This is a schematic diagram of the amplitude characteristics of the A-scan image of the concrete pipe at the center position of the pipeline in an embodiment of the present invention; Figure 9 This is a schematic diagram of the amplitude characteristics of the A-scan image of the plastic pipe at the center position of the pipeline in an embodiment of the present invention; Figure 10 This is a schematic diagram of the wavelet time-frequency energy distribution characteristics of the metal pipe at the center of the pipeline in an embodiment of the present invention; Figure 11 This is a schematic diagram of the wavelet time-frequency energy distribution characteristics of the concrete pipe at the center of the pipeline in an embodiment of the present invention; Figure 12 This is a schematic diagram of the wavelet time-frequency energy distribution characteristics of the plastic pipe at the center of the pipeline in an embodiment of the present invention.
[0024] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0026] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0027] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0028] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0029] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0030] See Figure 1 This invention proposes a method, medium, and device for identifying underground pipeline materials by enhancing target-background differences, aiming to solve the problems of insufficient identification accuracy and low stability of existing methods.
[0031] See Figures 1 to 3 This embodiment provides a method for identifying the material of underground pipelines by enhancing the difference between the target and the background, including the following steps: S1: Acquire ground-penetrating radar data of underground pipelines in the area to be tested; S1 includes: A survey line is laid out in the area to be tested; in this embodiment, the survey line is the movement trajectory of the ground penetrating radar antenna on the ground; a "survey point" is an original sampling point at each antenna sampling position; the recognition result is a ground penetrating radar image.
[0032] Ground-penetrating radar (GPR) was used to scan underground pipelines in the area under test, obtaining GPR data including multiple A-scan signals. Simultaneously, the start and end coordinates of the survey line, sampling interval, rangefinder wheel information, radar antenna center frequency, time window, number of sampling points, and on-site soil conditions were recorded. Each A-scan signal represents the echo amplitude of the radar at a specific measurement point over time. Multiple A-scan signals were arranged along the survey line direction to form a B-scan image. (See also...) Figures 4 to 6 The images shown, in order, depict typical hyperbolic responses of metal pipes, concrete pipes, and plastic pipes in ground-penetrating radar B-scan images. See also... Figures 7 to 9 The images show the amplitude characteristics of the A-scan image at the center of the pipeline in the B-scan images of the ground-penetrating radar, which are, in order, metal pipe, concrete pipe, and plastic pipe.
[0033] In this embodiment, areas with dense underground pipelines are determined based on existing design drawings, and multiple parallel survey lines are laid out in these areas. S2: Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, and extract the pipeline target area from the radar data profile; S2 includes: S2.1. Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, wherein: data preprocessing includes one or more of the following: zero-time correction, DC removal, background removal, bandpass filtering, gain compensation, normalization, outlier removal, and offset imaging. S2.2 Extract multiple pipeline target areas from the preprocessed radar data profile; This embodiment extracts pipeline target regions from preprocessed radar profiles. This step can be achieved by one or more of the following methods: manual selection, hyperbola fitting, edge detection, target detection network, or semantic segmentation network.
[0034] S2.3 For each pipeline target area, determine its hyperbola vertex position, target lateral range, target longitudinal time range, and estimated pipeline burial depth, and crop to obtain a local radar image block containing hyperbola reflection characteristics, while retaining its spatial coordinates and temporal depth information in the original survey line.
[0035] This embodiment uses data preprocessing to enhance pipeline reflection signals and reduce the impact of direct surface waves, horizontal layered background, random noise, and system noise on the identification results. The preprocessed data retains the correspondence between each A-scan signal and B-scan image, so that after determining the pipeline target location, the target echo window and the background reference window at the same depth can be accurately traced back.
[0036] S3: Define the target echo window and background reference window within the pipeline target area, and construct the target background difference enhancement feature of the pipeline target area based on the target echo window and background reference window; S3 includes: The A-scan signal near the apex of the hyperbola within the pipeline target area and its neighboring B-scan local area are used as the target echo window; The target background difference enhancement feature is constructed by selecting areas that do not contain pipeline reflections on the left and right sides or within the same depth range of the target echo window as background reference windows; Spectral analysis and time-frequency analysis were performed on the target echo window and the background reference window, respectively, to obtain the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution. The target-background difference enhancement features relative to the background echo are calculated based on the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution. In this embodiment, the target-background difference enhancement features include the target-background spectral ratio, target-background energy ratio, target-background time-frequency energy difference map, and frequency attenuation features after depth compensation. By constructing target-background difference enhancement features for the pipeline target area, this embodiment can reduce the influence of burial depth, soil moisture content, soil dielectric constant, on-site noise, and equipment gain differences on material judgment, making the model more focused on the radar response differences caused by the pipeline material itself, rather than simply learning the brightness differences or hyperbolic shape differences of radar images.
[0037] S4: Input the target echo window, background reference window, and target background difference enhancement features into the pre-trained dual-branch cross-attention material discrimination model, and output the recognition results respectively. The recognition results are the probability and confidence of the pipeline belonging to different underground pipeline materials.
[0038] To further improve the accuracy and stability of underground pipeline material identification, this invention does not directly input the entire ground-penetrating radar B-scan image into a conventional target detection network for material determination, nor does it rely solely on manually extracted spectral and time-frequency features for conventional machine learning classification. Instead, it constructs an underground pipeline material discrimination model based on a target-background difference enhancement and physical constraint cross-attention mechanism. This model takes the pipeline target echo window, the background reference window at the same depth, spectral difference features, the time-frequency difference map, and burial depth compensation parameters as input, and outputs the probability value of whether the underground pipeline belongs to a metal pipe, concrete pipe, or plastic pipe, as well as the final material identification result.
[0039] In step S4, the dual-branch cross-attention material discrimination model includes an input layer, a one-dimensional echo signal branch, a two-dimensional time-frequency graph branch, a physical parameter-guided branch, a cross-attention fusion module, and a classification layer. (1) The input layer averages the multi-channel A-scan signals in the target echo window and the background reference window respectively to obtain the target representative echo signal and the background representative echo signal, and normalizes the target echo and the background echo to obtain the target-background normalized difference signal; specifically: For each pipeline target area, a target echo window is extracted within the apex of the pipeline hyperbola and its left and right neighborhoods. The target echo window contains several A-scan signals, each containing the same number of time sampling points. Simultaneously, regions without underground pipeline reflection signals are selected within the same depth range on both sides of the target echo window as background reference windows. The background reference windows can be set to the left, right, or both sides of the target window. When effective backgrounds exist on both sides, both backgrounds can be used simultaneously; when one side's background is interfered with by other targets, only the other effective background can be used. The multiple A-scan signals within the target echo window and background reference window are averaged to obtain the target representative echo signal and the background representative echo signal. ; ; In the formula, The representative echo signal of the target window; The background window represents the echo signal; and These represent the number of A-scan channels contained within the target window and the background window, respectively. Number the sampled values. and These represent the first in the corresponding window. The first A-scan signal Each sample value.
[0040] Using multi-channel signal averaging can reduce the impact of random noise, outliers, and local interference in single-channel echoes on material identification results. To reduce amplitude differences caused by different burial depths, soil backgrounds, and equipment gains, the mean and standard deviation of the background echo signal are used as a unified reference to normalize the target echo and background echo, and the target-background normalized difference signal is calculated: ; In the formula, and These are the mean and standard deviation of the background echo signal, respectively. A small positive number set to prevent the denominator from being zero.
[0041] (2) The input end of the one-dimensional echo signal branch is connected to the output end of the input layer. The one-dimensional echo signal branch performs short-time Fourier transform on the target echo signal and the background echo signal to obtain the target time spectrum and the background time spectrum, and then calculates the target time spectrum energy map and the background time spectrum energy map respectively. The difference between the two is calculated in the logarithmic domain to obtain the target and background time frequency difference map. In this embodiment, the target echo signal, the background echo signal, and the target-background normalized difference signal together constitute the input of the one-dimensional echo signal branch. Specifically, they can be arranged in three channels, where the first channel is the normalized target echo signal, the second channel is the normalized background echo signal, and the third channel is the target-background normalized difference signal.
[0042] The one-dimensional echo signal branch in this embodiment is used to process the A-scan signal and its depth-compensated normalized signal within the target echo window. This branch preferably employs a one-dimensional convolutional network and a dilated convolutional structure to extract the temporal features, multiple reflection interval features, energy attenuation features, and local waveform distortion features of the target echo. Through this branch, the differences in reflection intensity, echo duration, and multiple reflection response between pipelines of different materials can be obtained. Specifically: To ensure consistent input lengths across different samples, the one-dimensional input signals are first processed to achieve a uniform length. Ideally, each input channel is resampled to 512 sampling points. When the original signal length is less than 512 sampling points, zero-padding, mirror padding, or boundary repetition can be used to fill the gap. When the original signal length exceeds 512 sampling points, a fixed length of signal is extracted centered on the moment of reflection from the pipeline target.
[0043] The one-dimensional echo signal branch first sets up an initial one-dimensional convolutional layer. This convolutional layer preferably uses a kernel of length 7 and has 32 output channels. Following the convolutional layer are a batch normalization layer, a ReLU activation layer, and a max-pooling layer. The initial convolutional layer is used to extract local peaks, troughs, polarity changes, and short-term oscillations in the target echo. The max-pooling layer is used to reduce the time series length and improve the model's adaptability to local time shifts. After the initial convolutional processing, three residual dilated convolutional units are set up sequentially. The number of output channels for the three residual dilated convolutional units can be set to 64, 96, and 128, respectively, and the dilation rate can be set to 1, 2, and 4, respectively. Each residual dilated convolutional unit includes two one-dimensional convolutional layers, a batch normalization layer, and a ReLU activation layer, with shortcut connections configured.
[0044] When the number of input channels is the same as the number of output channels, shortcut connections can directly use identity mapping; when the number of channels is different, the number of channels is adjusted by one-dimensional convolution with a kernel length of 1.
[0045] By setting different dilation rates, the network can gradually expand its temporal receptive field without significantly increasing the number of parameters. Smaller dilation rates primarily extract the local morphology near the main reflected wave, while larger dilation rates are used to extract the time interval between the main reflected wave and subsequent reflections, as well as energy attenuation features over a longer time range. A channel attention module is set after the third residual dilated convolutional unit. The channel attention module first performs global average pooling on each feature channel along the temporal direction, and then generates weights for each channel through two fully connected layers. The weight values are constrained between 0 and 1 by the Sigmoid function and multiplied by the corresponding feature channel.
[0046] Through the channel attention module, the model can automatically increase the attention given to material-sensitive feature channels such as reflection polarity, main reflection peak, multiple reflections, and energy attenuation, while reducing the weight of feature channels with high noise or weak correlation with material recognition. Subsequently, a one-dimensional convolution with a kernel length of 1 is used to map the number of feature channels to a unified feature dimension, preferably set to 128 dimensions, while preserving the temporal position order, forming a one-dimensional echo feature sequence F1.
[0047] (3) The input end of the two-dimensional time-frequency diagram branch is connected to the output end of the one-dimensional echo signal branch. The two-dimensional time-frequency diagram branch retains the target echo logarithmic time-frequency energy diagram, the background echo logarithmic time-frequency energy diagram and the target background time-frequency difference diagram at the same time, so that the two-dimensional time-frequency diagram branch can not only learn the time-frequency response of the underground pipeline target itself, but also learn the degree of change of the pipeline echo relative to the surrounding background. In this embodiment, short-time Fourier transforms are further performed on the target echo signal and the background echo signal, respectively. Let... For window functions, The time frame number,k For frequency serial number, H Move the window by a step size. N w Let be the window length, then the short-time Fourier transform is expressed as: According to the above formula, Spectrum of the target time and background time spectrum .
[0048] Considering that radar echo energy varies with time and frequency, the energy of the target time spectrum and the background time spectrum are calculated separately, and the difference between the two is calculated in the logarithmic domain to obtain the target-background time-frequency difference map. : ; The input to the two-dimensional time-frequency map branch in this embodiment can consist of three channels: the target echo logarithmic time-frequency energy map, the background echo logarithmic time-frequency energy map, and the target-background time-frequency difference map. By simultaneously retaining information about the target, the background, and their differences, the two-dimensional time-frequency map branch can learn the time-frequency response of the underground pipeline target itself and the degree of change in the pipeline echo relative to the surrounding background. See also... Figures 10 to 12 The images show the wavelet time-frequency energy distribution characteristics at the center of the pipeline in the ground-penetrating radar B-scan images of metal pipes, concrete pipes, and plastic pipes, respectively.
[0049] This embodiment is used to process the target background time-frequency difference map obtained by short-time Fourier transform, wavelet transform, or S-transform. This branch preferably employs a lightweight two-dimensional convolutional network and a multi-scale convolutional structure to extract features such as local high-frequency response, low-frequency energy distribution, time-frequency peak location, frequency decay trend, and time-frequency energy accumulation regions. To enhance the model's ability to focus on features in different frequency bands and time periods, channel attention or coordinate attention mechanisms are introduced into this branch, enabling the model to automatically strengthen its response to material-sensitive frequency bands and key reflection time windows. Specifically: First, the 2D time-frequency input image is uniformly adjusted to a fixed size, preferably 128×128 pixels, and composed of three input channels: target time-frequency image, background time-frequency image, and target-background difference image. The 2D time-frequency image branch first sets up a 3×3 convolutional layer with 32 output channels, followed by a batch normalization layer and a ReLU activation layer. This convolutional layer is used to initially extract energy boundaries, local bright spots, and frequency variation features from the time-frequency image.
[0050] Then, three multi-scale residual convolutional units are set up sequentially, with the number of output channels set to 64, 96, and 128 respectively. Each multi-scale residual convolutional unit includes three parallel convolutional branches: The first convolutional branch uses a 3×3 convolutional kernel to extract local time-frequency textures, energy edges, and local abrupt changes; the second convolutional branch uses a 5×5 convolutional kernel to extract the energy accumulation range, main frequency bandwidth, and time-frequency profile over a larger area; the third convolutional branch uses a 3×3 dilated convolution with an expansion rate of 2 to extract frequency attenuation and energy diffusion features across time frames and frequency bands.
[0051] The outputs of the three parallel convolutional branches are concatenated along the channel direction, then compressed through a 1×1 convolution, and added to the shortcut mapping result of the input features to form a multi-scale residual output. Max pooling layers or convolutional layers with a stride of 2 are set between each multi-scale residual convolutional unit to gradually reduce the size of the time-frequency feature map and expand the receptive field.
[0052] A coordinate attention module is set after the last multi-scale residual convolutional unit. The coordinate attention module pools and encodes the 2D features along both the temporal and frequency directions, generating temporal and frequency-direction attention weights. Temporal attention highlights the primary reflection time, subsequent reflection times, and energy duration of the pipeline target; frequency attention highlights the sensitive frequency bands, dominant frequency variations, high-frequency attenuation, and low-frequency energy accumulation features corresponding to different pipeline materials. The temporal and frequency-direction attention weights are applied together to the 2D feature map, enabling the network to clearly distinguish "when an important response occurs" and "within which frequency range an important response occurs."
[0053] The two-dimensional feature map is then unfolded according to its spatial location and transformed to the same feature dimension as the one-dimensional branch through a 1×1 convolution or fully connected mapping layer, preferably 128 dimensions, to obtain the two-dimensional time-frequency feature sequence F2.
[0054] (4) The physical parameter guidance branch inputs the estimated burial depth of the pipeline, the center frequency of the radar antenna, the signal-to-noise ratio of the target echo, the background energy level, the target background energy ratio, and the target background spectrum ratio into the multilayer perceptron to form a physical compensation vector. The physical compensation vector is used to adjust the weights of the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency diagram branch to obtain the one-dimensional and two-dimensional features after physical parameter guidance. In this embodiment, parameters such as estimated pipeline burial depth, radar antenna center frequency, target echo signal-to-noise ratio, background energy level, target-to-background energy ratio, and target-to-background spectrum ratio are input into a multilayer perceptron to form a physical compensation vector. This physical compensation vector is used to adjust the weights of features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency map branch. Specifically: The standardized physical parameter vectors are sequentially input into two layers of a multilayer perceptron. The first fully connected layer can have 64 neurons, and the second fully connected layer can have 128 neurons. After each layer, a ReLU activation function and a Dropout layer are applied to obtain the physical parameter embedding features.
[0055] When the pipeline is buried at a large depth, the background attenuation is strong, or the signal-to-noise ratio is low, the physical parameter-guided branch can appropriately reduce the weight of the absolute amplitude feature and increase the weight of the target background difference, spectrum morphology, and time-frequency energy distribution features; when the pipeline is buried at a shallow depth and the echo quality is high, the model can increase the weight of strong reflection peaks and multiple reflection features.
[0056] In this embodiment, the specific process of weighting the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency plot branch using the physical compensation vector is as follows: ① The physical compensation vector is standardized to obtain the standardized physical parameter vector; ② The standardized physical parameter vector is sequentially input into two layers of multilayer perceptron to obtain the physical parameter embedding features. Both layers of multilayer perceptron use fully connected networks, and each fully connected network is followed by a ReLU activation function and a Dropout layer. ③ Embed the physical parameters into the feature inputs of two independent fully connected layers and a Sigmoid function to generate guiding weights for the one-dimensional echo signal branch. Guiding weights of two-dimensional time-frequency graph branches g 2; The specific formula is as follows: ; ; In the formula, A vector of physical parameters; This indicates element-wise multiplication; , , and The parameters obtained from model training; ④ Utilizing the guiding weights of one-dimensional echo signal branches g Guiding weights of 1-dimensional and 2D time-frequency graph branches g 2. The physical parameter-guided one-dimensional and two-dimensional features are obtained by adjusting the characteristics of the one-dimensional echo signal branch and the two-dimensional time-frequency graph, respectively. The specific formulas are as follows: ; ; in: Features extracted from one-dimensional echo signal branches; Features extracted from the two-dimensional time-frequency graph branch; and These are one-dimensional and two-dimensional features guided by physical parameters, respectively.
[0057] (5) Input the one-dimensional features, two-dimensional features and physical compensation vector output by the physical parameter-guided branch after physical parameter guidance into the cross-attention fusion module to obtain the fusion features for underground pipeline material identification; In this embodiment, waveform features extracted from the one-dimensional echo signal branch, time-frequency features extracted from the two-dimensional time-frequency map branch, and physical compensation vectors output from the physical parameter-guided branch are input into the cross-attention fusion module. In the cross-attention fusion module, the one-dimensional echo features provide time response information of the target reflection, the two-dimensional time-frequency features provide the frequency / time joint distribution information of the target reflection, and the physical compensation vector-guided model automatically adjusts the importance of different features based on burial depth, background attenuation, and signal quality, thereby forming fused features more suitable for identifying underground pipeline materials.
[0058] To avoid simply splicing one-dimensional echo features and two-dimensional time-frequency features, this invention sets up a bidirectional cross-attention fusion module to establish the correspondence between one-dimensional time response and two-dimensional time-frequency energy distribution.
[0059] A multi-head cross-attention structure is preferred, with the number of attention heads set to 4. Features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency graph branch are used to generate query matrices, key matrices, and value matrices through linear mapping, respectively. First, using the one-dimensional echo feature as the query and the two-dimensional time-frequency feature as the key and value, the one-dimensional branch can extract the corresponding frequency and energy information from the two-dimensional time-frequency feature based on the specific reflection time. Then, using the two-dimensional time-frequency feature as the query and the one-dimensional echo feature as the key and value, the two-dimensional branch can extract information such as reflection polarity, main reflection time, multiple reflection intervals, and waveform duration from the one-dimensional waveform feature based on the specific time-frequency region. The bidirectional cross-attention calculation is represented as follows: ; ; In the formula, The cross-fusion feature is obtained by supplementing one-dimensional echo features with information from two-dimensional time-frequency features; The first feature is a cross-fusion feature obtained by supplementing two-dimensional time-frequency features with information from one-dimensional echo features. Q1, K1, and V1 are the query matrix, key matrix, and value matrix obtained by linear mapping of the one-dimensional echo features, respectively. Q1, K1, and V1 are obtained by mapping the one-dimensional echo features. Q2, K2, and V2 are the query matrix, key matrix, and value matrix obtained by linear mapping of the two-dimensional time-frequency features, respectively. Q2 is obtained by mapping the two-dimensional time-frequency features. K 2 and V 2. Obtained by two-dimensional time-frequency feature mapping; dThis represents the feature dimension of a single attention head. The linear mapping can be implemented through a fully connected mapping layer in the model.
[0060] The cross-attention output is added to the residuals of the original one-dimensional and two-dimensional features, respectively, and then passed through layer normalization, a feedforward neural network, and a second residual connection to obtain the enhanced one-dimensional and two-dimensional fused features. Subsequently, global average pooling is performed on the enhanced one-dimensional and two-dimensional feature sequences to obtain a one-dimensional echo fusion vector and a two-dimensional time-frequency fusion vector. These two fused vectors are concatenated with the physical parameter embedding vector to form the final material discrimination fusion feature. This fused feature simultaneously includes information such as the underground pipeline reflection waveform, time location, sensitive frequency band, time-frequency energy distribution, target background differences, and pipeline burial depth, enabling a more comprehensive description of the radar response differences between metal pipes, concrete pipes, and plastic pipes.
[0061] (6) Input the fusion features of underground pipeline material identification into the classification layer and output the probability values and corresponding confidence levels of the target pipeline belonging to metal pipe, concrete pipe and plastic pipe respectively.
[0062] This embodiment integrates feature inputs into the classification layer and outputs probability values for the target pipeline to belong to metal pipe, concrete pipe, and plastic pipe: .in, This represents the probability that the target pipeline is a metal pipe. This represents the probability that the target pipeline is a concrete pipe. This indicates the probability that the target pipeline is a plastic pipe. The category with the highest probability value is taken as the initial material identification result, and the corresponding confidence level is output. When the highest probability is lower than a set threshold, the target is marked as a low-confidence result, indicating that further confirmation is needed by combining manual interpretation, pipeline records, or on-site verification.
[0063] The final fused features are input into the classification layer. The classification layer may include a fully connected layer, a ReLU activation layer, a Dropout layer, and a fully connected layer with three output nodes. The three output nodes correspond to metal pipes, concrete pipes, and plastic pipes, respectively.
[0064] The softmax function is used to convert the classification layer output score into the category probabilities corresponding to the three materials. ; In the formula, The output of the classification layer c Material type score; The output of the classification layer r Material type score, P c The target pipeline belongs to the first c The probability of different material types; the three categories are metal pipes, concrete pipes, and plastic pipes.
[0065] The category with the highest probability value is used as the initial material identification result for a single target window, and the probability of the highest category is used as the initial identification confidence level. When the probability of the highest category is higher than the preset confidence threshold, the corresponding material category is output; when the probability of the highest category is lower than the preset confidence threshold, the target window is marked as a low-confidence result, and continuity correction is performed in S7 by combining the identification results of adjacent measurement points and adjacent measurement lines.
[0066] The number of convolutional layers, kernel size, number of network channels, dilation rate, number of attention heads, and feature dimensions mentioned above are all preferred implementations. They can be adjusted according to the number of sampling points of the ground penetrating radar equipment, the scale of training data, and computing resources, but the overall structure of one-dimensional echo signal branch, two-dimensional time-frequency map branch, physical parameter-guided branch, and cross-attention fusion should be retained.
[0067] In this embodiment, the model training samples include numerical simulation samples, indoor model test samples, and field measured samples. For each sample, the target echo window, background reference window, spectral difference features, and time-frequency difference map are extracted according to the aforementioned steps, and their corresponding real material categories are labeled. The training process of the dual-branch cross-attention material discrimination model is as follows: classification loss, contrast constraint loss, physical consistency loss, and domain adaptation loss are jointly optimized. Among them, the classification loss is used to ensure that the model correctly outputs the categories of metal pipe, concrete pipe, and plastic pipe; the contrast constraint loss is used to make the fusion characteristics of pipelines of the same material more similar under different burial depths and different soil conditions, and to make the fusion characteristics of pipelines of different materials more distinct; the physical consistency loss is used to constrain the model output results to be consistent with the normalized energy response, spectral attenuation law, and time-frequency peak distribution of the target background; the domain adaptation loss is used to reduce the distribution difference between numerical simulation data and field measured data, and improve the model's generalization ability in real engineering scenarios.
[0068] In this embodiment, the one-dimensional echo signal branch can be implemented using a one-dimensional convolutional neural network, a temporal convolutional network, or a lightweight Transformer network; the two-dimensional time-frequency graph branch can be implemented using a lightweight convolutional neural network, a residual network, or a multi-scale attention network; and the classification layer can be implemented using classifiers such as Softmax classifier, support vector machine, random forest, or XGBoost as alternative implementation methods.
[0069] The target background difference enhancement method for underground pipeline material identification also includes: S5: For the preliminary material identification results corresponding to multiple pipeline target points obtained at different survey line intersection locations for the same underground pipeline, a spatial continuity correction strategy is used to correct them to obtain target window-level results and pipeline segment-level results. Since the material identification results of a single target window may be affected by factors such as local noise, road joints, uneven backfill material, pipeline intersections, target window truncation errors, and occasional electromagnetic interference, and considering that the same continuous underground pipeline usually has the same or continuously changing material properties in adjacent locations, this embodiment utilizes the target spatial location, estimated pipeline burial depth, local pipeline direction, category probability, and signal quality to correlate adjacent target windows, perform probability smoothing, and correct abnormal results. Specifically, this includes: S5.1 Set the size of the target window. Using connected component analysis, nearest neighbor connection or graph clustering methods, the target windows that meet the association conditions on the preprocessed radar data profile are divided into several candidate pipeline groups, and each target window is sorted in order of pipeline mileage from smallest to largest. In this embodiment, for each target window that has completed preliminary material identification, information such as its survey line number, survey point coordinates, hyperbola vertex position, estimated burial depth, local pipeline direction, category probability, identification confidence level, target echo signal-to-noise ratio, and target background energy ratio is saved. Target windows that meet the association conditions are constructed into a pipeline target map, where each target window is a node, and the association relationships between adjacent targets are connected edges. Through connected component analysis, nearest neighbor connectivity, or graph clustering methods, all targets are divided into several candidate pipeline groups.
[0070] In S5.1, the association condition is as follows: when the distance between two target windows in the plane is less than a preset spatial distance threshold, the estimated burial depth difference is less than a preset depth threshold, and the local pipeline orientation difference is less than a preset direction threshold, then the two target windows are initially associated as adjacent target windows on the same underground pipeline. In S5.1, the pipeline mileage is obtained as follows: for each candidate pipeline group, the pipeline centerline is fitted according to the planar coordinates of each target, and each target is projected onto the pipeline centerline to obtain the corresponding pipeline mileage. S5.2, Take the first The maximum value among the three class probabilities of a target window is used as the recognition quality of that target window. ; S5.3, for the first candidate pipeline within the same candidate pipeline group For each target window, a neighborhood is constructed centered on the current target window, consisting of several target windows within a defined distance range along the pipeline mileage direction. For the nth target window within this neighborhood... Each target window is assigned a neighborhood weight based on its distance along the pipeline, difference in burial depth, and identification quality from the current target window. The specific formula is as follows: ; in: and The first The and the first The pipeline mileage along each target window; and The estimated burial depths of pipelines corresponding to the two target windows acquired by the radar are respectively; The attenuation coefficient is the distance along the pipeline. The attenuation coefficient is the difference in burial depth. For the first j The recognition quality of each target window; In this embodiment, the closer the spatial distance between an adjacent window and the current window, the closer their estimated burial depths, and the higher their own recognition quality, the greater their corresponding neighborhood weight. For target windows located at the end of pipelines, continuity can be determined using only one side of adjacent targets. If the number of valid targets in the neighborhood is insufficient, no forced correction is performed; instead, the original recognition results and corresponding confidence levels are retained.
[0071] S5.4. Based on the neighborhood weights obtained above, for the... The neighborhood reference probability is obtained by weighted averaging the class probabilities of each target window within its neighborhood; the specific formula for calculating the neighborhood reference probability is as follows: In the formula, N i For the first i The set of neighboring targets of each target window; P j,c For the neighboring region j The target belongs to the first c The probability of a material type; For the neighborhood pair of the first i The target window belongs to the first c Reference probability of material type.
[0072] The neighborhood reference probability reflects the comprehensive judgment of the material category by the adjacent positions before and after the current target. Compared with simply using the majority vote of adjacent measurement points, the method also considers the distance between adjacent targets, the difference in burial depth, and the recognition quality.
[0073] S5.5 Identify isolated abnormal results and material change points; S5.5 includes: The first The category with the highest probability is initially identified for each target window and used as the initial material category for the current target window. The category with the highest probability in the neighborhood is used as the dominant material category in the neighborhood. Determine whether the initial material category of the target window is consistent with the dominant material category of its neighborhood. If so, retain the preliminary identification result of the current target window. Otherwise, further determine whether the current target window is an isolated anomalous result. If the following conditions are met simultaneously, the target window is determined to be an isolated anomalous result. If not, retain the preliminary identification result of the current target window: ① The recognition quality of the current target window is lower than the preset quality threshold; ② The maximum category probability of the current target window is lower than the preset confidence threshold; ③ The dominant category of multiple adjacent target windows before and after the current target window is consistent; ④ The average probability of the dominant category in the neighborhood is higher than a preset threshold; ⑤ There are no sudden changes in burial depth exceeding the change threshold or pipeline location interruptions between the current target window and adjacent target windows; In this embodiment, if multiple adjacent targets along the same pipeline are identified as concrete pipes, and only one low-confidence target in the middle is identified as a plastic pipe, then the middle target can be determined as an isolated anomaly.
[0074] When the initial material category of the same pipeline changes before and after a certain position, and the new material category remains unchanged in multiple consecutive target windows, and the probability of the new material category is higher than that of other materials, and the corresponding target echo has a complete hyperbolic reflection feature, the position is identified as a candidate material change point. The pipeline is divided into different segments based on candidate material change points, and the material category of each segment is determined. Continuity smoothing is performed without crossing these points. Specifically: ① For candidate material change points, assign the target windows on both sides of the candidate material change point to different pipeline segments; ② The neighborhood of the target window to the left of the candidate material change point does not include the target window within the pipeline segment on the right, and the target window to the right of the change point does not include the target window within the pipeline segment on the left. If different initial material categories only appear in locally discontinuous target windows, and both the areas before and after the locally discontinuous target window are identified as another initial material category, and any of the following conditions exist, then the corresponding target window is determined to be an isolated abnormal result: ① Among the three categories of probability of the target window, the differences between each pair are all lower than the set difference threshold; ② The hyperbolic reflection of the target window class is incomplete; ③ The target is obstructed; ④ There is interference in the background reference area.
[0075] S5.6 For target windows identified as isolated anomalies or with a confidence level below a preset threshold, the original class probability of the target window is fused with the neighborhood reference probability to obtain the corrected class probability; the specific formula is as follows: In the formula, For the first The target window belonged to the first one before correction. The probability of a material type; The neighborhood reference probability; These are the corrected class probabilities; The retention coefficient is the original recognition result.
[0076] In this embodiment, the retention coefficient is determined based on the recognition quality of the current window and adjacent windows. When the recognition quality of the current window is high, the coefficient is increased. This ensures the correction result is based primarily on the original judgment; when the current window's recognition quality is low, while adjacent windows have consistent and high-quality recognition results, the correction is reduced. This allows the correction results to take into account more neighborhood information.
[0077] After probabilistic fusion is completed, the category with the highest probability is used as the corrected material category for the target window. For windows with high recognition quality and no obvious conflict with the results of their neighbors, their original recognition results are retained without forced correction.
[0078] S5.7, the first point obtained after dividing the material change points. For each pipeline segment, the overall probability is obtained by weighted averaging the corrected category probabilities based on the recognition quality of each target window within that segment; the specific formula is as follows: ; in: P g,c This pipeline segment belongs to the first The overall probability of a material type. This is the set of target windows contained in the pipeline segment; S5.8. Calculate the overall identification confidence level based on the overall probability. When the overall confidence level is lower than the set threshold or the number of effective target windows is insufficient, mark the pipeline segment as low confidence or pending manual verification, and output the following results: measurement point location, estimated burial depth, category probability after correction for the three materials, preliminary identification result, overall probability, identification confidence level, and target window level results for low confidence marking. In this embodiment, the preliminary identification result is the final material category of the pipeline segment. Y g The specific formula is as follows: ; The specific formula for calculating the overall identification confidence level is as follows: ; in: This is an indicator function.
[0079] In this embodiment, the overall identification confidence level considers both the maximum category probability of the pipeline segment and the consistency of the identification results of each target window. When the overall identification confidence level is lower than a set threshold or the number of valid target windows is insufficient, the pipeline segment is marked as low confidence or awaits manual verification.
[0080] S5.9 Output pipeline segment-level results based on the plane coordinates of the target window and the radar wave two-way travel time and estimated propagation velocity corresponding to the hyperbola vertex.
[0081] Specifically, in this embodiment, for each target window, the pipeline burial depth is calculated based on the radar wave two-way travel time and estimated propagation velocity corresponding to the hyperbola vertex. For the same pipeline segment, the average burial depth and burial depth variation range of the pipeline segment are calculated using the identification quality of each target window as a weight. Simultaneously, the pipeline centerline is fitted based on the planar coordinates of each target window to obtain the start point, end point, length, and direction of the pipeline segment. This embodiment finally outputs target window-level results and pipeline segment-level results. Target window-level results include measurement point location, estimated burial depth, probability of the three material categories, preliminary identification results, continuity correction results, identification confidence, and low-confidence markers. Pipeline segment-level results include the start and end points of the pipeline segment, length, average burial depth, final material category, overall probability of the three materials, comprehensive identification confidence, and candidate material variation points.
[0082] When there are significant variations in burial depth or spatial dispersion within a pipeline segment, it may indicate changes in pipeline slope, incorrect target association, or poor local data quality, requiring further verification.
[0083] The output of this embodiment can be visualized and annotated in the ground-penetrating radar B-scan image. Different colors are used to distinguish between metal pipes, concrete pipes, and plastic pipes, and the confidence level is indicated by line type, color depth, or transparency. For pipe segments with low confidence and candidate material change points, corresponding warning marks are used to facilitate manual verification by engineers.
[0084] This embodiment verifies its feasibility through numerical simulation, indoor model testing, and field measurement data, as follows: The feasibility of this invention can be verified through numerical simulation, indoor model testing, and field measurement data.
[0085] (1) Numerical simulation: Electromagnetic wave forward modeling software such as gprMax was used to establish underground pipeline models of different materials, including steel pipes, concrete pipes and plastic pipes, and different burial depths, pipe diameters and soil dielectric constants were set to generate corresponding ground-penetrating radar B-scan data. By extracting spectral and time-frequency features from the simulation data, the differences in dominant frequency, spectral centroid, spectral bandwidth, energy ratio, time-frequency peak position and energy attenuation characteristics of pipelines of different materials can be analyzed, thereby verifying the effectiveness of the feature system proposed in this invention.
[0086] (2) Indoor test: A soil trench model containing pipelines of different materials was constructed. Steel pipes, concrete pipes and plastic pipes were buried at the same or different depths and scanned using ground penetrating radar. The ability of this method to identify pipelines of different materials was verified by preprocessing the measured radar data, intercepting target echoes, extracting spectrum-time frequency features and training the material discrimination model.
[0087] (3) Field application: Select underground pipeline areas with known materials for verification. Compare the identification results of this invention with existing pipeline archives, excavation verification results, or other detection data to evaluate the identification accuracy, recall, and stability. The preliminary expected results are: steel pipes have high identification stability due to their strong reflection and high energy concentration; concrete pipes and plastic pipes can be further distinguished by spectral energy distribution, time-frequency peak characteristics, and background normalized response; the identification effect of using spectral time-frequency fusion features is better than that of single image value features or single image morphology features.
[0088] Compared with existing technologies, the advantages of the target background difference enhancement method for underground pipeline material identification described in this embodiment are: (1) Compared with the scheme of directly using the target detection network to output pipeline material from the whole B-scan image, the target background difference enhancement method for underground pipeline material identification described in this embodiment first extracts the pipeline target window and the background window at the same depth, and then constructs the target background difference enhancement feature. Therefore, it can reduce the impact of image brightness, burial depth attenuation and soil background changes on the identification results.
[0089] (2) Compared with the scheme that only uses STFT, wavelet transform and other methods to generate time spectrum maps and then classifies them, the target background difference enhancement underground pipeline material identification method described in this embodiment does not simply use time frequency maps, but further constructs a target background time frequency difference map, and combines one-dimensional echo waveform and physical parameters to jointly judge the material, which can more comprehensively reflect the radar response of pipelines of different materials.
[0090] (3) Compared with the traditional machine learning model such as XGBoost and random forest used to process artificial features, the target background difference enhancement underground pipeline material identification method described in this embodiment can automatically mine the correlation between waveform features, time and frequency features and physical compensation parameters by co-learning through one-dimensional echo branch, two-dimensional time and frequency map branch and physical parameter guided branch.
[0091] (4) The target-background difference enhancement method for underground pipeline material identification described in this embodiment introduces a physical parameter guidance mechanism, which can dynamically adjust the importance of different features according to the burial depth, background energy, signal-to-noise ratio, and target-background ratio. When the burial depth is large or the background attenuation is strong, the model can reduce the weight of absolute amplitude features and increase the weight of normalized difference features and time-frequency morphological features, thereby improving the identification stability in complex field environments.
[0092] (5) The target background difference enhancement method for underground pipeline material identification described in this embodiment adopts classification loss, contrast constraint loss, physical consistency loss and domain adaptation loss for joint training, which helps to alleviate the distribution difference between simulation data and measured data and improve the model’s generalization ability from numerical simulation, indoor test to field measured data.
[0093] (6) The target background difference enhancement underground pipeline material identification method described in this embodiment not only outputs the material category, but also outputs the category probability and confidence level, and corrects the continuous measurement point results of the same pipeline, which is helpful for engineers to judge the reliability of the results, and is also convenient to be used in conjunction with on-site excavation verification, pipeline archives and other detection methods.
[0094] (7) The target background difference enhancement method for underground pipeline material identification described in this embodiment can be based on conventional ground penetrating radar data to achieve material identification without relying on dual-polarization or fully polarized ground penetrating radar equipment. The on-site implementation cost is relatively low and the scope of application is wide.
[0095] This embodiment also provides a readable storage medium storing computer program instructions, which, when executed by a processor, implement the target background difference enhancement method for underground pipeline material identification as described above.
[0096] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0097] This embodiment also includes an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the computer program instructions are executed by the processor to perform the target background difference enhancement method for underground pipeline material identification as described above.
[0098] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0099] The electronic device can be a mobile phone, desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device may include, but is not limited to, processors and memory. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0100] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0101] The memory can be used to store the computer program and / or modules. The processor implements the computer program by running or executing the computer program and / or modules stored in the memory, and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0102] If the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0103] The above description is only a preferred embodiment of the present invention and does not limit the scope of the present invention. All equivalent structural transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of the present invention.
Claims
1. A method for identifying the material of underground pipelines using target-background difference enhancement, characterized in that, Includes the following steps: S1: Acquire ground-penetrating radar data of underground pipelines in the area to be tested; S2: Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, and extract the pipeline target area from the radar data profile; S3: Define the target echo window and background reference window within the pipeline target area, and construct the target background difference enhancement feature of the pipeline target area based on the target echo window and background reference window; S4: Input the target echo window, background reference window, and target background difference enhancement features into the pre-trained dual-branch cross-attention material discrimination model, and output the recognition results respectively. The recognition results are the probability and confidence of the pipeline belonging to different underground pipeline materials.
2. The target background difference enhancement method for underground pipeline material identification according to claim 1, characterized in that, S1 includes: Set up survey lines in the area to be measured; Ground-penetrating radar (GPR) is used to scan underground pipelines in the area under test to obtain GPR data including multiple A-scan signals. The start and end coordinates of the survey line, sampling interval, rangefinder wheel information, radar antenna center frequency, time window, number of sampling points, and on-site soil conditions are recorded simultaneously. Each A-scan signal represents the echo amplitude of the radar at a certain measurement point over time. Multiple A-scan signals are arranged according to the survey line direction to form a B-scan image.
3. The target background difference enhancement method for underground pipeline material identification according to claim 2, characterized in that, S2 includes: S2.
1. Perform data preprocessing on the ground penetrating radar data to obtain a preprocessed radar data profile, wherein: data preprocessing includes one or more of the following: zero-time correction, DC removal, background removal, bandpass filtering, gain compensation, normalization, outlier removal, and offset imaging. S2.2 Extract multiple pipeline target areas from the preprocessed radar data profile; S2.3 For each pipeline target area, determine its hyperbola vertex position, target lateral range, target longitudinal time range, and estimated pipeline burial depth, and crop to obtain a local radar image block containing hyperbola reflection characteristics, while retaining its spatial coordinates and temporal depth information in the original survey line.
4. The target background difference enhancement method for underground pipeline material identification according to claim 3, characterized in that, S3 includes: The A-scan signal near the apex of the hyperbola within the pipeline target area and its neighboring B-scan local area are used as the target echo window; The target background difference enhancement feature is constructed by selecting areas that do not contain pipeline reflections on the left and right sides or within the same depth range of the target echo window as background reference windows; Spectral analysis and time-frequency analysis were performed on the target echo window and the background reference window, respectively, to obtain the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution. The target-background difference enhancement characteristics of the target echo relative to the background echo are calculated based on the target spectral response, background spectral response, target time-frequency energy distribution, and background time-frequency energy distribution.
5. The target background difference enhancement method for underground pipeline material identification according to claim 4, characterized in that, In step S4, the dual-branch cross-attention material discrimination model includes an input layer, a one-dimensional echo signal branch, a two-dimensional time-frequency graph branch, a physical parameter-guided branch, a cross-attention fusion module, and a classification layer. The input layer averages the multi-channel A-scan signals in the target echo window and the background reference window to obtain the target representative echo signal and the background representative echo signal, and normalizes the target echo and the background echo to obtain the target-background normalized difference signal. The input end of the one-dimensional echo signal branch is connected to the output end of the input layer. The one-dimensional echo signal branch performs short-time Fourier transform on the target echo signal and the background echo signal respectively to obtain the target time spectrum and the background time spectrum. Then, the target time spectrum energy map and the background time spectrum energy map are calculated respectively, and the difference between the two is calculated in the logarithmic domain to obtain the target and background time frequency difference map. The input end of the two-dimensional time-frequency graph branch is connected to the output end of the one-dimensional echo signal branch. The two-dimensional time-frequency graph branch can learn not only the time-frequency response of the underground pipeline target itself, but also the degree of change of the pipeline echo relative to the surrounding background by simultaneously retaining the target echo logarithmic time-frequency energy map, the background echo logarithmic time-frequency energy map, and the target background time-frequency difference map. The physical parameter guidance branch inputs the estimated pipeline burial depth, radar antenna center frequency, target echo signal-to-noise ratio, background energy level, target-background energy ratio, and target-background spectrum ratio into the multilayer perceptron to form a physical compensation vector. The physical compensation vector is used to adjust the weights of the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency graph branch to obtain the one-dimensional and two-dimensional features after physical parameter guidance. The one-dimensional features, two-dimensional features, and physical compensation vectors output by the physical parameter-guided branches are input into the cross-attention fusion module to obtain the fused features for underground pipeline material identification. The fusion features for identifying the material of underground pipelines are input into the classification layer, which outputs the probability values and corresponding confidence levels of the target pipeline belonging to metal pipes, concrete pipes, and plastic pipes, respectively.
6. The target background difference enhancement method for underground pipeline material identification according to claim 5, characterized in that, The specific process of weighting the features extracted from the one-dimensional echo signal branch and the two-dimensional time-frequency plot branch using the physical compensation vector is as follows: ① The physical compensation vector is standardized to obtain the standardized physical parameter vector; ② The standardized physical parameter vector is sequentially input into two layers of multilayer perceptron to obtain the physical parameter embedding features. Both layers of multilayer perceptron use fully connected networks, and each fully connected network is followed by a ReLU activation function and a Dropout layer. ③ Embed the physical parameters into the feature inputs of two independent fully connected layers and a Sigmoid function to generate guiding weights for the one-dimensional echo signal branch. Guiding weights of two-dimensional time-frequency graph branches g 2; The specific formula is as follows: ; ; In the formula, A vector of physical parameters; This indicates element-wise multiplication; , , and The parameters obtained from model training; ④ Utilizing the guiding weights of one-dimensional echo signal branches g Guiding weights of 1-dimensional and 2D time-frequency graph branches g 2. The physical parameter-guided one-dimensional and two-dimensional features are obtained by adjusting the characteristics of the one-dimensional echo signal branch and the two-dimensional time-frequency graph, respectively. The specific formulas are as follows: ; ; in: Features extracted from one-dimensional echo signal branches; Features extracted from the two-dimensional time-frequency graph branch; and These are one-dimensional and two-dimensional features guided by physical parameters, respectively.
7. The target background difference enhancement method for underground pipeline material identification according to any one of claims 1-6, characterized in that, Based on existing design drawings, identify areas with dense underground pipelines and lay out multiple parallel survey lines in these areas. The target background difference enhancement method for underground pipeline material identification also includes: S5: For the preliminary material identification results corresponding to multiple pipeline target points obtained at different survey line intersection locations for the same underground pipeline, a spatial continuity correction strategy is used to correct them to obtain target window-level results and pipeline segment-level results, specifically including: S5.1 Set the size of the target window. Using connected component analysis, nearest neighbor connection or graph clustering methods, the target windows that meet the association conditions on the preprocessed radar data profile are divided into several candidate pipeline groups, and each target window is sorted in order of pipeline mileage from smallest to largest. S5.2, Take the first The maximum value among the three class probabilities of a target window is used as the recognition quality of that target window. ; S5.3, for the first candidate pipeline within the same candidate pipeline group For each target window, a neighborhood is constructed centered on the current target window, consisting of several target windows within a defined distance range along the pipeline mileage direction. For the nth target window within this neighborhood... Each target window is assigned a neighborhood weight based on its distance along the pipeline, difference in burial depth, and identification quality from the current target window. The specific formula is as follows: ; in: and The first The and the first The pipeline mileage along each target window; and The estimated burial depths of pipelines corresponding to the two target windows acquired by the radar are respectively; The attenuation coefficient is the distance along the pipeline. The attenuation coefficient is the difference in burial depth. For the first j The recognition quality of each target window; S5.
4. Based on the neighborhood weights obtained above, for the... The neighborhood reference probability is obtained by weighting the class probabilities of each target window within the neighborhood of each target window. S5.5 Identify isolated abnormal results and material change points; S5.6 For target windows that are determined to be isolated abnormal results or whose identification confidence is lower than a preset threshold, the original category probability of the target window is fused with the neighborhood reference probability to obtain the corrected category probability. S5.7, the first point obtained after dividing the material change points. g For each pipeline segment, the corrected category probabilities are weighted and averaged based on the recognition quality of each target window within that pipeline segment to obtain the overall probability. S5.
8. Calculate the overall identification confidence level based on the overall probability. When the overall confidence level is lower than the set threshold or the number of effective target windows is insufficient, mark the pipeline segment as low confidence or pending manual verification, and output the following results: measurement point location, estimated burial depth, category probability after correction for the three materials, preliminary identification result, overall probability, identification confidence level, and target window level results for low confidence marking. S5.9 Output pipeline segment-level results based on the plane coordinates of the target window and the radar wave two-way travel time and estimated propagation velocity corresponding to the hyperbola vertex.
8. The target background difference enhancement method for underground pipeline material identification according to any one of claims 1-5, characterized in that, In S5.1, the association condition is as follows: when the distance between two target windows in the plane is less than a preset spatial distance threshold, the estimated burial depth difference is less than a preset depth threshold, and the local pipeline orientation difference is less than a preset direction threshold, then the two target windows are initially associated as adjacent target windows on the same underground pipeline. In S5.1, the pipeline mileage is obtained as follows: for each candidate pipeline group, the pipeline centerline is fitted according to the planar coordinates of each target, and each target is projected onto the pipeline centerline to obtain the corresponding pipeline mileage. S5.5 includes: The first The category with the highest probability is initially identified for each target window and used as the initial material category for the current target window. The category with the highest probability in the neighborhood is used as the dominant material category in the neighborhood. Determine whether the initial material category of the target window is consistent with the dominant material category of its neighborhood. If so, retain the preliminary identification result of the current target window. Otherwise, further determine whether the current target window is an isolated anomalous result. If the following conditions are met simultaneously, the target window is determined to be an isolated anomalous result. If not, retain the preliminary identification result of the current target window: ① The recognition quality of the current target window is lower than the preset quality threshold; ② The maximum category probability of the current target window is lower than the preset confidence threshold; ③ The dominant category of multiple adjacent target windows before and after the current target window is consistent; ④ The average probability of the dominant category in the neighborhood is higher than a preset threshold; ⑤ There are no sudden changes in burial depth exceeding the change threshold or pipeline location interruptions between the current target window and adjacent target windows; When the initial material category of the same pipeline changes before and after a certain position, and the new material category remains unchanged in multiple consecutive target windows, and the probability of the new material category is higher than that of other materials, and the corresponding target echo has a complete hyperbolic reflection feature, the position is identified as a candidate material change point. The pipeline is divided into different segments based on candidate material change points, and the material category of each segment is determined. Continuity smoothing is performed without crossing these points. Specifically: ① For candidate material change points, assign the target windows on both sides of the candidate material change point to different pipeline segments; ② The neighborhood of the target window to the left of the candidate material change point does not include the target window within the pipeline segment on the right, and the target window to the right of the change point does not include the target window within the pipeline segment on the left. If different initial material categories only appear in locally discontinuous target windows, and both the areas before and after the locally discontinuous target window are identified as another initial material category, and any of the following conditions exist, then the corresponding target window is determined to be an isolated abnormal result: ① Among the three categories of probability of the target window, the differences between each pair are all lower than the set difference threshold; ② The hyperbolic reflection of the target window class is incomplete; ③ The target is obstructed; ④ There is interference in the background reference area.
9. A readable storage medium, characterized in that, It stores computer program instructions, which, when executed by a processor, implement the target background difference enhancement method for underground pipeline material identification as described in any one of claims 1 to 8.
10. An electronic device, characterized in that, include: The method for identifying underground pipeline materials with enhanced target background differences as described in any one of claims 1 to 8 includes at least one processor, at least one memory, and computer program instructions stored in the memory, wherein the computer program instructions are executed by the processor.
