A pipeline nondestructive testing method, device, storage medium and computer

By combining semi-supervised learning with autoencoders and metric learning models, a pipeline non-destructive testing model was constructed. This model solved the problem of poor robustness caused by the limited amount of pipeline defect data, improved detection accuracy and noise resistance, and enhanced the detection effect on minute defects.

CN116596852BActive Publication Date: 2026-03-24PIPECHINA SOUTH CHINA CO
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-24
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing pipeline non-destructive testing technologies suffer from poor robustness and weak generalization ability of deep learning models due to the limited amount of pipeline defect data, resulting in problems such as missed detections and false detections.

Method used

A computer image recognition model is constructed using a semi-supervised learning method. A sample set is built using normal and defective images. Positive and negative sample terms are designed using cluster centers as anchor terms. The model is trained by combining an autoencoder, a metric learning model, and a memory bin.

Benefits of technology

It improves the accuracy and noise robustness of pipeline inspection, enhances the detection rate of minor defects and reduces the false detection rate, achieving higher detection precision and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116596852B_ABST
    Figure CN116596852B_ABST
Patent Text Reader

Abstract

The application relates to a pipeline nondestructive testing method and device, a storage medium and a computer, the method comprising the following steps: constructing a sample set by using normal images and defect images of a pipeline; the images in the sample set comprise normal images and defect images; constructing a computer image recognition model; training the computer image recognition model by using the images in the sample set based on a semi-supervised learning method to obtain a pipeline nondestructive testing model; obtaining a to-be-tested image of the pipeline; and performing pipeline nondestructive testing by inputting the to-be-tested image into the pipeline nondestructive testing model; the application reduces the intraclass distance in the same background, increases the interclass distance between different background features; when training a sample containing defects, the tensors of all defect regions are regarded as negative items, that is, negative sample items, and other items remain unchanged, so that the intraclass distance of the background is reduced, the spatial distance between the background features and the defect features is increased, the response strength of the tiny defects is highlighted, the detection rate is increased, and the false detection rate on noise regions is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of pipeline detection, and particularly relates to a pipeline nondestructive detection method and device, a storage medium and a computer. BACKGROUND

[0002] At present, the nondestructive detection technology has been successfully applied in the pipeline detection industry. Specifically, a detection module adsorbed on a pipeline is used to detect the pipeline and comprehensively evaluate the detection points of the pipeline, so as to improve the detection accuracy and the safety of the pipeline. By detecting multiple points of the pipeline, vibration parameters, eddy current changes, magnetic flux changes, deformation conditions and weld states of the pipeline detection points are obtained, and a state value of the pipeline detection points is determined based on a BP neural network. According to a wall thickness safety factor, a deformation safety factor and a weld safety factor of the detection points, a comprehensive evaluation value of the detection points is determined, and the detection points of the pipeline are comprehensively evaluated.

[0003] However, the existing pipeline nondestructive detection technology determines the state value of the pipeline detection points based on the BP neural network, so the existing technology still has some problems. For example, due to the small amount of pipeline defect data, the deep learning model has poor robustness and weak generalization ability, and there are problems such as missed detection and false detection. SUMMARY

[0004] In order to solve the technical problems in the prior art that the small amount of pipeline defect data leads to poor robustness and weak generalization ability of the deep learning model, and there are problems such as missed detection and false detection, the present application provides a pipeline nondestructive detection method, device, storage medium and computer.

[0005] The technical solutions of the present application for solving the above technical problems are as follows:

[0006] A pipeline nondestructive detection method comprises the following steps:

[0007] A sample set is constructed using normal images and defect images of a pipeline; wherein the images in the sample set include the normal images and the defect images;

[0008] A computer image recognition model is constructed;

[0009] Based on the semi-supervised learning method, and the image in the sample set is used to train the computer image recognition model, and a pipeline nondestructive testing model is obtained; Wherein, when the normal image in the sample set is used as a training sample, the clustering center is used as an anchor item, the clustering cluster corresponding to the defect-free region background tensor in the normal image is used as a positive sample item, and the clustering center except the defect-free region background tensor in the normal image is used as a negative sample item; When the defect image in the sample set is used as a training sample, the clustering center is used as an anchor item, the clustering cluster corresponding to the defect region tensor in the defect image is used as a negative sample item, the clustering cluster corresponding to the defect-free region background tensor in the defect image is used as a positive sample item, and the clustering center except the defect region tensor and the defect-free region background tensor in the defect image is used as a negative sample item;

