Pipeline defect detection method and system based on multi-source data fusion

Through multi-source data fusion and feature fusion network, combined with visible light and infrared images, the comprehensiveness and accuracy problems of pipeline defect detection in the existing technology are solved, and efficient detection of internal and external pipeline defects is achieved, especially in low-definition feature extraction capabilities under certain conditions.

CN118279308BActive Publication Date: 2024-09-03SHANDONG ZHONGFA NEW MATERIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703786.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-03
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Existing pipeline defect detection technology is difficult to achieve comprehensive detection of internal and external defects in pipelines, and a single visible light image cannot effectively extract features under low-definition conditions, which affects detection accuracy, especially the ability to extract features of defects with large size differences.

Method used

A multi-source data fusion method is used to combine visible light images and infrared images through an adaptive channel addition fusion strategy to generate pipeline defect detection images, and feature extraction is performed through the cascaded CBM module and CBMC3 module, and the feature fusion network is used for multi-layer feature fusion. , introducing the SimAM attention module and sub-pixel convolution upsampling to generate pipeline defect feature maps of different scales to improve detection accuracy.

Benefits of technology

It achieves comprehensive detection of pipeline defects, improves detection precision and accuracy, can effectively extract defect features with large size differences, and restore fuzzy features without losing the original information of the image, enhancing the feature information. use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279308B
    Figure CN118279308B
Patent Text Reader

Abstract

The present invention discloses a pipeline defect detection method and system based on multi-source data fusion, which belongs to the field of image processing technology. It includes: obtaining visible light images and infrared images of the pipeline to be detected, processing the visible light images and infrared images through an adaptive channel addition fusion strategy to generate pipeline defect detection images; sequentially processing the pipeline defect detection images through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales; inputting pipeline defect feature maps of different scales into a feature fusion network, performing bottom-up multi-layer feature fusion on the pipeline defect feature maps, and obtaining pipeline defect feature fusion maps of different scales; according to the pipeline defect feature fusion maps of different scales, obtaining pipeline defect detection results. It can fully extract defect features of different scales to achieve comprehensive and accurate detection of pipeline defects; it solves the problem that the accuracy of existing pipeline defect detection needs to be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a pipeline defect detection method and system based on multi-source data fusion. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Pipeline defect detection refers to regular or irregular inspections of various pipeline systems to detect and evaluate damage, corrosion, leakage, deformation and other problems inside or outside the pipeline.

[0004] With the development of science and technology, in order to improve the efficiency of pipeline defect detection, algorithms such as deep learning and machine learning have been widely used in pipeline defect detection. Algorithms such as support vector machine (SVM), random forest (Random Forest), and convolutional neural network (CNN) can detect defects through supervised learning or unsupervised learning of pipeline defect data sets. Image processing algorithms process and analyze pipelines through edge detection, color segmentation, texture analysis and other methods.

[0005] The above algorithms mostly obtain pipeline defect detection results by processing visible light images. Existing visible light images are mostly collected by cameras, which can only reflect the surface information of the pipeline and locate the defects on the pipeline surface. However, the location of pipeline defects has a certain uncertainty and generally appears randomly inside or outside the pipeline. Only using a single visible light image for pipeline defect detection cannot achieve comprehensive detection of pipeline defects.

[0006] In addition, the clarity and effectiveness of feature information in visible light images are easily affected by the external environment. For example, on cloudy days, the collected visible light images are relatively dark and have low clarity, and cannot effectively display defect details such as linear cracks and semicircular misalignments. Existing pipeline defect detection algorithms are often single-architecture target detection, which cannot effectively extract and detect features from images with low clarity, affecting the accuracy of pipeline defect detection.

[0007] Other common defect types on pipelines include corrosion and leakage points. Corrosion may appear as pits and pits, while leakage points may appear as small holes and cracks. In other words, in the same image, two or more defects with extremely different sizes may appear. However, the existing defect detection network has poor feature transformation capabilities and is difficult to adapt to defect features with large size differences. Summary of the invention

