An underground pipeline parameter detection method, device and equipment based on a multi-modal algorithm and ground penetrating radar
By combining multimodal algorithms and ground-penetrating radar with text and image detection models, the problem of rapid and accurate underground pipeline detection is solved, achieving efficient and reliable acquisition of underground pipeline parameters, which is suitable for complex scenarios and pipelines made of rare materials.
Patent Information
- Application Number
- CN202510545709.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2045-04-28
AI Technical Summary
Existing technologies are insufficient for quickly and accurately detecting the distribution of municipal underground pipe networks, which affects urban renewal and safe operation.
A method for detecting underground pipeline parameters based on multimodal algorithms and ground-penetrating radar is adopted. The GPR images are processed by multimodal detection models and target detection models. By combining text detection results and image detection data, the location, material, diameter and burial depth of underground pipelines are obtained by using weighted summation processing and hyperbola fitting algorithms.
It improves the accuracy and efficiency of underground pipeline parameter detection, is applicable to the detection of pipelines in complex scenarios and with rare materials, and provides an efficient and reliable safety management solution for urban underground spaces.
Smart Images

Figure CN120472463B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus and equipment for detecting underground pipeline parameters based on multimodal algorithms and ground penetrating radar. Background Technology
[0002] Underground pipe networks, as the "lifeline system" maintaining the normal operation of a city, carry multiple functions such as water supply, power supply, gas supply, communication, and drainage. They are fundamental projects to ensure people's well-being and industrial development. Currently, there is an urgent need for a detection method that can quickly and accurately detect the distribution of municipal underground pipe networks, thereby safeguarding urban renewal and the safe and orderly operation of the city. Summary of the Invention
[0003] The purpose of this application is to address at least one of the aforementioned technical deficiencies.
[0004] On the one hand, embodiments of this application provide a method for detecting underground pipeline parameters based on multimodal algorithms and ground-penetrating radar, the method comprising: A GPR image including underground pipelines is acquired and input into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data of the location, material, burial depth and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image. The GPR image is input into the target detection model to obtain the second detection image data, which includes the location and material data of the underground pipeline marked with the second prediction box on the GPR image. Based on the first prediction box, the second prediction box, and the GPR image, the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data are determined. Both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline. Obtain the weights corresponding to the text detection results, the first detection image data, and the second detection image data, and perform weighted summation on the text detection data, the first detection image data, and the second detection image data according to their respective weights to obtain the location detection results and material detection results of the underground pipeline. Based on the weights corresponding to the text detection results, the first detection image data, and the second detection image data, a weighted summation is performed on the text detection data, the first detection data, and the second detection data to obtain the burial depth detection results and pipe diameter detection results of the underground pipeline.
[0005] Optionally, based on the first prediction bounding box, the second prediction bounding box, and the GPR image, determine the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data, including: The GPR image is cropped according to the first predicted bounding box in the first detection image data and the second predicted bounding box in the second detection image data, respectively, to obtain a first cropped GPR image corresponding to the first detection image data and a second cropped GPR image corresponding to the second detection image data; Based on the first detection image data and the second detection image data, image data processing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data.
[0006] Optionally, based on the first detection image data and the second detection image data, image data processing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain first detection data corresponding to the first detection image data and second detection data corresponding to the second detection image data, including: Image preprocessing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the processed first cropped GPR image and the second cropped GPR image; Image processing is performed on the first and second cropped GPR images after processing using the maximum connected component algorithm and the skeletonization algorithm, respectively, to obtain the first skeletonized image and the second skeletonized image including the underground pipeline area. The first skeletonized image and the second skeletonized image are fitted with hyperbolic curves based on the hyperbolic fitting algorithm to obtain the first fitting equation and the second fitting equation. Both the first fitting equation and the second fitting equation include the hyperbolic equation and vertex coordinates. The first detection data is obtained based on the first fitting equation and the coordinates of the first prediction box in the first detection image data; The second detection data is obtained based on the second fitting equation and the coordinates of the second prediction box in the second detection image data.
[0007] Optionally, the width pixels of the GPR image correspond to the actual length of the survey line detected by the radar, and the height pixels of the GPR image correspond to the actual detection depth detected by the radar. The first and second detection data are calculated in the following way: Set the preset position of the GPR image as the origin of the coordinate system, and establish a coordinate system in the GPR image based on the origin of the coordinate system. Each pixel in the horizontal direction of the GPR image represents the length of the survey line, and each pixel in the vertical direction of the GPR image represents the detection depth. The actual survey line length and actual detection depth of the radar capturing GPR images are obtained, and the detection data of the burial depth of underground pipelines are obtained based on the actual survey line length, actual detection depth, fitting equation and coordinate system. Based on the fitted equation, a first coordinate point with a distance set to the left of the vertex coordinates and a second coordinate point with a distance set to the right of the vertex coordinates are determined; We perform unit transformations on the vertex coordinates, the first coordinate point, and the second coordinate point respectively to obtain the transformed vertex coordinates, the first coordinate point, and the second coordinate point. We then substitute the transformed vertex coordinates, the first coordinate point, and the second coordinate point into the equation of the circle to obtain intermediate variables. Pipe diameter is calculated based on intermediate variables to obtain the detection data of underground pipeline diameter.
[0008] Optionally, the multimodal detection model and the object detection model are trained in the following ways: Obtain the training dataset, which includes a training sample set and a test sample set. The training dataset includes sample pairs, each of which includes sample data and text labels. Each sample data is a sample GPR image containing underground pipelines. The location and material of the underground pipeline signal are marked by different colored boxes in each sample GPR image. The text labels characterize the location, material, diameter and burial depth of the underground pipeline contained in the sample pair.
[0009] The first initial neural network model and the second initial neural network model are trained based on the training sample set until the loss functions corresponding to the first initial neural network model and the second initial neural network model converge, thus obtaining the initial multimodal detection model and the initial object detection model. The input of the first initial neural network model is a sample pair, and the output is the text detection result and the first detection image data corresponding to the sample pair. The input of the second initial neural network model is a sample pair, and the output is the second detection image data corresponding to the sample pair. The value of the loss function characterizes the difference between the model output result and the annotation result corresponding to each sample pair. The initial multimodal detection model and the initial target detection model are tested and verified based on the test sample set until they meet the corresponding index verification requirements, thus obtaining the multimodal detection model and the target detection model.
[0010] Optionally, the training dataset is obtained in the following ways: Acquire a set number of initial sample GPR images containing underground pipelines, and mark the location and material of the underground pipeline signal in each initial sample GPR image with different colored annotation boxes to obtain the sample GPR image corresponding to each initial sample GPR image. Add text labels to each initial sample GPR image. The text labels include the location, material, diameter, and burial depth of the underground pipelines in the initial sample GPR image. Each initial sample GPR image and its corresponding sample GPR image and text annotation label are treated as a sample pair. The obtained sample pairs are randomly combined and divided according to the set quantity requirements to obtain the training sample set and the test sample set.
[0011] Optionally, the validation requirements for the initial multimodal detection model include correct matching rate, coordinate error, relative error, weighted classification accuracy, and overall average accuracy. The validation requirements for the initial target detection model include relative error, weighted classification accuracy, and overall average accuracy.
[0012] Optionally, the overall average precision is obtained in the following ways:
[0013]
[0014] in, This represents the overall average accuracy. For each Average accuracy at the threshold.
[0015] On the other hand, embodiments of this application provide an underground pipeline parameter detection device based on multimodal algorithms and ground-penetrating radar, comprising: The data acquisition module is used to acquire GPR images including underground pipelines, and input the GPR images into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data of the location, material, burial depth and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image. The module also inputs the GPR images into a target detection model to obtain second detection image data, which includes the location and material data of the underground pipelines marked with a second prediction box on the GPR image. The data determination module is used to determine, based on the first prediction box, the second prediction box, and the GPR image, the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data. Both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline. The detection result determination module is used to obtain the weights corresponding to the text detection result, the first detection image data, and the second detection image data, and to perform weighted summation processing on the text detection data, the first detection image data, and the second detection image data according to their respective weights to obtain the location detection result and material detection result of the underground pipeline; and to perform weighted summation processing on the text detection result, the first detection image data, and the second detection image data according to their respective weights to obtain the burial depth detection result and pipe diameter detection result of the underground pipeline.
[0016] In another aspect, embodiments of this application provide an electronic device, which includes a processor and a memory: The memory is configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform any of the methods in a method for detecting underground pipeline parameters.
[0017] The beneficial effects of the technical solutions provided in this application include at least the following: In this embodiment, the GPR image is input into a multimodal detection model to obtain text detection results and first detection image data. Simultaneously, the GPR image is input into a target detection model to obtain second detection image data. Finally, the obtained text detection results, first detection image data, and second detection image data are weighted and summed to obtain the final detection result including the location, material, diameter, and burial depth of the underground pipeline. It is evident that this application, through the fusion of output data from the multimodal detection model and the target detection model, the collaborative optimization of the two models, and the dynamic weighting mechanism, not only improves the detection accuracy of underground pipeline parameters but also achieves a breakthrough in the robustness of underground pipeline parameters. This makes it more suitable for detection scenarios involving complex scenes and pipelines with rare materials, providing an efficient and reliable solution for the safety management of urban underground space. Furthermore, after inputting the two models into the GPR image, parameters such as pipeline location, material, diameter, and burial depth can be output simultaneously and at once, improving the detection efficiency of underground pipeline parameters.
[0018] In this embodiment, mAP combined with hyperbolic matching degree (HMS) is used to evaluate the image response output by the initial multimodal detection model and the initial target detection model. Compared with the traditional IoU which is only calculated based on rectangular boxes, this application combines the hyperbolic shape characteristics, which can effectively ensure that the detection accuracy of the model is effectively improved, so that the trained multimodal detection model and target detection model can be applied to more complex underground pipeline detection scenarios. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an underground pipeline parameter detection method based on multimodal algorithm and ground penetrating radar, provided for an embodiment of this application; Figure 2 A flowchart illustrating another method for detecting underground pipeline parameters based on multimodal algorithms and ground-penetrating radar, provided for an embodiment of this application; Figure 3 A schematic diagram of the structure of an underground pipeline parameter detection device based on multimodal algorithm and ground penetrating radar provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting the invention.
[0022] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0024] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0025] Specifically, such as Figure 1 As shown, the method may include: Step S101: Obtain GPR (Ground Penetrating Radar) images including underground pipelines, and input the GPR images into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data on the location, material, burial depth, and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image.
[0026] Optionally, the GPR image refers to an image obtained after detecting an area with buried underground pipelines using ground-penetrating radar. In this case, the GPR image contains signals of the underground pipeline area. Furthermore, the acquired GPR image can be input into a pre-trained multimodal detection model. The multimodal detection model will then detect underground pipelines in the GPR image and output the corresponding text detection results and the first detection image data.
[0027] The text detection result is a plain text response containing information on the location, material, diameter, and burial depth of all underground pipeline signals in the GPR image. The first detection image data is an image response, specifically using a prediction box (i.e., the first prediction box) to mark the location of all underground pipeline signals on the input GPR image. Different colors of the prediction box represent different materials of the underground pipelines.
[0028] Step S102: Input the GPR image into the target detection model to obtain the second detection image data. The second detection image data includes the location and material data of the underground pipeline marked with the second prediction box on the GPR image.
[0029] Optionally, while inputting the acquired GPR image into a pre-trained multimodal detection model, the GPR image can also be input into a pre-trained target detection model. In this case, the target detection model will also detect underground pipelines in the GPR image and output the corresponding second detection image data. The second detection image data is also an image response. Specifically, it uses prediction boxes (i.e., the second prediction boxes) to mark the location of all underground pipeline signals on the input GPR image. Different colors of the prediction boxes also represent different materials of the underground pipelines.
[0030] It is understood that in this application, the multimodal detection model can be LLaVA-1.5 and the object detection model can be YOLOv5. In practical applications, the specific types of multimodal detection models and object detection models are not limited to LLaVA-1.5 and YOLOv5 shown in this application. Any network model that can implement the functions of the multimodal detection model and object detection model in this application is acceptable. This application does not limit this aspect.
[0031] Step S103: Based on the first prediction box, the second prediction box, and the GPR image, determine the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data. Both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline.
[0032] Optionally, after obtaining the detection image data output by the multimodal detection model and the target detection model, two sets of detection data including the burial depth and pipe diameter of the underground pipeline can be obtained based on the first prediction box in the first detection image data, the second prediction box in the second detection image data, and the GPR image (i.e., the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data).
[0033] In an optional embodiment of this application, determining the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data based on the first prediction box, the second prediction box, and the GPR image includes: The GPR image is cropped according to the first predicted bounding box in the first detection image data and the second predicted bounding box in the second detection image data, respectively, to obtain a first cropped GPR image corresponding to the first detection image data and a second cropped GPR image corresponding to the second detection image data; Based on the first detection image data and the second detection image data, image data processing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data.
[0034] Optionally, when the final detection results of the burial depth and pipe diameter of the underground pipeline are required, the image of the underground pipeline signal area can be cropped from the input GPR image based on the coordinates of the first prediction box in the first detection image data (i.e., the first cropped GPR image), and the image of the underground pipeline signal area can be cropped from the input GPR image based on the coordinates of the second prediction box in the second detection image data (i.e., the second cropped GPR image).
[0035] Furthermore, the obtained first cropped GPR image and second cropped GPR image are subjected to further image data processing to obtain the first detection data (i.e., the detection data of the burial depth and pipe diameter of the underground pipeline in the GPR image) corresponding to the first detection image data and the second detection data (i.e., the detection data of the burial depth and pipe diameter of the underground pipeline in the GPR image) corresponding to the second detection image data.
[0036] In an optional embodiment of this application, image data processing is performed on the first cropped GPR image and the second cropped GPR image based on the first detection image data and the second detection image data, respectively, to obtain first detection data corresponding to the first detection image data and second detection data corresponding to the second detection image data, including: Image preprocessing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the processed first cropped GPR image and the second cropped GPR image; Image processing is performed on the first and second cropped GPR images after processing using the maximum connected component algorithm and the skeletonization algorithm, respectively, to obtain the first skeletonized image and the second skeletonized image including the underground pipeline area. The first skeletonized image and the second skeletonized image are fitted with hyperbolic curves based on the hyperbolic fitting algorithm to obtain the first fitting equation and the second fitting equation. Both the first fitting equation and the second fitting equation include the hyperbolic equation and vertex coordinates. The first detection data is obtained based on the first fitting equation and the coordinates of the first predicted box in the first detection image detection data; The second detection data is obtained based on the second fitting equation and the coordinates of the second prediction box in the second detection image data.
[0037] Optionally, the first cropped GPR image and the second cropped GPR image can be further preprocessed using an image preprocessing algorithm to obtain processed first cropped GPR images and second cropped GPR images. In these processed images, the areas containing underground pipelines will be clearer, thus further improving the accuracy of image detection. The image preprocessing algorithm can be set and adjusted according to the required accuracy, and may include grayscale algorithms, binarization algorithms, etc.
[0038] Furthermore, the first and second cropped GPR images after image preprocessing can be processed using the maximum connected component algorithm, followed by the skeletonization algorithm, to obtain the first and second skeletonized images that include the underground pipeline area (which is the maximum connected component). Then, the first and second skeletonized images are fitted with hyperbolic curves using the hyperbolic fitting algorithm, respectively, to obtain the first fitting equation (i.e., the hyperbolic equation and vertex coordinates) and the second fitting equation (i.e., the hyperbolic equation and vertex coordinates).
[0039] Correspondingly, the first detection data corresponding to the first cropped GPR image (i.e., the pipe diameter and burial depth of the underground pipeline calculated based on the image response output by the multimodal model) can be calculated based on the hyperbola equation, vertex coordinates, and coordinates of the first prediction box in the first detection image measurement data (i.e., the coordinates of the underground pipeline signal area output by the multimodal detection model in the input GPR image). Similarly, the second detection data corresponding to the second cropped GPR image (i.e., the pipe diameter and burial depth of the underground pipeline calculated based on the image response output by the target detection model) can be calculated based on the hyperbola equation, vertex coordinates, and coordinates of the second prediction box in the second detection image measurement data (i.e., the coordinates of the underground pipeline signal area output by the target detection model in the input GPR image).
[0040] In an optional embodiment of this application, the width pixels of the GPR image correspond to the actual length of the survey line detected by the radar, and the height pixels of the GPR image correspond to the actual detection depth detected by the radar. The first detection data and the second detection data are calculated in the following manner: Set the preset position of the GPR image as the origin of the coordinate system, and establish a coordinate system in the GPR image based on the origin of the coordinate system. Each pixel in the horizontal direction of the GPR image represents the length of the survey line, and each pixel in the vertical direction of the GPR image represents the detection depth. The actual survey line length and actual detection depth of the radar capturing GPR images are obtained, and the detection data of the burial depth of underground pipelines are obtained based on the actual survey line length, actual detection depth, fitting equation and coordinate system. Based on the fitted equation, a first coordinate point with a distance set to the left of the vertex coordinates and a second coordinate point with a distance set to the right of the vertex coordinates are determined; We perform unit transformations on the vertex coordinates, the first coordinate point, and the second coordinate point respectively to obtain the transformed vertex coordinates, the first coordinate point, and the second coordinate point. We then substitute the transformed vertex coordinates, the first coordinate point, and the second coordinate point into the equation of the circle to obtain intermediate variables. Pipe diameter is calculated based on intermediate variables to obtain the detection data of underground pipeline diameter.
[0041] Optionally, the calculation methods for obtaining the first detection data based on the hyperbola equation, vertex coordinates, and coordinates of the first prediction box in the first image detection data and the calculation methods for obtaining the second detection data corresponding to the second cropped GPR image based on the hyperbola equation, vertex coordinates, and coordinates of the second prediction box in the second image detection data are the same. The following is just one example to illustrate the calculation methods for the first and second detection data.
[0042] In this application, the resolution (width pixels * height pixels) of the input model's GPR image corresponds to the scale of the actual size; that is, the width pixels of the GPR image correspond to the actual survey line length detected by the radar, and the height pixels of the GPR image correspond to the actual detection depth detected by the radar. Here, the width pixels of the GPR image are denoted as... W The height in pixels is H The actual detection distance (measurement line length) of the radar is L The actual detection depth of the radar is D , W and H The unit is pixels ( px ), L and D The unit is meter ( m Simultaneously, a coordinate system is established with the top-left corner of the GPR image as the origin (0,0), with the positive x-axis direction to the right and the positive y-axis direction downwards. At this point, each pixel in the x-axis direction of the GPR image represents the length of the survey line. L / W The depth of detection represented by each pixel in the vertical direction of the GPR image is... D / H The units are all m / px .
[0043] (1) Detection data for calculating burial depth: The vertex coordinates of the fitted hyperbola equation are: Then, based on the formula for calculating the burial depth of the top of underground pipelines, the detection data for the burial depth are obtained as follows: Burial depth
[0044] (2) Calculate the test data for pipe diameter: The equation of the hyperbola obtained after fitting is:
[0045] Where m, n, k, and h are constants.
[0046] The vertex coordinates of the fitted hyperbola equation are as follows: Determine a first coordinate point with a distance set to the left of the vertex coordinates and a second coordinate point with a distance set to the right of the vertex coordinates. Their x-coordinates are denoted as follows: x 1and x 3 ,Will x 1 and x 3 Substituting into the hyperbola equation above, we get and :
[0047]
[0048] at this time , , The three points are on the circle representing the underground pipeline, and then... , , Perform unit conversion, x 1 , x 2 , x 3 , y 1 , y 2 , y 3 The unit is composed of px Convert to m, get , , : , ,
[0049] , ,
[0050] Furthermore, the coordinates of the center of the circle representing the underground pipeline are obtained as follows: ,radius r .in, x 0 , y 0 , r The unit is m, The equation of this circle can now be expressed as:
[0051] Will , , Substituting the three points into the equation of the circle, we get:
[0052]
[0053]
[0054] The intermediate variables were calculated as follows: , , , , ,
[0055] Furthermore, the determinant is calculated based on the obtained intermediate variables:
[0056] Calculate the center of the circle based on the obtained intermediate variables: ,
[0057] Calculate the radius based on the obtained intermediate variables:
[0058] At this point, the diameter of the underground pipeline can be obtained as follows: (i.e., the test data of the pipe diameter).
[0059] Step S104: Obtain the weights corresponding to the text detection results, the first detection image data, and the second detection image data, and perform weighted summation on the text detection data, the first detection image data, and the second detection image data according to their respective weights to obtain the location detection results and material detection results of the underground pipeline.
[0060] Optionally, after the GPR image is detected by the multimodal detection model and the object detection model, a text detection result and two detection image data (i.e., the first detection image data and the second detection image data) are obtained. Since the detection accuracy of the multimodal detection model and the object detection model for GPR image is different, and the influence of the text detection result and the detection image data on the final detection result is different, different weights can be set according to the degree of influence of the text detection result and the two detection image data on the final detection result. Then, according to their respective weights, the text detection data, the first detection image data and the second detection image data are weighted and summed to obtain the location detection result and material detection result of the underground pipeline.
[0061] It's understandable that the location and material of underground pipelines are two distinct attributes, and the weighted summation calculation only considers one attribute at a time. For instance, when determining the location of an underground pipeline, the location data obtained from the text detection results, the first detection image data, and the second detection image data can be weighted and summed according to their respective weights to obtain the final detection result for the pipeline's location. Similarly, when determining the material of an underground pipeline, the material data obtained from the text detection results, the first detection image data, and the second detection image data can be weighted and summed according to their respective weights to obtain the final detection result for the pipeline's material.
[0062] Step S105: Based on the weights corresponding to the text detection results, the first detection image data, and the second detection image data, perform weighted summation on the text detection data, the first detection data, and the second detection data to obtain the burial depth detection results and pipe diameter detection results of the underground pipeline.
[0063] Optionally, after obtaining the detection data of the burial depth and pipe diameter of the underground pipeline in the two image responses output by the multimodal detection model and the target detection model, further weighted summation can be performed on the detection data of the burial depth and pipe diameter in the text detection results, the detection data of the burial depth and pipe diameter in the first detection data, and the detection data of the burial depth and pipe diameter in the second detection data, according to the weights corresponding to the text detection results, the first detection image data, and the second detection image data, respectively, to obtain the final detection results of the burial depth and pipe diameter of the underground pipeline. It can be understood that the burial depth and pipe diameter of the underground pipeline are two different attributes. In the actual weighted summation calculation, each weighted summation calculation only targets one attribute; that is, the weighted summation of the detection data of the burial depth of the underground pipeline can be performed first, followed by the weighted summation of the detection data of the pipe diameter of the underground pipeline.
[0064] The weights of the text detection result, the first detection image data, and the second detection image data can be set and adjusted according to actual needs, and this application embodiment does not limit this. For example, if the weight of the text detection result R1 is 20%, the weight of the first detection image data R2 is 30%, and the weight of the second detection image data R3 is 50%, then the calculation method for the final location (i.e., prediction box coordinates), material, pipe diameter, and burial depth of the underground pipeline is as follows: Final result =
[0065] In this embodiment, the GPR image is input into a multimodal detection model to obtain text detection results and first detection image data. Simultaneously, the GPR image is input into a target detection model to obtain second detection image data. Finally, the obtained text detection results, first detection image data, and second detection image data are weighted and summed to obtain the final detection results of the underground pipeline's location, material, diameter, and burial depth. It is evident that this application, through the fusion of output data from the multimodal detection model and the target detection model, the collaborative optimization of the two models, and the dynamic weighting mechanism, not only improves the detection accuracy of underground pipeline parameters but also achieves a breakthrough in the robustness of underground pipeline parameters. This makes it more suitable for detection scenarios involving complex scenes and pipelines with rare materials, providing an efficient and reliable solution for the safety management of urban underground spaces. Furthermore, after inputting the two models into the GPR image, parameters such as pipeline location, material, diameter, and burial depth can be output simultaneously and at once, improving the detection efficiency of underground pipeline parameters.
[0066] In optional embodiments of this application, the multimodal detection model and the object detection model are trained in the following manner: Obtain the training dataset, which includes a training sample set and a test sample set. The training dataset includes each sample pair, and each sample pair includes sample data and text annotation labels. Each sample data is a sample GPR image containing underground pipelines. The location and material of the underground pipeline signal are marked by different colored annotation boxes in each sample GPR image. The text annotation labels characterize the location, material, pipe diameter and burial depth of the underground pipeline contained in the sample pair. The first initial neural network model and the second initial neural network model are trained based on the training sample set until the loss functions corresponding to the first initial neural network model and the second initial neural network model converge, thus obtaining the initial multimodal detection model and the initial object detection model. The input of the first initial neural network model is a sample pair, and the output is the text detection result and the first detection image data corresponding to the sample pair. The input of the second initial neural network model is a sample pair, and the output is the second detection image data corresponding to the sample pair. The value of the loss function characterizes the difference between the model output result and the annotation result corresponding to each sample pair. The initial multimodal detection model and the initial target detection model are tested and verified based on the test sample set until they meet the corresponding index verification requirements, thus obtaining the multimodal detection model and the target detection model.
[0067] Optionally, the multimodal detection model in this application is trained on the first initial neural network model based on the training sample set, and the object detection model is trained on the second initial neural network model based on the training sample set. The training process of the multimodal detection model and the object detection model will be described in detail below.
[0068] Correspondingly, a training dataset including a training sample set and a test sample set can be obtained at this time. The training dataset includes each sample pair, and each sample pair includes sample data and text annotation labels. Each sample data is a sample GPR image containing underground pipelines. The location and material of the underground pipeline signal are marked by different colored annotation boxes in each sample GPR image. The text annotation labels characterize the location, material, pipe diameter and burial depth of the underground pipeline contained in the sample pair.
[0069] Furthermore, for training the multimodal detection model, each sample pair can be input into the first initial neural network model. At this time, the first initial neural network model can output the first detection image data and text detection result corresponding to each sample pair. Then, based on the output first detection image data, text detection result, and annotation result (specifically, the bounding box and text annotation label in the sample GPR image) of each sample pair, the value of the loss function corresponding to the first initial neural network model can be determined. If the determined loss function value does not converge, the network parameters of the first initial neural network model can be adjusted. Then, each sample pair is input into the first initial neural network model after the parameter adjustment, and the value of the loss function is determined again based on the output first detection image data, text detection result, and annotation result corresponding to the sample pair. If it still does not converge, the network parameters of the first initial neural network model are adjusted again until the value of the corresponding loss function converges. The loss function corresponding to the first initial neural network model represents the difference between the first detected image data and text detection results corresponding to each sample pair output by the model and the annotation results corresponding to each sample pair. When the loss function converges, it indicates that the difference between the first detected image data and text detection results corresponding to each sample pair output by the model and the annotation results corresponding to each sample pair meets the requirements, that is, the first detected image data and text detection results of the sample pair output by the model are close to the annotation results of the sample pair.
[0070] Furthermore, when the loss function converges, an initial multimodal detection model can be obtained. At this point, the initial multimodal detection model can be tested and verified based on the test sample set in the training dataset. If the test verification result of the initial multimodal detection model does not meet the corresponding indicator verification requirements, the step of training the first initial neural network model based on the training sample set is repeated until the test verification result of the initial multimodal detection model meets the corresponding indicator verification requirements.
[0071] For the target detection model, each sample pair can be input into a second initial neural network model. This model outputs the second detection image data corresponding to each sample pair. Then, based on the output second detection image data and the corresponding annotation (specifically, the bounding boxes in the sample GPR image), the loss function of the second initial neural network model can be determined. If the determined loss function value does not converge, the network parameters of the second initial neural network model can be adjusted. The sample pairs are then input again into the adjusted model, and the loss function value is determined again based on the output second detection image data and the corresponding annotation. If convergence still occurs, the network parameters are adjusted again until the corresponding loss function value converges. The loss function value of the second initial neural network model represents the difference between the output second detection image data and the corresponding annotation of each sample pair. When the loss function converges, it indicates that the difference between the output second detection image data and the corresponding annotation of each sample pair meets the requirement, meaning that the output second detection image data of the sample pair approximates the annotation of the sample pair.
[0072] Furthermore, when the loss function converges, an initial object detection model can be obtained. At this point, the initial object detection model can be tested and verified based on the test sample set in the training dataset. If the test verification result of the initial object detection model does not meet the corresponding indicator verification requirements, the step of training the second initial neural network model based on the training sample set is repeated until the test verification result of the initial object detection model meets the corresponding indicator verification requirements.
[0073] In optional embodiments of this application, the performance evaluation requirements for the initial multimodal detection model include correct matching rate, coordinate error, relative error, weighted classification accuracy, and overall average accuracy. The performance evaluation requirements for the initial target detection model include relative error, weighted classification accuracy, and overall average accuracy.
[0074] Optionally, for each sample GPR image, the text response output by the initial multimodal detection model includes the coordinates of the predicted bounding box containing the location of the underground pipeline. The actual coordinates of the annotation box are At this point, the coordinate error (CE), relative error, and correct match rate can be used to evaluate the location of the underground pipeline given by the plain text response (i.e., text detection data) output by the initial multimodal detection model. The coordinate error includes: (1) Normalization: Calculate the absolute error of each coordinate point and normalize it according to the image size.
[0075] The X-axis coordinate error is obtained by dividing by the original image width. and : ,
[0076] The Y-axis coordinate error is obtained by dividing by the original image height. and : ,
[0077] (2) Calculation of average error: The average of the normalized errors of the four coordinate points is used to calculate the coordinate error. CE ):
[0078] Optionally, the Correct Match Rate (CMR) can also be used to evaluate the underground pipeline material identified by the plain text response output by the initial multimodal detection model. In this case, the number of pipelines correctly identified by the model in each sample GPR image is denoted as TD, and the number of pipelines incorrectly identified is denoted as FD.
[0079] Furthermore, the accuracy of the underground pipeline diameter and burial depth given by the plain text response output by the initial multimodal detection model is evaluated based on the relative error (RE).
[0080] The relative error of the pipe diameter is:
[0081] The relative error of burial depth is:
[0082] Correspondingly, when evaluating the results obtained from the image responses output by the initial multimodal detection model and the initial target detection model, the corresponding verification requirements include relative error, weighted classification accuracy, and overall average accuracy.
[0083] In optional embodiments of this application, the overall average accuracy is obtained in the following ways:
[0084]
[0085] in, This represents the overall average accuracy. For each Average accuracy at the threshold.
[0086] Optionally, this application may use an improved mAP (i.e., total average accuracy, which combines hyperbolic matching degree HMS) to evaluate the location of underground pipelines given by the image responses output by the initial multimodal detection model and the target detection model, specifically including the following steps: (1) Calculation of 1IoU: For each predicted bounding box and the ground truth bounding box, calculate the intersection-over-union (IoU):
[0087] (2) Hyperbolic Matching Degree (HMS) Calculation: Extract the hyperbola parameters, and based on the predicted and true hyperbola equations obtained during training, perform pixel-by-pixel matching of the pixel regions covered by the predicted and true hyperbola in the image coordinate system, and count the number of overlapping pixels:
[0088] (3) Weighted mAP calculation: The average precision (AP) is calculated at different IoU thresholds (0.5~0.95, step size 0.05), i.e., the AP at each IoU threshold is multiplied by the HMS weight:
[0089] Finally, calculate the average across all IoU thresholds. Value (i.e., overall average precision):
[0090] In this embodiment, mAP combined with hyperbolic matching degree (HMS) is used to evaluate the image response output by the initial multimodal detection model and the initial target detection model. Compared with the traditional IoU which is only calculated based on rectangular boxes, this application combines the hyperbolic shape characteristics, which can effectively ensure that the detection accuracy of the model is effectively improved, so that the trained multimodal detection model and the initial target detection model can be applied to more complex underground pipeline detection scenarios.
[0091] Optionally, this application may also use Weighted Classification Accuracy (WCA) to evaluate the material of the underground pipeline given by the image responses output by the initial multimodal detection model and the initial object detection model. Weighted Classification Accuracy (WCA) is a classification performance metric designed for imbalanced data. It comprehensively evaluates the model's performance across different material categories by assigning weights proportional to the number of samples to each category. The specific steps are as follows: (1) Count the number of samples in each category: Assume there are a total of N The material category, the first iThe number of samples in each category is The total sample size is:
[0092] (2) Calculate the category weights: No. i Category weight The percentage of samples in this category:
[0093] (3) Calculate the accuracy for each category: No. i Category accuracy The number of correct predictions the model makes for this category Compared with the total number of samples The ratio:
[0094] (4) Weighted summation: The WCA is obtained by summing the accuracy scores of all categories according to their weights.
[0095] Optionally, this application may also use relative error (RE) to evaluate the diameter and burial depth of underground pipelines obtained from the image responses output by the initial multimodal detection model and the initial target detection model. The calculation process is the same as the method used above to evaluate the location of underground pipelines given by the plain text response (i.e., text detection data) output by the initial multimodal detection model. For details, please refer to the description above, which will not be repeated here.
[0096] In an optional embodiment of this application, the training dataset is obtained in the following manner: Acquire a set number of initial sample GPR images containing underground pipelines, and mark the location and material of the underground pipeline signal in each initial sample GPR image with different colored annotation boxes to obtain the sample GPR image corresponding to each initial sample GPR image. Add text labels to each initial sample GPR image. The text labels include the location, material, diameter, and burial depth of the underground pipelines in the initial sample GPR image. Each initial sample GPR image and its corresponding sample GPR image and text annotation label are treated as a sample pair. The obtained sample pairs are randomly combined and divided according to the set quantity requirements to obtain the training sample set and the test sample set.
[0097] Optionally, a set number of initial sample GPR images containing underground pipelines are obtained. These initial sample GPR images can be raw GPR images in JPG format of underground pipelines with known collection parameters (material, pipe diameter, burial depth). Image annotation software is used to annotate the location and material of the underground pipeline signal in each initial sample GPR image using annotation boxes of different colors, resulting in sample GPR images corresponding to each initial sample GPR image. Then, text annotation labels are added to each initial sample GPR image. These text annotation labels describe the location, material, pipe diameter, and burial depth of the underground pipeline in the GPR image. At this point, the sample GPR image and text annotation label corresponding to each initial sample GPR image constitute a sample pair. The obtained sample pairs are then randomly combined and divided according to a set number requirement to obtain a training sample set and a test sample set. For example, 80% of the sample pairs are randomly selected as the training set, and the remaining 20% of the samples are used as the test set.
[0098] To better understand the methods provided in the embodiments of this application, the following is in conjunction with... Figure 2 The methods provided in the embodiments of this application will be described in detail.
[0099] S201, Multimodal Detection Model and Object Detection Model: Obtain a training sample set, and train the first initial neural network model and the second initial neural network model based on the training sample set to obtain the trained and tested multimodal detection model and the trained object detection model; S202. Input GPR image: Input a GPR image into the multimodal detection model and object detection model after training and testing, and give the scale of the GPR image resolution (width pixels * height pixels) and the actual size. That is, the width pixels of the GPR image correspond to the actual radar detection distance, and the height pixels of the GPR image correspond to the actual radar detection depth. S203, Plain Text Response and Image Response: After inputting a GPR image, the multimodal detection model will output two responses, including a plain text response (i.e., text detection results) and an image response (i.e., the first detection image data). The output plain text response contains the location, material, pipe diameter and burial depth of all underground pipeline signals in the GPR image, and the output image response uses prediction boxes to mark the location and material of all underground pipeline signals on the input GPR image. S204, Image Response: After the target detection model inputs a GPR image, it will output an image response (i.e., the second detection image data). The output image response also uses prediction boxes to mark the location and material of all underground pipeline signals on the input GPR image. S205. Cropping out the image of the underground pipeline signal area: Based on the predicted bounding box coordinates in the image response output by the multimodal detection model and the target detection model, use the image cropping algorithm to crop out the image of the underground pipeline signal area from the original GPR image in the input model. S206. Image preprocessing algorithm: Use image preprocessing algorithms (including grayscale algorithm, binarization algorithm, etc.) to process the image of the cropped underground pipeline signal area; S207. Image Processing Using the Maximum Connected Component Algorithm: The maximum connected component algorithm is used to process the preprocessed image containing underground pipeline signal areas. 208. Image processing using skeletonization algorithm: The first cropped GPR image and the second cropped GPR image after processing the image by the maximum connected component algorithm are processed by skeletonization algorithm to obtain the first skeletonized image and the second skeletonized image including the underground pipeline area. S209. Hyperbola fitting algorithm for image processing: Based on the hyperbola fitting algorithm, hyperbola fitting is performed on the first skeletonized image and the second skeletonized image respectively to obtain the first fitting equation and the second fitting equation. Both the first fitting equation and the second fitting equation include the hyperbola equation and vertex coordinates. S210. Fitted hyperbola equation and vertex coordinates: Using the fitted hyperbola equation and vertex coordinates, combined with the coordinates of the underground pipeline signal area in the input GPR image, the pipe diameter and burial depth of the underground pipeline are calculated. After the calculation, two pipe diameter and burial depth results will be obtained. One is the pipe diameter and burial depth calculated based on the image response output by the multimodal prediction model, and the other is the pipe diameter and burial depth calculated based on the image response output by the target detection model. S211, R1, R2, and R3: Calculating the location, material, diameter, and burial depth of all underground pipelines in each input GPR image yields three sets of results: one set is the location, material, diameter, and burial depth of the underground pipelines given by the plain text response output by the multimodal detection model (denoted as R1); one set is the location, material, diameter, and burial depth of the underground pipelines obtained from the image response output by the multimodal model (denoted as R2); and one set is the location, material, diameter, and burial depth of the underground pipelines obtained from the image response output by the object detection model (denoted as R3). S212. Assign weights and calculate: Assign different weights to the three results and calculate a final result for the location, material, diameter and burial depth of the underground pipeline. For example, assign a weight of 20% to R1, 30% to R2 and 50% to R3. Then the formula for calculating the final result for the location (prediction box coordinates), material, diameter and burial depth of the underground pipeline is 20% R1 + 30% R2 + 50% R3.
[0100] This application provides an underground pipeline parameter detection device based on multimodal algorithms and ground-penetrating radar, such as... Figure 3 As shown, the device may include: a data acquisition module 301, a data determination module 302, and a detection result determination module 303, wherein, The data acquisition module is used to acquire GPR images including underground pipelines, and input the GPR images into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data of the location, material, burial depth and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image. The module also inputs the GPR images into a target detection model to obtain second detection image data, which includes the location and material data of the underground pipelines marked with a second prediction box on the GPR image. The data determination module is used to determine, based on the first prediction box, the second prediction box, and the GPR image, the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data. Both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline. The detection result determination module is used to obtain the weights corresponding to the text detection result, the first detection image data, and the second detection image data, and to perform weighted summation processing on the text detection data, the first detection image data, and the second detection image data according to their respective weights to obtain the location detection result and material detection result of the underground pipeline; and to perform weighted summation processing on the text detection result, the first detection image data, and the second detection image data according to their respective weights to obtain the burial depth detection result and pipe diameter detection result of the underground pipeline.
[0101] Optionally, when the data determination module determines the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data based on the first prediction box, the second prediction box, and the GPR image, it is specifically used for: The GPR image is cropped according to the first predicted bounding box in the first detection image data and the second predicted bounding box in the second detection image data, respectively, to obtain a first cropped GPR image corresponding to the first detection image data and a second cropped GPR image corresponding to the second detection image data; Based on the first detection image data and the second detection image data, image data processing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data.
[0102] Optionally, when the data determination module performs image data processing on the first cropped GPR image and the second cropped GPR image based on the first detection image data and the second detection image data respectively, to obtain the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data, it is specifically used for: Image preprocessing is performed on the first cropped GPR image and the second cropped GPR image respectively to obtain the processed first cropped GPR image and the second cropped GPR image; Image processing is performed on the first and second cropped GPR images after processing using the maximum connected component algorithm and the skeletonization algorithm, respectively, to obtain the first skeletonized image and the second skeletonized image including the underground pipeline area. The first skeletonized image and the second skeletonized image are fitted with hyperbolic curves based on the hyperbolic fitting algorithm to obtain the first fitting equation and the second fitting equation. Both the first fitting equation and the second fitting equation include the hyperbolic equation and vertex coordinates. The first detection data is obtained based on the first fitting equation and the coordinates of the first predicted box in the first detection image detection data; The second detection data is obtained based on the second fitting equation and the coordinates of the second prediction box in the second detection image data.
[0103] Optionally, the width pixels of the GPR image correspond to the actual length of the survey line detected by the radar, and the height pixels of the GPR image correspond to the actual detection depth detected by the radar. The first and second detection data are calculated in the following way: Set the preset position of the GPR image as the origin of the coordinate system, and establish a coordinate system in the GPR image based on the origin of the coordinate system. Each pixel in the horizontal direction of the GPR image represents the length of the survey line, and each pixel in the vertical direction of the GPR image represents the detection depth. The actual survey line length and actual detection depth of the radar capturing GPR images are obtained, and the detection data of the burial depth of underground pipelines are obtained based on the actual survey line length, actual detection depth, fitting equation and coordinate system. Based on the fitted equation, a first coordinate point with a distance set to the left of the vertex coordinates and a second coordinate point with a distance set to the right of the vertex coordinates are determined; We perform unit transformations on the vertex coordinates, the first coordinate point, and the second coordinate point respectively to obtain the transformed vertex coordinates, the first coordinate point, and the second coordinate point. We then substitute the transformed vertex coordinates, the first coordinate point, and the second coordinate point into the equation of the circle to obtain intermediate variables. Pipe diameter is calculated based on intermediate variables to obtain the detection data of underground pipeline diameter.
[0104] Optionally, the multimodal detection model and the object detection model are trained in the following ways: Obtain the training dataset, which includes a training sample set and a test sample set. The training dataset includes sample pairs, each of which includes sample data and text labels. Each sample data is a sample GPR image containing underground pipelines. The location and material of the underground pipeline signal are marked by different colored boxes in each sample GPR image. The text labels characterize the location, material, diameter and burial depth of the underground pipeline contained in the sample pair.
[0105] The first initial neural network model and the second initial neural network model are trained based on the training sample set until the loss functions corresponding to the first initial neural network model and the second initial neural network model converge, thus obtaining the initial multimodal detection model and the initial object detection model. The input of the first initial neural network model is a sample pair, and the output is the text detection result and the first detection image data corresponding to the sample pair. The input of the second initial neural network model is a sample pair, and the output is the second detection image data corresponding to the sample pair. The value of the loss function characterizes the difference between the model output result and the annotation result corresponding to each sample pair. The initial multimodal detection model and the initial target detection model are tested and verified based on the test sample set until they meet the corresponding index verification requirements, thus obtaining the multimodal detection model and the target detection model.
[0106] Optionally, the training dataset is obtained in the following ways: Acquire a set number of initial sample GPR images containing underground pipelines, and mark the location and material of the underground pipeline signal in each initial sample GPR image with different colored annotation boxes to obtain the sample GPR image corresponding to each initial sample GPR image. Add text labels to each initial sample GPR image. The text labels include the location, material, diameter, and burial depth of the underground pipelines in the initial sample GPR image. Each initial sample GPR image and its corresponding sample GPR image and text annotation label are treated as a sample pair. The obtained sample pairs are randomly combined and divided according to the set quantity requirements to obtain the training sample set and the test sample set.
[0107] Optionally, the validation requirements for the initial multimodal detection model include correct matching rate, coordinate error, relative error, weighted classification accuracy, and overall average accuracy. The validation requirements for the initial target detection model include relative error, weighted classification accuracy, and overall average accuracy.
[0108] Optionally, the overall average precision is obtained in the following ways:
[0109]
[0110] in, This represents the overall average accuracy. For each Average accuracy at the threshold.
[0111] The underground pipeline parameter detection device based on multimodal algorithm and ground penetrating radar in this embodiment can execute the underground pipeline parameter detection method based on multimodal algorithm and ground penetrating radar shown in the embodiment of this application. The implementation principle is similar, and will not be described again here.
[0112] This application provides an electronic device, which includes a processor and a memory configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform a method for detecting underground pipeline parameters based on a multimodal algorithm and ground-penetrating radar.
[0113] This application provides an electronic device, such as... Figure 4 As shown, Figure 4 The illustrated electronic device includes a processor 2001 and a memory 2003. The processor 2001 and the memory 2003 are connected, for example, via a bus 2002. Optionally, the electronic device 2000 may further include a transceiver 2004. It should be noted that in practical applications, the transceiver 2004 is not limited to one type, and the structure of this electronic device 2000 does not constitute a limitation on the embodiments of this application.
[0114] Processor 2001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 2001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0115] Bus 2002 may include a pathway for transmitting information between the aforementioned components. Bus 2002 may be a PCI bus or an EISA bus, etc. Bus 2002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0116] The memory 2003 may be ROM or other type of static storage device capable of storing static information and instructions, RAM or other type of dynamic storage device capable of storing information and instructions, or EEPROM, CD-ROM or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto.
[0117] The memory 2003 stores the application code that executes the scheme of this application, and its execution is controlled by the processor 2001. The processor 2001 executes the application code stored in the memory 2003 to implement... Figure 3 The embodiment shown illustrates the operation of an underground pipeline parameter detection device based on a multimodal algorithm and ground-penetrating radar.
[0118] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0119] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for detecting underground pipeline parameters based on multimodal algorithms and ground-penetrating radar, characterized in that, include: A GPR image including underground pipelines is acquired and input into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data of the location, material, burial depth and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image. The GPR image is input into the target detection model to obtain second detection image data, which includes the location and material data of the underground pipeline marked with a second prediction box on the GPR image. Based on the first prediction box, the second prediction box, and the GPR image, the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data are determined. Both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline. The text detection result, the first detection image data, and the second detection image data are each assigned a weight. Based on the weights of the text detection result, the first detection image data, and the second detection image data, a weighted summation is performed on the text detection data, the first detection image data, and the second detection image data to obtain the location detection result and material detection result of the underground pipeline. Based on the text detection results, the weights corresponding to the first detection image data and the second detection image data, a weighted summation process is performed on the text detection data, the first detection data and the second detection data to obtain the burial depth detection results and pipe diameter detection results of the underground pipeline. Specifically, the GPR image is cropped according to the first prediction box in the first detection image data and the second prediction box in the second detection image data, respectively, to obtain a first cropped GPR image corresponding to the first detection image data and a second cropped GPR image corresponding to the second detection image data; The method further includes: performing image preprocessing on the first cropped GPR image and the second cropped GPR image respectively to obtain processed first cropped GPR image and second cropped GPR image; performing image processing on the processed first cropped GPR image and second cropped GPR image respectively using the maximum connected component algorithm and skeletonization algorithm to obtain a first skeletonized image and a second skeletonized image including the underground pipeline area; performing hyperbolic fitting on the first skeletonized image and the second skeletonized image respectively based on the hyperbolic fitting algorithm to obtain a first fitting equation and a second fitting equation, wherein both the first fitting equation and the second fitting equation include a hyperbolic equation and vertex coordinates; obtaining the first detection data according to the first fitting equation and the coordinates of the first prediction box in the first detection image data; and obtaining the second detection data according to the second fitting equation and the coordinates of the second prediction box in the second detection image data. The validation criteria used in the training process of the multimodal detection model and the target detection model include overall average accuracy, which is obtained in the following way: ; ; in, This represents the overall average accuracy. For each Average accuracy under threshold; Hyperbola matching degree (HMS) calculation: Extract hyperbola parameters, and perform pixel-by-pixel matching on the pixel regions covered by the predicted hyperbola and the real hyperbola in the image coordinate system based on the predicted hyperbola equation and the real hyperbola equation obtained during training, and count the number of overlapping pixels.
2. The method according to claim 1, characterized in that, The width pixels of the GPR image correspond to the actual length of the survey line detected by the radar, and the height pixels of the GPR image correspond to the actual detection depth detected by the radar. The first detection data and the second detection data are calculated in the following way: The GPR image is set as the origin of the coordinate system at a preset position, and a coordinate system is established in the GPR image based on the origin of the coordinate system. Each pixel in the horizontal direction of the GPR image represents the length of the survey line, and each pixel in the vertical direction of the GPR image represents the detection depth. The actual survey line length and actual detection depth of the radar that captured the GPR image are obtained, and the detection data of the burial depth of the underground pipeline are obtained based on the actual survey line length, actual detection depth, fitting equation and coordinate system. Based on the fitted equation, a first coordinate point with a distance set to the left of the vertex coordinates and a second coordinate point with a distance set to the right of the vertex coordinates are determined; The vertex coordinates, the first coordinate point, and the second coordinate point are respectively converted to obtain the converted vertex coordinates, the first coordinate point, and the second coordinate point. The converted vertex coordinates, the first coordinate point, and the second coordinate point are then substituted into the equation of the circle to obtain intermediate variables. Based on the intermediate variable, the pipe diameter is calculated to obtain the detection data of the burial depth of the underground pipeline.
3. The method according to claim 1, characterized in that, The multimodal detection model and the object detection model were trained in the following way: Obtain the training dataset, which includes a training sample set and a test sample set. The training dataset includes each sample pair, and each sample pair includes sample data and text annotation labels. Each sample data is a sample GPR image containing underground pipelines. The location and material of the underground pipeline signal are marked by different colored annotation boxes in each sample GPR image. The text annotation labels characterize the location, material, pipe diameter and burial depth of the underground pipeline contained in the sample pair. The first initial neural network model and the second initial neural network model are trained based on the training sample set until the loss functions corresponding to the first initial neural network model and the second initial neural network model converge, thus obtaining the initial multimodal detection model and the initial object detection model. The input of the first initial neural network model is a sample pair, and the output is the text detection result and the first detection image data corresponding to the sample pair. The input of the second initial neural network model is a sample pair, and the output is the second detection image data corresponding to the sample pair. The value of the loss function characterizes the difference between the model output result and the annotation result corresponding to each sample pair. The initial multimodal detection model and the initial target detection model are tested and verified based on the test sample set until they meet the corresponding index verification requirements, thus obtaining the multimodal detection model and the target detection model.
4. The method according to claim 3, characterized in that, The training dataset was obtained in the following way: A set number of initial sample GPR images containing underground pipelines are obtained, and the location and material of the underground pipeline signal in each initial sample GPR image are marked with different colored annotation boxes to obtain the sample GPR image corresponding to each initial sample GPR image. Add text annotation labels to each of the initial sample GPR images. The text annotation labels include the location, material, pipe diameter, and burial depth of the underground pipelines in the initial sample GPR images. Each initial sample GPR image and its corresponding sample GPR image and text annotation label are treated as a sample pair. The obtained sample pairs are randomly combined and divided according to a set quantity requirement to obtain the training sample set and the test sample set.
5. The method according to claim 3, characterized in that, The validation requirements for the initial multimodal detection model also include correct matching rate, coordinate error, relative error, and weighted classification accuracy; the validation requirements for the initial target detection model also include relative error and weighted classification accuracy.
6. A device for detecting underground pipeline parameters based on multimodal algorithms and ground-penetrating radar, characterized in that, The method described in claim 1 includes: The data acquisition module is used to acquire GPR images including underground pipelines, and input the GPR images into a multimodal detection model to obtain text detection results and first detection image data. The text detection results include text detection data of the location, material, burial depth and pipe diameter of the underground pipelines. The first detection image data includes the location and material data of the underground pipelines marked with a first prediction box on the GPR image. The module also inputs the GPR images into a target detection model to obtain second detection image data, which includes the location and material data of the underground pipelines marked with a second prediction box on the GPR image. The data determination module is used to determine, based on the first prediction box, the second prediction box, and the GPR image, the first detection data corresponding to the first detection image data and the second detection data corresponding to the second detection image data, wherein both the first detection data and the second detection data include the detection data of the burial depth and pipe diameter of the underground pipeline; The detection result determination module is used to obtain the weights corresponding to the text detection result, the first detection image data, and the second detection image data, and to perform weighted summation processing on the text detection data, the first detection image data, and the second detection image data according to their respective weights to obtain the initial position detection result and the initial material detection result of the underground pipeline; and to perform weighted summation processing on the text detection data, the first detection data, and the second detection data according to their respective weights to obtain the burial depth detection result and the pipe diameter detection result of the underground pipeline.
7. An electronic device, characterized in that, The electronic device includes a processor and a memory: The memory is configured to store machine-readable instructions that, when executed by the processor, cause the processor to perform any one of the methods of claims 1-5.
Citation Information
Patent Citations
Road underground hidden danger detection method and system based on radar image and artificial intelligence
CN113256562A
Cable position information determination method and device, equipment and storage medium
CN114693776A
Object detection and multi-modal large model training method and device
CN119006885A