[0010] Obtaining a to-be-tested image of the pipeline;

[0011] The to-be-tested image is input into the pipeline nondestructive testing model for pipeline nondestructive testing.

[0012] The abnormality detection algorithm belongs to a semi-supervised mode, the clustering center is used as an anchor item in the training of the sample without defects, the defect-free region background tensor is used as a positive sample item, and the other clustering centers are used as negative sample items, so that the intraclass distance in the same background can be reduced, and the interclass distance between different background features can be increased.

[0013] On the basis of the above technical scheme, the application can also be improved as follows.

[0014] Further, the computer image recognition model comprises a self-encoder, a metric learning model and a memory bin, and the self-encoder comprises an encoder and a decoder.

[0015] Based on the semi-supervised learning method, and the image in the sample set is used to train the computer image recognition model, and a pipeline nondestructive testing model is obtained, comprising the following steps:

[0016] The encoder is used to extract the feature tensor of all images in the sample set, and a feature tensor data set is obtained;

[0017] Based on the semi-supervised learning method, and using the feature tensor data set to train the metric learning model, a trained metric learning model is obtained; wherein the feature tensors in the feature tensor data set include the positive sample items and the negative sample items;

[0018] In the process of training the metric learning model based on the semi-supervised learning method and using the feature tensor data set, the memory warehouse is used to store the positive sample items;

[0019] The feature tensors in the feature tensor data set are input into the decoder reconstruction pipeline image;

[0020] The encoder, the trained metric learning model, the memory warehouse, and the decoder are integrated into the pipeline nondestructive testing model.

[0021] The beneficial effects of the above further solutions are that by setting the memory warehouse, the memory warehouse uses a data structure container to store the vector set of normal sample background features in the training stage, and then compares the feature vector corresponding to each pixel point of the image to be tested with the feature vector in the memory warehouse in the test stage, and uses the difference between the two to reflect the possibility of defects or abnormalities of the pixel point.

[0022] Further, the loss function in the process of training the metric learning model is a triplet loss function.

[0023] Further, the calculation formula of the loss function Loss in the process of training the computer image recognition model is:

[0024]

[0025] Wherein, α represents the dynamic weight of the loss function separate_loss, β represents the dynamic weight of the loss function compact_loss, e represents the natural constant, epoch represents the iteration number of the computer image recognition model, and the calculation formula of the loss function separate_loss is:

[0026]

[0027] The calculation formula of the loss function compact_loss is:

[0028]

[0029] The calculation formula of the loss function loss_pixel is:

[0030]

[0031] MSE(qi ,c i ) represents the root mean square error of the metric learning model, represents the reconstruction error of the autoencoder, represents the triplet distance value of the metric learning model, q i represents the positive sample item, c i represents the cluster center of the cluster to which the positive sample item belongs, and in the training of the background image without defects, the compact_loss in the loss function represents the negative sample item; in the training of the background image with defects, represents the cluster of the defect region tensor in the defect image; d(q i ,c i ) represents the Euclidean distance between c i and q i ; represents the Euclidean distance between q i ; m represents a preset distance threshold between the positive sample and the negative sample, and N represents the number of samples in the training of the metric learning model; represents the output image of the decoder, I i represents the input image of the encoder, and n represents the number of input images of the encoder; i is a positive integer.

[0032] Further, the number of defect images in the sample set used for training the computer image recognition model is 5.

[0033] The beneficial effect of the above further scheme is that by setting the number of defect images in the sample set used for training the computer image recognition model to 5, the computer image recognition model can be prevented from overfitting.

[0034] Further, in the training of the computer image recognition model, the test set used for testing the trained computer image recognition model is composed of only normal images.

[0035] To solve the above technical problems, the present application also provides a pipeline nondestructive testing device, and the specific technical content is as follows:

[0036] A pipeline nondestructive testing device comprises a data acquisition module, a model establishment module, a model training module, and a detection module.

[0037] The data acquisition module is configured to construct a sample set by using normal images and defect images of a pipeline; wherein the images in the sample set comprise the normal images and the defect images.

[0038] The model establishing module is configured to construct a computer image recognition model.

[0039] The model establishing module is configured to train the computer image recognition model based on a semi-supervised learning method and using images in the sample set to obtain a pipeline nondestructive detection model.

[0040] The data collecting module is further configured to acquire a to-be-tested image of the pipeline.

[0041] The detecting module is configured to perform pipeline nondestructive detection by inputting the to-be-tested image into the pipeline nondestructive detection model.