[0008] In order to address the deficiencies of the prior art, the present invention provides a pipeline defect detection method, system, electronic device and computer-readable storage medium based on multi-source data fusion, which can achieve comprehensive monitoring of pipeline defects and improve the accuracy of pipeline defect detection.

[0009] In a first aspect, the present invention provides a pipeline defect detection method based on multi-source data fusion;

[0010] A pipeline defect detection method based on multi-source data fusion, comprising:

[0011] Obtain visible light images and infrared images of the pipeline to be inspected, process the visible light images and infrared images through an adaptive channel addition fusion strategy, and generate pipeline defect detection images;

[0012] The pipeline defect detection image is input into the trained pipeline defect detection model for processing to obtain the pipeline defect detection result;

[0013] Among them, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, which specifically includes:

[0014] The pipeline defect detection images are processed sequentially through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales;

[0015] The pipeline defect feature maps of different scales are input into the feature fusion network, and the pipeline defect feature maps are fused with multiple layers from bottom to top to obtain pipeline defect feature fusion maps of different scales;

[0016] The pipeline defect detection results are obtained based on the pipeline defect feature fusion images of different scales.

[0017] In some embodiments, the processing of the visible light image and the infrared image by the adaptive channel addition fusion strategy specifically includes:

[0018] The sum of the pixel values ​​of all channels at each pixel coordinate of the visible light image and the infrared image is obtained respectively, and the sum of the pixel values ​​of all channels under the preset window is calculated with any pixel coordinate as the center, and the adaptive fusion weight at the pixel coordinate is determined;

[0019] Visible light image and infrared image are weightedly fused according to adaptive fusion weights.

[0020] In some implementations, the sequentially processing the pipeline defect detection images through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales specifically includes:

[0021] The pipeline defect detection image is input into multiple groups of cascaded CBM modules and CBMC3 modules for sequential processing to extract spatial information and semantic information and obtain the first output feature maps of different scales;

[0022] The first output feature map finally output by the CBMC3 module is processed by the SimAM attention module, and feature extraction is performed by combining spatial information and channel information to obtain the final output features of the SimAM attention module, which are used together with the remaining first output feature maps as pipeline defect feature maps of different scales.

[0023] In some embodiments, the CBMC3 module includes a CBM module and a C3 module connected in sequence, the CBM module includes a Conv layer, a BN layer and a Mish activation function connected in sequence, and the C3 module includes a stacked Bottleneck module and a convolutional layer.

[0024] In some implementations, performing bottom-up multi-layer feature fusion on the pipeline defect feature map to obtain pipeline defect feature fusion maps of different scales specifically includes:

[0025] Perform sub-pixel convolution upsampling on the pipeline defect feature map, and perform feature fusion on the processed pipeline defect feature map with the pipeline defect feature map of the same scale;

[0026] The pipeline defect feature map after feature fusion is input into the corresponding cascaded CBM module, CBMC3 module and separation convolution layer for processing to obtain pipeline defect feature fusion maps of different scales.

[0027] In some embodiments, performing sub-pixel convolution upsampling processing on the pipeline defect feature map specifically includes:

[0028] Perform super-resolution reconstruction on the pipeline defect feature map according to the size and upsampling multiple of the pipeline defect feature map to obtain multiple feature maps of the same size;

[0029] Multiple feature maps of equal size are rearranged according to the interpolation function of the convolutional layer.

[0030] In some embodiments, the loss function of the pipeline defect detection model includes a classification loss function, a confidence loss function, and a prediction box loss function.

[0031] In a second aspect, the present invention provides a pipeline defect detection system based on multi-source data fusion;

[0032] A pipeline defect detection system based on multi-source data fusion, comprising:

[0033] The data fusion module is configured to: obtain a visible light image and an infrared image of the pipeline to be inspected, process the visible light image and the infrared image through an adaptive channel addition fusion strategy, and generate a pipeline defect detection image;

[0034] The defect detection module is configured to: input the pipeline defect detection image into the trained pipeline defect detection model for processing, and obtain the pipeline defect detection result;

[0035] Among them, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, which specifically includes:

[0036] The pipeline defect detection images are processed sequentially through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales;

[0037] The pipeline defect feature maps of different scales are input into the feature fusion network, and the pipeline defect feature maps are fused with multiple layers from bottom to top to obtain pipeline defect feature fusion maps of different scales;

[0038] The pipeline defect detection results are obtained based on the pipeline defect feature fusion images of different scales.

[0039] In a third aspect, the present invention provides an electronic device;

[0040] An electronic device includes a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the above-mentioned pipeline defect detection method based on multi-source data fusion is completed.

[0041] In a fourth aspect, the present invention provides a computer-readable storage medium;

[0042] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the above-mentioned pipeline defect detection method based on multi-source data fusion is completed.

[0043] Compared with the prior art, the present invention has the following beneficial effects:

[0044] 1. The technical solution provided by the present invention, in order to realize pipeline defect detection, adaptively fuses the visible light image containing pipeline surface information and the infrared image containing implicit pipeline internal defect information, retains effective features to the maximum extent, provides sufficient feature information for target detection, and realizes defect detection as comprehensive as possible.

[0045] 2. The technical solution provided by the present invention proposes a pipeline defect detection model including a deep feature extraction network, a feature fusion network and a detection module. The deep feature extraction network is used to process the pipeline defect detection image to obtain pipeline defect feature maps of different scales, and the defect features with large scale differences in the image are fully extracted; the pipeline defect feature maps of different scales are super-resolution reconstructed and feature extracted by the feature fusion network and fused with the corresponding original images to obtain pipeline defect feature fusion maps of different scales for pipeline defect detection. Without losing the original information of the image, the fuzzy defect features in the image are restored to achieve effective utilization of the defect features.

[0046] 3. The technical solution provided by the present invention, in order to extract the pipeline features in the image, constructs a pipeline defect detection model using CBM module, CBMC3 module, etc., increases the network depth, effectively extracts feature maps with different spatial information and semantic information, and improves the accuracy of pipeline defect detection.

[0047] 4. The technical solution provided by the present invention introduces the SimAM attention module to enhance the effective information in the image in order to fully process the effective features for pipeline defect detection, so as to ensure comprehensive and focused processing of the feature image; SimAM attention is a lightweight attention mechanism and will not burden the data processing speed.

[0048] 5. The technical solution provided by the present invention uses sub-pixel convolution for upsampling in order to effectively utilize all pipeline features in the image, which can restore the fuzzy features in the image as much as possible and improve the accuracy of pipeline defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0050] Figure 1 A schematic diagram of a process flow provided by an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of a network architecture of a pipeline defect detection model provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of a system framework provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0054] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0055] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0056] Embodiment 1

[0057] Most of the pipeline defect detection in the prior art focuses on pipeline surface defect detection, and the feature extraction capability of the algorithm is limited, resulting in low pipeline defect detection accuracy; therefore, the present invention provides a pipeline defect detection method based on multi-source data fusion, which is improved based on the yolo framework, and a pipeline defect detection model is constructed through modules such as CBM module, CBMC3 module, and SimAM attention mechanism. While improving the network feature extraction capability, the data processing speed is improved to achieve accurate, comprehensive and efficient detection of pipeline defects.

[0058] Next, combine Figure 1-Figure 2 , a pipeline defect detection method based on multi-source data fusion disclosed in this embodiment is described in detail. The pipeline defect detection method based on multi-source data fusion includes the following steps:

[0059] S1. Obtaining a visible light image and an infrared image of the pipeline to be inspected.

[0060] Visible light images are rich in details, but are easily affected by factors such as weather and lighting; infrared images can better display hidden targets, but the details are not rich enough. Therefore, in this embodiment, visible light images and infrared images are used for subsequent pipeline defect detection. Infrared cameras are used to collect infrared images of the pipeline to be inspected, and cameras are used to collect visible light images.