[0042] To solve the above technical problems, the present application further provides a storage medium, and the specific technical content is as follows:

[0043] A storage medium stores a computer program or computer instructions, and the computer program or the computer instructions are executed by a processor of a computer to realize the steps of the pipeline nondestructive detection method.

[0044] To solve the above technical problems, the present application further provides a computer, and the specific technical content is as follows:

[0045] A computer comprises a memory and one or more processors, the memory stores executable codes, and the one or more processors execute the executable codes to realize the steps of the pipeline nondestructive detection method. BRIEF DESCRIPTION OF DRAWINGS

[0046] Figure 1 A flowchart of the pipeline nondestructive detection method in the embodiment of the present application;

[0047] Figure 2 A structural schematic diagram of the computer image recognition model in the embodiment of the present application;

[0048] Figure 3 A structural schematic diagram of the pipeline nondestructive detection device in the embodiment of the present application. DETAILED DESCRIPTION

[0049] The principles and features of the present application are described below in conjunction with the accompanying drawings, which are provided only for explanation of the present application and are not intended to limit the scope of the present application.

[0050] Embodiment 1

[0051] As shown in the embodiment, a pipeline nondestructive testing method is provided, comprising the following steps: Figure 1

[0052] S1, constructing a sample set by using normal images and defect images of a pipeline; wherein the images in the sample set comprise the normal images and the defect images.

[0053] S2, constructing a computer image recognition model.

[0054] S3, training the computer image recognition model based on a semi-supervised learning method and by using the images in the sample set to obtain a pipeline nondestructive testing model; wherein when the normal images in the sample set are used as training samples, the clustering centers are used as anchor items, the clustering cluster corresponding to the background tensor of the defect-free area in the normal images is used as a positive sample item, and the clustering centers other than the background tensor of the defect-free area in the normal images are used as negative sample items; when the defect images in the sample set are used as training samples, the clustering centers are used as anchor items, the clustering cluster corresponding to the defect area tensor in the defect images is used as a negative sample item, the clustering cluster corresponding to the background tensor of the defect-free area in the defect images is used as a positive sample item, and the clustering centers other than the defect area tensor and the background tensor of the defect-free area in the defect images are used as negative sample items; the loss function in the process of training the metric learning model is specifically a triplet loss function.

[0055] In the sample set used for training the computer image recognition model, the number of defect images is 5. By setting the number of defect images in the sample set used for training the computer image recognition model to 5, overfitting of the computer image recognition model can be prevented.

[0056] In the process of training the computer image recognition model, the test set used for testing the trained computer image recognition model is composed of the normal images.

[0057] Specifically, the calculation formula of the loss function Loss in the process of training the computer image recognition model is as follows:

[0058] Loss=α×separate_loss+β×compact_loss+loss_pixel,

[0059] α=e -(epoch+5) ​, β = log2 (epoch + 2),

[0060] wherein, a represents a dynamic weight of the loss function separate_loss, β represents a dynamic weight of the loss function compact_loss, e represents a natural constant, epoch represents an iteration number of the computer image recognition model, and a calculation formula of the loss function separate_loss is as follows:

[0061]

[0062] a calculation formula of the loss function compact_loss is as follows:

[0063]

[0064] a calculation formula of the loss function loss_pixel is as follows:

[0065]

[0066] MSE (q i ,c i ) represents a root mean square error of the metric learning model, represents a reconstruction error of the auto-encoder, represents a triplet distance value of the metric learning model, q i represents the positive sample item, c i represents a cluster center of a cluster to which the positive sample item belongs, and in training of a background picture without defects, the represents the negative sample item; in training of a background picture with defects, represents a cluster to which a defect region tensor in the defect image corresponds; d (q i ,c i ) represents an Euclidean distance between c i and q i ; represents an Euclidean distance between and q i ; m represents a preset distance threshold between the positive sample and the negative sample, and N represents a sample number in training of the metric learning model. represents an output image of the decoder, I i represents an input image of the encoder, and n represents an input image number of the encoder; i is a positive integer.

[0067] Specifically, as Figure 2As shown, the computer image recognition model comprises a self-encoder, a metric learning model and a memory warehouse, the self-encoder comprises an encoder and a decoder; by setting the memory warehouse, the memory warehouse stores a vector set of normal sample background features in a data structure container in the training stage, and then compares the feature vector corresponding to each pixel point of the to-be-tested image with the feature vector in the memory warehouse in the test stage, and uses the difference between the two to reflect the possibility of defects or abnormalities of the pixel point. Figure 2 In the formula, Encoder represents the encoder, Feature map represents the feature map extracted by the encoder, Decoder represents the decoder, metric learning module represents the metric learning model, memory module represents the memory warehouse, attenuation function represents the attenuation function of the metric learning model, and images represent input images and output images.