[0061] S2. The visible light image and the infrared image are processed by an adaptive channel addition fusion strategy to generate a pipeline defect detection image.

[0062] Taking into account the different sizes of collected images and the different pixel information contained in the images in different application scenarios, using fixed weights to fuse multi-source images cannot fully display the features contained in the images, affecting the effectiveness of feature extraction in subsequent defect detection.

[0063] At the same time, when collecting images, it is inevitable to capture the environmental information of the pipeline, which is interference information for subsequent pipeline defect detection. Therefore, in this embodiment, before performing pipeline defect detection, the background area is segmented in advance to reduce its adverse effects on pipeline defect detection.

[0064] As an implementation mode, step S2 specifically includes:

[0065] S201, input the visible light image and the infrared image into a parallel U-Net network for segmentation processing, and obtain corresponding visible light target feature maps and infrared target feature maps respectively. Here, the visible light target feature map and the infrared target feature map only contain pipelines.

[0066] In this embodiment, the network parameters of the parallel U-Net networks are the same. Here, the network structure of the U-Net network is not improved. Before application, the U-Net network is trained using visible light images and infrared images of the marked background area and the corresponding visible light target feature maps and infrared target feature maps until a trained network is obtained.

[0067] S202: Input the visible light target feature map and the infrared target feature map into the adaptive image fusion module to obtain the pipeline defect detection image. The specific calculation process is as follows:

[0068] S2021, adding the pixel values ​​of all channels at each pixel coordinate of the visible light target feature map to obtain the corresponding first pixel values ; Add the pixel values ​​of all channels at each pixel coordinate of the infrared image to obtain the second pixel value , as shown below:

[0069] ;

[0070] ;

[0071] in, represents the pixel coordinates of the feature map, Represents the feature map channels, Indicates the maximum number of channels of the feature map. The number of channels refers to the dimension of the feature map in the depth direction. Represents the visible light target feature map at coordinates ( x ,y ), the pixel value of the dth channel, Indicates the infrared target feature map at coordinates ( x , y ) and the pixel value of the dth channel.

[0072] S2022, taking any pixel coordinate in the visible light target feature map ( x , y ) as the center, sum the first pixel value in the 3*3 window, and use the coordinates of any pixel in the infrared target feature map ( x , y ), sum the second pixel values ​​in the 3*3 window, and calculate the weights of the visible light target feature map and the infrared target feature map at the pixel coordinates. The specific calculation process is as follows:

[0073] ;

[0074] ;

[0075] ;

[0076] ;

[0077] In the formula, Indicates The sum of the first pixel values ​​in the 3*3 window centered at Indicates The sum of the second pixel values ​​within the 3*3 window centered at , Indicates the window size, represents the adaptive fusion weight of the visible light target feature map, Represents the adaptive fusion weights of infrared target feature maps.

[0078] S2023, adaptively fuse the pixel values ​​of the corresponding channels of the infrared image feature map and the visible light image feature map to obtain a pipeline defect detection image, wherein any pixel coordinate in the pipeline defect detection image ( x , y ) The pixel value in the dth channel is represented as follows:

[0079] .

[0080] S3, inputting the pipeline defect detection image into the trained pipeline defect detection model for processing to obtain the pipeline defect detection result. The pipeline defect detection model includes a deep feature extraction network, a feature fusion network and a detection module connected in sequence.

[0081] Specifically, Figure 2 As shown, the feature extraction network includes two CBM modules, a CBMC3 module, a CBM module, a CBMC3 module, a CBM module, a CBMC3 module, a SimAM attention module and a pooling layer connected in sequence; the feature fusion network includes a sub-pixel convolution layer, a CBM module, a CBMC3 module, a sub-pixel convolution layer, a separation convolution layer, a CBM module, a CBMC3 module and a separation convolution layer connected in sequence; the output of the first sub-pixel convolution layer is concatenated with the output of the second CBMC3 module as the input of the corresponding CBM module; the output of the second sub-pixel convolution layer is concatenated with the output of the first CBMC3 module as the input of the corresponding separation convolution layer and the first detection head; the output of the fourth CBMC3 module is concatenated with the output of the separation convolution layer as the input of the corresponding CBM module; the detection module includes three detection heads.

[0082] The CBMC3 module consists of a CBM module and a C3 module connected in sequence. The C3 module includes a stacked Bottleneck module and a convolutional layer. The CBM module consists of a Conv layer, a BN layer, and a Mish activation function. The Mish activation function is expressed as:

[0083] ;

[0084] In the formula, represents the hyperbolic tangent function, represents the soft threshold function, Represents the input value.

[0085] The Mish activation function combines the smoothness of linear transformation, exponential function and the nonlinear characteristics of hyperbolic tangent function, balances the nonlinear expression ability of the activation function and the efficiency of gradient propagation, and further improves the learning efficiency of the pipeline defect detection model.

[0086] As an implementation method, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, and the specific process of obtaining the pipeline defect detection result is as follows:

[0087] S301, sequentially processing pipeline defect detection images through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales.

[0088] Considering that the size of pipeline defects is not controlled by humans, it is inevitable that some defect targets are small and irregular in size. Therefore, in this embodiment, the CBM module and the CBMC module are used to improve the feature extraction network, increase the network depth, and improve the network's ability to extract small features.

[0089] Next, taking a pipeline defect detection image with a size of 640×640 as an example, S201 is described in detail:

[0090] S3011, the pipeline defect detection image with a size of 640×640 is first processed by the first CBM module, the second CBM module and the first CBMC3 module in sequence to obtain a first output feature map with a size of 160×160; the first output feature map with a size of 160×160 is input into the third CBM module and the second CBMC3 module for processing in sequence, and a first output feature map with a size of 80×80 is output; the first output feature map with a size of 80×80 is input into the third CBM module and the third CBMC module for processing to obtain a first output feature map with a size of 40×40, and then input into the SimAM attention module and the pooling layer for processing to obtain a first output feature map with a size of 40×40 with weight information, and it is used as a pipeline defect feature map of different scales together with the first output feature map with a size of 160×160 and the first output feature map with a size of 80×80.

[0091] The SimAM attention mechanism is a lightweight attention mechanism that can combine the spatial information and channel information of the input feature map to evaluate its importance, enhance the effective information, and weaken the redundant or useless information. In this embodiment, in order to make full use of the effective features, reduce the operating burden of the network, and ensure computational efficiency, the SimAM attention module is introduced.

[0092] Next, taking the processing of the first output feature map with a size of 80×80 as an example, the SimAM attention module is specifically explained.

[0093] First, the first output feature map with a size of 80×80 is convolved and batch normalized through the convolution layer, BN layer, Mish activation function, convolution layer, BN layer, Mish activation function, and then input into the C3 module. After being processed by the standard convolution layer, it enters the Bottleneck layer for processing. Its output is concatenated with the output of the CBM module and then input into the Conv layer to obtain the first output feature map with a size of 40×40. Among them, the Bottleneck layer contains a 1*1 convolution layer and a 3*3 convolution layer. The output of the 3*3 convolution layer is jump-connected to the input of the Bottleneck layer.

[0094] Then, the first output feature map with a size of 40×40 is input into the SimAM attention module for processing. The i-th pixel is evaluated by the energy function to determine its importance. The first output feature map with a size of 40×40 is represented as X. The specific calculation process is as follows:

[0095] ;

[0096] In the formula, represents the energy function evaluation value of the i-th pixel, is the regularization term, is the i-th pixel of X on a single channel, Represents the average value of all pixels in a single channel. represents the variance of all pixels on a single channel; where It is expressed as:

[0097] ;