[0068] Based on the semi-supervised learning method, the computer image recognition model is trained by using the images in the sample set to obtain a pipeline nondestructive testing model, including the following steps.

[0069] S301, the feature tensor of all images in the sample set is extracted by using the encoder to obtain a feature tensor data set; wherein all images refer to all normal images and defect images.

[0070] S302, based on the semi-supervised learning method, and using the feature tensor data set to train the metric learning model, obtaining the trained metric learning model; wherein the feature tensor in the feature tensor data set comprises the positive sample item and the negative sample item.

[0071] S303, in the process of training the metric learning model based on the semi-supervised learning method and using the feature tensor data set, the positive sample item is stored by using the memory warehouse.

[0072] S304, the feature tensor in the feature tensor data set is input into the decoder to reconstruct the pipeline image.

[0073] S305, the encoder, the trained metric learning model, the memory warehouse and the decoder are integrated into the pipeline nondestructive testing model.

[0074] S4, obtaining a to-be-tested image of a pipeline.

[0075] S5, performing pipeline nondestructive testing by inputting the to-be-tested image into the pipeline nondestructive testing model.

[0076] In this invention, both the images in the sample set and the images under test are taken by high-definition 4K resolution industrial cameras. To ensure consistency with real-world conditions, the height of the industrial cameras in this invention is set to the height of image acquisition cameras installed on pipes under real-world conditions, and the focal length and exposure time during shooting are also set according to real-world parameters. The input image of the anomaly detection algorithm, i.e., the image under test, is pre-reset to 512×512 pixels, and the image pixel values ​​are normalized. During the experiment, to simulate the operating speed in a real-world scenario, the camera operating speed was set to 1 m / s during the experimental phase of this invention.

[0077] Experimental results show that, as illustrated in Table 1, the pipeline non-destructive testing method provided by this invention has a good detection effect on pipeline weld areas and excellent anti-interference ability against other noisy areas such as markers and rust. In Table 1, the detection methods listed include SPADE (Sequence Pattern Mining), PaDiM, csflow (Fully Convolutional Cross-Scale Normalized Flow), IKD (Incremental KD Tree), CFA (Unsupervised Machine Learning), and STPM (Unsupervised Anomaly Detection Algorithm Based on Teacher-Student Network), all of which are existing technologies. OURS represents the pipeline non-destructive testing method provided by this invention. The PaDiM algorithm is an image patch-based algorithm that relies on a pre-trained CNN function extractor to decompose the image into multiple patches. Different feature extraction layers are used to extract embeddings from each patch, and activation vectors at different levels are concatenated to obtain embedding vectors containing different semantic levels and resolution information.

[0078]

[0079] Table 1 Comparison of various evaluation indicators for different algorithms

[0080] As shown in Table 1, the pipeline non-destructive testing method proposed in this invention achieves an accuracy of 91.3% in weld defect detection and a weld detection rate of 100%, approaching the detection rate of current state-of-the-art (SOTA) anomaly detection algorithms. However, in terms of defect region segmentation accuracy, the anomaly detection algorithm proposed in this invention far surpasses other algorithms in defect region segmentation accuracy. This is attributed to the introduction of a semi-supervised mode and metric learning module in this invention, which can improve noise robustness and segmentation accuracy to a certain extent. Inference time refers to the time consumed by the algorithm to process all test images and generate anomaly heatmaps, and can be used to evaluate algorithm efficiency to a certain extent. Considering that the algorithm processes data offline and has lower real-time requirements, this invention makes certain compromises in processing speed to improve algorithm performance. Flops is the value of the algorithm's floating-point computation, reflecting the algorithm's complexity to a certain extent. Because the algorithm of this invention only uses an autoencoder as a feature extractor, its Flops evaluation metric is only slightly more complex than the CFA algorithm, and lower than other algorithms that use ResNet series as feature extractors.