[0098] In the formula, is the number of pixels.

[0099] It is expressed as:

[0100] ;

[0101] ;

[0102] In the formula, is the output feature map, express Activation function, E represents all pixels in X A collection of values, The smaller the value, the greater the difference between the pixel and the surrounding pixels, the more linearly separable it is, and the higher the importance. Therefore, its reciprocal is used as the weight coefficient to make better use of the extracted effective and key features.

[0103] Finally, The input is processed by the pooling layer and then output.

[0104] S302, inputting pipeline defect feature maps of different scales into a feature fusion network, performing bottom-up multi-layer feature fusion on the pipeline defect feature maps, and obtaining pipeline defect feature fusion maps of different scales.

[0105] For example, Figure 2 As shown in the figure, the 40×40 pipeline defect feature map output by the pooling layer is first input into the sub-pixel convolution layer for upsampling to obtain a second output feature map of size 80×80, which is then concatenated with the pipeline defect feature map output by the second CBMC3 module in the deep extraction network, and input into the CBM module and the CBMC3 module for sequential processing. After the output feature is sub-pixel up-sampled, it is concatenated with the output of the first CBMC3 module in the deep extraction network to obtain a pipeline defect feature fusion map of size 160×160.

[0106] Then, the pipeline defect feature map with a size of 160×160 is input into the separation convolution layer to obtain a feature map with a size of 80×80, which is concatenated with the output of the first CBMC3 module in the feature fusion network, and then input into the CBM module and the CBMC3 module for processing in sequence to obtain a pipeline defect feature fusion map with a size of 80×80.

[0107] Here, the convolutional layers in the CBM module and the CBMC3 module are used to perform convolution processing on the spliced ​​image, which can eliminate the aliasing effect caused by image fusion.

[0108] The pipeline defect feature fusion map with a size of 80×80 is then input into the separation convolution layer to obtain a feature map with a size of 40×40. It is then concatenated with the pipeline defect feature map output by the pooling layer as a pipeline defect feature fusion map with a size of 40×40.

[0109] In order to reduce the use of repeated information and avoid data redundancy, in this embodiment, separable convolution is introduced instead of ordinary convolution, thereby improving the data processing speed of the model. As an implementation method, the specific processing process of the separable convolution is: first, a convolution operation is performed on the input feature map, and then a deep convolution operation is performed, and the output of the convolution operation and the output after the deep convolution operation are spliced, and finally an average pooling operation is performed on the spliced ​​result to achieve dimensionality reduction.

[0110] Considering that the clarity of the image cannot be guaranteed in practical applications, upsampling by using sub-pixel convolution can improve the resolution of the blur feature map, thereby improving the accuracy of pipeline defect detection; as an implementation method, upsampling by using the sub-pixel convolution layer is specifically expressed as follows:

[0111] ;

[0112] In the formula, is the output result after sub-pixel convolution, Y is the input feature map, that is, the output of the adjacent CBMC3 module or pooling layer, ( x , y , c ) is the spatial coordinate of the input feature map, is the modulo operation, C is the number of channels of the input feature map, and r is the multiple by which the feature map is to be enlarged.

[0113] S4. Obtain pipeline defect detection results based on pipeline defect feature fusion images of different scales.

[0114] Specifically, the pipeline defect feature fusion map with a size of 160×160, the pipeline defect feature fusion map with a size of 80×80, and the pipeline defect feature fusion map with a size of 40×40 are all input into the first detection head, and the predicted category is output; the pipeline defect feature fusion map with a size of 160×160, the pipeline defect feature fusion map with a size of 80×80, and the pipeline defect feature fusion map with a size of 40×40 are all input into the second detection head, and the predicted position is output; the pipeline defect feature fusion map with a size of 160×160, the pipeline defect feature fusion map with a size of 80×80, and the pipeline defect feature fusion map with a size of 40×40 are all input into the third detection head, and the confidence is output.

[0115] As an implementation method, before applying the pipeline defect detection model to pipeline defect detection, the pipeline defect detection model needs to be trained. The specific process is as follows:

[0116] (a) Create a dataset.

[0117] Visible light images and infrared images of the pipeline are collected and fused, and defect types such as cracks, scratches, leaks, welds, etc. are marked. Finally, defect images with category labels are obtained, and the training set and test set are divided into 8:2 ratios.

[0118] (b) Input the training set into the constructed defect detection model for training.

[0119] (c) Verify the performance of the defect detection model using the test set.

[0120] In this embodiment, corresponding to the predicted category, predicted position and confidence output by the detection head, a classification loss function, a prediction box loss function and a confidence loss function are used as loss functions of the pipeline defect detection model.

[0121] Among them, the classification loss function is expressed as follows:

[0122] ;

[0123] In the formula, Represents the category vector of the predicted box, Represents the one-hot encoding of the target box category corresponding to the prediction box, Represents the weight of the positive sample of the classification, set to 1, represents the cross entropy loss function.

[0124] The prediction box loss function is expressed as follows:

[0125] ;

[0126] In the formula, represents the intersection-over-union loss function, represents the prediction box, Represents the true box.

[0127] The confidence loss function is expressed as follows:

[0128] ;

[0129] In the formula, represents the target confidence score in the prediction box, Represents the IOU value between the predicted box and the corresponding real box, Indicates the weight of positive samples with or without targets, set to 1.

[0130] Embodiment 2

[0131] Combination Figure 3 This embodiment discloses a pipeline defect detection system based on multi-source data fusion, including:

[0132] The data fusion module is configured to: obtain a visible light image and an infrared image of the pipeline to be inspected, process the visible light image and the infrared image through an adaptive channel addition fusion strategy, and generate a pipeline defect detection image;

[0133] The defect detection module is configured to: input the pipeline defect detection image into the trained pipeline defect detection model for processing, and obtain the pipeline defect detection result;

[0134] Among them, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, which specifically includes:

[0135] The pipeline defect detection images are processed sequentially through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales;

[0136] The pipeline defect feature maps of different scales are input into the feature fusion network, and the pipeline defect feature maps are fused with multiple layers from bottom to top to obtain pipeline defect feature fusion maps of different scales;

[0137] The pipeline defect detection results are obtained based on the pipeline defect feature fusion images of different scales.

[0138] It should be noted that the above data fusion module and defect detection module correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above Embodiment 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.

[0139] Embodiment 3

[0140] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned pipeline defect detection method based on multi-source data fusion are completed.

[0141] Embodiment 4

[0142] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned pipeline defect detection method based on multi-source data fusion are completed.

[0143] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0146] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0147] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A pipeline defect detection method based on multi-source data fusion, characterized in that: include: Obtain visible light images and infrared images of the pipeline to be inspected, process the visible light images and infrared images through an adaptive channel addition fusion strategy, and generate pipeline defect detection images; The pipeline defect detection image is input into the trained pipeline defect detection model for processing to obtain the pipeline defect detection result; Among them, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, which specifically includes: The pipeline defect detection images are processed sequentially through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales; The pipeline defect feature maps of different scales are input into the feature fusion network, and the pipeline defect feature maps are fused with multiple layers from bottom to top to obtain pipeline defect feature fusion maps of different scales; Obtain pipeline defect detection results based on pipeline defect feature fusion images of different scales; The bottom-up multi-layer feature fusion of the pipeline defect feature map to obtain pipeline defect feature fusion maps of different scales specifically includes: Perform sub-pixel convolution upsampling on the pipeline defect feature map, and perform feature fusion on the processed pipeline defect feature map with the pipeline defect feature map of the same scale; The pipeline defect feature map after feature fusion is input into the corresponding cascaded CBM module, CBMC3 module and separation convolution layer for processing to obtain pipeline defect feature fusion maps of different scales; The sub-pixel convolution up-sampling process on the pipeline defect feature map specifically includes: Perform super-resolution reconstruction on the pipeline defect feature map according to the size and upsampling multiple of the pipeline defect feature map to obtain multiple feature maps of the same size; Multiple feature maps of equal size are rearranged according to the interpolation function of the convolutional layer.