[0081] The anomaly detection algorithm proposed in this invention belongs to a semi-supervised mode. During training on samples without defects, cluster centers are used as anchor terms, background tensors of defect-free regions are used as positive terms, and other cluster centers are used as negative terms. This design reduces intra-class distances within the same background and increases inter-class distances between different background features. During training on samples containing defects, all tensors of defective regions are used as negative terms, while other terms remain unchanged. This design reduces intra-class distances while increasing the spatial distance between background features and defect features, thereby highlighting the response intensity of minor defects, increasing the detection rate, and reducing the false detection rate of noisy regions.

[0082] Example 2

[0083] like Figure 3 As shown in Embodiment 1, the present invention provides a pipeline non-destructive testing device, including a data acquisition module, a model building module, a model training module, and a testing module;

[0084] The data acquisition module is used to construct a sample set using normal images and defect images of the pipeline; wherein the images in the sample set include the normal images and the defect images;

[0085] The model building module is used to construct a computer image recognition model;

[0086] The model building module is based on a semi-supervised learning method and uses images from the sample set to train the computer image recognition model to obtain a pipeline non-destructive testing model. Specifically, when using normal images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the background tensor of the defect-free region in the normal image are considered positive samples, and the cluster centers in the normal image other than the background tensor of the defect-free region are considered negative samples. Similarly, when using defective images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the tensor of the defective region in the defective image are considered negative samples, the clusters corresponding to the background tensor of the defect-free region in the defective image are considered positive samples, and the cluster centers in the defective image other than the tensor of the defective region and the background tensor of the defect-free region are considered negative samples.

[0087] The data acquisition module is also used to acquire the image of the pipeline under test;

[0088] The detection module is used to perform non-destructive testing of pipelines by inputting the image to be tested into the pipeline non-destructive testing model.

[0089] Among them, the data acquisition module, model building module, model training module, and detection module are all functional modules corresponding to computer programs or functional devices used to implement these modules.

[0090] The embodiments of the present invention modularize the various steps of a pipeline non-destructive testing method, enabling its application through computer programs or functional devices, thereby achieving productization and commercialization and enhancing its application value.

[0091] Example 3

[0092] Based on Embodiment 1, this embodiment provides a storage medium storing a computer program or computer instructions. When the computer program or computer instructions are executed by a computer processor, they implement the steps of the non-destructive testing method for pipelines as described in Embodiment 1. The storage medium can be an internal storage unit of any device with data processing capabilities as described in any of the foregoing embodiments, such as a hard disk or memory. The storage medium can also be an external storage device of any device with data processing capabilities, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., equipped on the device. Furthermore, the storage medium can include both internal storage units of any device with data processing capabilities and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the device with data processing capabilities, and can also be used to temporarily store data that has been output or will be output.

[0093] Example 4

[0094] Based on Embodiment 1, this embodiment provides a computer, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they implement the steps of the pipeline non-destructive testing method in Embodiment 1.

[0095] The memory can be an internal storage unit of any data processing device described in any of the foregoing embodiments, such as a hard disk or RAM. The memory can also be an external storage device of any data processing device, such as a plug-in hard disk, smart memory card, SD card, flash memory card, etc., mounted on the device. Furthermore, the memory can include both internal storage units and external storage devices of any data processing device. The memory is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.

[0096] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the concept and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A non-destructive testing method for pipelines, characterized in that, Includes the following steps: A sample set is constructed using normal images and defective images of the pipeline; wherein the images in the sample set include both the normal images and the defective images; Constructing computer image recognition models; A pipeline non-destructive testing model is obtained by training the computer image recognition model using images from the sample set using a semi-supervised learning method. Specifically, when using normal images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the background tensor of the defect-free region in the normal image are considered positive samples, and the cluster centers in the normal image other than the background tensor of the defect-free region are considered negative samples. Similarly, when using defective images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the tensor of the defective region in the defective image are considered negative samples, the clusters corresponding to the background tensor of the defect-free region in the defective image are considered positive samples, and the cluster centers in the defective image other than the tensor of the defective region and the background tensor of the defect-free region are considered negative samples. Obtain the image of the pipeline under test; Non-destructive testing of pipelines is performed by inputting the image to be tested into the pipeline non-destructive testing model. The computer image recognition model includes an autoencoder, a metric learning model, and a memory bin; the autoencoder includes an encoder and a decoder. Based on a semi-supervised learning method, and using images from the sample set to train the computer image recognition model, a pipeline non-destructive testing model is obtained, comprising the following steps: The encoder is used to extract feature tensors from all images in the sample set to obtain a feature tensor dataset; wherein, the feature tensors in the feature tensor dataset include the positive sample terms and the negative sample terms; Based on the semi-supervised learning method, and using the feature tensor dataset to train the metric learning model, the trained metric learning model is obtained. During the training of the metric learning model based on the semi-supervised learning method and using the feature tensor dataset, the positive sample items are stored in the memory repository. The pipeline image is reconstructed by inputting the feature tensors from the feature tensor dataset into the decoder; The encoder, the trained metric learning model, the memory bin, and the decoder are integrated into the pipeline non-destructive testing model.