2. The pipeline defect detection method based on multi-source data fusion according to claim 1 is characterized in that: The processing of the visible light image and the infrared image by the adaptive channel addition fusion strategy specifically includes: The sum of the pixel values ​​of all channels at each pixel coordinate of the visible light image and the infrared image is obtained respectively, and the sum of the pixel values ​​of all channels under the preset window is calculated with any pixel coordinate as the center, and the adaptive fusion weight at the pixel coordinate is determined; Visible light image and infrared image are weightedly fused according to adaptive fusion weights.

3. The pipeline defect detection method based on multi-source data fusion according to claim 1, characterized in that: The pipeline defect detection images are processed sequentially by multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales, specifically including: The pipeline defect detection image is input into multiple groups of cascaded CBM modules and CBMC3 modules for sequential processing to extract spatial information and semantic information and obtain the first output feature maps of different scales; The first output feature map finally output by the CBMC3 module is processed by the SimAM attention module, and feature extraction is performed by combining spatial information and channel information to obtain the final output features of the SimAM attention module, which are used together with the remaining first output feature maps as pipeline defect feature maps of different scales.

4. The pipeline defect detection method based on multi-source data fusion according to claim 3, wherein the CBMC3 module includes a CBM module and a C3 module connected in sequence, the CBM module includes a Conv layer, a BN layer and a Mish activation function connected in sequence, and the C3 module includes a stacked Bottleneck module and a convolution layer.

5. The pipeline defect detection method based on multi-source data fusion according to claim 1, characterized in that: The loss function of the pipeline defect detection model includes a classification loss function, a confidence loss function and a prediction box loss function.

6. The pipeline defect detection system based on multi-source data fusion is characterized by: include: The data fusion module is configured to: obtain a visible light image and an infrared image of the pipeline to be inspected, process the visible light image and the infrared image through an adaptive channel addition fusion strategy, and generate a pipeline defect detection image; The defect detection module is configured to: input the pipeline defect detection image into the trained pipeline defect detection model for processing, and obtain the pipeline defect detection result; Among them, the pipeline defect detection image is input into the trained pipeline defect detection model for processing, which specifically includes: The pipeline defect detection images are processed sequentially through multiple cascaded CBM modules and CBMC3 modules to obtain pipeline defect feature maps of different scales; The pipeline defect feature maps of different scales are input into the feature fusion network, and the pipeline defect feature maps are fused with multiple layers from bottom to top to obtain pipeline defect feature fusion maps of different scales; Obtain pipeline defect detection results based on pipeline defect feature fusion images of different scales; The bottom-up multi-layer feature fusion of the pipeline defect feature map to obtain pipeline defect feature fusion maps of different scales specifically includes: Perform sub-pixel convolution upsampling on the pipeline defect feature map, and perform feature fusion on the processed pipeline defect feature map with the pipeline defect feature map of the same scale; The pipeline defect feature map after feature fusion is input into the corresponding cascaded CBM module, CBMC3 module and separation convolution layer for processing to obtain pipeline defect feature fusion maps of different scales; The sub-pixel convolution up-sampling process on the pipeline defect feature map specifically includes: Perform super-resolution reconstruction on the pipeline defect feature map according to the size and upsampling multiple of the pipeline defect feature map to obtain multiple feature maps of the same size; Multiple feature maps of equal size are rearranged according to the interpolation function of the convolutional layer.

7. An electronic device, characterized in that: The invention comprises a memory and a processor and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the pipeline defect detection method based on multi-source data fusion according to any one of claims 1 to 5 is completed.

8. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the pipeline defect detection method based on multi-source data fusion as described in any one of claims 1 to 5.