2. The pipeline non-destructive testing method according to claim 1, characterized in that, The loss function used in training the metric learning model is specifically the triplet loss function.

3. The pipeline non-destructive testing method according to claim 1, characterized in that, Loss function during the training of the computer image recognition model The calculation formula is: , , , in, Represents the loss function Dynamic weights, Represents the loss function Dynamic weights, Represents the natural constant. The loss function represents the number of iterations of the computer image recognition model. The calculation formula is: , loss function The calculation formula is: , loss function The calculation formula is: , This represents the root mean square error of the metric learning model. This represents the reconstruction error of the autoencoder. This represents the triplet distance value of the metric learning model. This represents the positive sample item. The loss function represents the cluster center of the cluster to which the positive sample item belongs. When training on a background image without defects, the loss function... In This represents the negative sample item; when training with defective background images, This indicates that the defect image contains clusters corresponding to the tensors of the defect regions; express and The Euclidean distance between them; express and The Euclidean distance between them; This represents a preset distance threshold between the positive and negative samples. This represents the number of samples used to train the metric learning model; This represents the output image of the decoder. This represents the input image of the encoder. This indicates the number of input images for the encoder; It is a positive integer.

4. The pipeline non-destructive testing method according to claim 1, characterized in that, The number of defective images in the sample set used to train the computer image recognition model is 5.

5. The pipeline non-destructive testing method according to claim 1, characterized in that, During the training of the computer image recognition model, the test set used to test the trained computer image recognition model consists entirely of normal images.

6. A non-destructive testing device for pipelines, characterized in that, It includes a data acquisition module, a model building module, a model training module, and a detection module; The data acquisition module is used to construct a sample set using normal images and defect images of the pipeline; wherein the images in the sample set include the normal images and the defect images; The model building module is used to construct a computer image recognition model; The model building module is based on a semi-supervised learning method and uses images from the sample set to train the computer image recognition model to obtain a pipeline non-destructive testing model. Specifically, when using normal images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the background tensor of the defect-free region in the normal image are considered positive samples, and the cluster centers in the normal image other than the background tensor of the defect-free region are considered negative samples. Similarly, when using defective images from the sample set as training samples, cluster centers are used as anchor terms. The clusters corresponding to the tensor of the defective region in the defective image are considered negative samples, the clusters corresponding to the background tensor of the defect-free region in the defective image are considered positive samples, and the cluster centers in the defective image other than the tensor of the defective region and the background tensor of the defect-free region are considered negative samples. The data acquisition module is also used to acquire the image of the pipeline under test; The detection module is used to perform non-destructive testing of pipelines by inputting the image to be tested into the pipeline non-destructive testing model. The computer image recognition model includes an autoencoder, a metric learning model, and a memory bin; the autoencoder includes an encoder and a decoder. Based on a semi-supervised learning method, and using images from the sample set to train the computer image recognition model, a pipeline non-destructive testing model is obtained, comprising the following steps: The encoder is used to extract feature tensors from all images in the sample set to obtain a feature tensor dataset; wherein, the feature tensors in the feature tensor dataset include the positive sample terms and the negative sample terms; Based on the semi-supervised learning method, and using the feature tensor dataset to train the metric learning model, the trained metric learning model is obtained. During the training of the metric learning model based on the semi-supervised learning method and using the feature tensor dataset, the positive sample items are stored in the memory repository. The pipeline image is reconstructed by inputting the feature tensors from the feature tensor dataset into the decoder; The encoder, the trained metric learning model, the memory bin, and the decoder are integrated into the pipeline non-destructive testing model.

7. A storage medium, characterized in that, The storage medium stores a computer program or computer instructions, which, when executed by a computer processor, implement the steps of the pipeline non-destructive testing method as described in any one of claims 1 to 5.

8. A computer, characterized in that, The method includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they implement the steps of the pipeline non-destructive testing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cross-domain pedestrian re-identification method based on heterogeneous convolutional network

    CN111695531A

  • Surface defect detection system and method suitable for steel plate, equipment and medium

    CN115880209A