Polyethylene pipeline welding defect image intelligent identification method and system and computing device

By processing radio frequency signals through wavelet transform, nonlocal mean filtering, and time gain compensation, and combining them with a dual-branch feature fusion network model, the problems of low efficiency and high false negative rate in traditional ultrasonic testing are solved, and efficient automatic identification of welding defects in polyethylene pipes is achieved.

CN120876465BActive Publication Date: 2025-12-23CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511373630.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-23
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Traditional ultrasonic testing of welding defects in polyethylene pipes relies on human experience for interpretation, which is inefficient, has a high rate of missed detection, and the ultrasonic echo signal is weak and easily drowned out by noise.

Method used

The radio frequency signal is processed by wavelet transform, nonlocal mean filtering and time gain compensation, and combined with a dual-branch feature fusion network model for image enhancement and feature extraction to achieve automated defect identification.

Benefits of technology

It improved detection efficiency, reduced the false negative rate, and enhanced the accuracy and reliability of defect feature identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876465B_ABST
    Figure CN120876465B_ABST
Patent Text Reader

Abstract

The application discloses a kind of polyethylene pipeline welding defect image intelligent identification method, system and computing device, comprising: acquisition radio frequency signal, and the radio frequency signal is carried out mixed noise reduction and gain compensation processing, to generate first type image;The first type image is carried out contrast enhancement processing, and second type image is obtained;Based on the defect contained in the second type image by double-branch feature fusion network model is classified and positioned, and corresponding detection result is output.This application optimizes control array image processing, realizes the high-precision analysis, identification and quantitative analysis of polyethylene pipeline hot melt welding defect, reduces the deficiency that polyethylene material acoustic impedance characteristic leads to weak ultrasonic echo signal, defect feature is easily submerged in noise, simultaneously also reduces the deficiency that artificial interpretation phased array image leads to low detection efficiency and high rate of missed detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of industrial image analysis or recognition, and particularly relates to a polyethylene pipeline welding defect image intelligent recognition method and system based on ultrasonic phased array imaging, which is suitable for analyzing the welding structure quality of polyethylene materials such as oil and gas pipelines and chemical containers. BACKGROUND

[0002] Polyethylene (PE) gas pipelines have advantages such as wear resistance, corrosion resistance, impact resistance and chemical stability, and are widely used for the transportation of natural gas and liquefied gas. Since 2000, polyethylene pipes have been widely used in gas pipelines in China, and more than 90% of newly built medium and low pressure urban gas pipelines use PE pipes. Some accident cases show that some potential defects will be exposed after the gas pipeline is operated under a certain pressure for a long time. Therefore, the welding quality detection and evaluation of PE pipelines have become a hot and difficult point in the industry.

[0003] Current studies have shown that different types and degrees of defects have different effects on the reliability of polyethylene pipelines. For in-service polyethylene pipelines, it is of great significance to detect the type and size of defects and judge the safety degree of the pipeline through image detection technology. Various non-destructive testing methods for polyethylene pipeline electric melting and hot melting joints have been established based on non-destructive testing technology at home and abroad, among which ultrasonic phased array detection technology is considered to be the most effective means. However, there are still problems in the detection and quality evaluation of polyethylene pipeline joints, such as:

[0004] (1) Traditional ultrasonic detection relies on manual experience to interpret phased array images, which has low detection efficiency and high missed detection rate;

[0005] (2) The acoustic impedance characteristics of polyethylene materials result in weak ultrasonic echo signals, and the defect characteristics are easily overwhelmed by noise. SUMMARY

[0006] The present application aims to provide a polyethylene pipeline welding defect image intelligent recognition method and system to solve the technical problems existing in the background art.

[0007] To achieve the above-mentioned purpose, the technical solutions adopted by the present application are as follows:

[0008] On the one hand, a polyethylene pipeline welding defect image intelligent recognition method is proposed, which includes the following steps:

[0009] controlling a probe to emit ultrasonic signals to the hot melting joint of the polyethylene pipeline with different defect types, and collecting radio frequency signals returned by the probe;

[0010] based on wavelet transform, decomposing the returned radio frequency signals into low-frequency approximate parts and high-frequency detail parts, and performing threshold processing on high-frequency coefficients corresponding to the high-frequency detail parts.

[0011] wavelet reconstructing the low frequency approximate part and the high frequency detail part after threshold processing of the radio frequency signal to obtain a reconstructed radio frequency signal;

[0012] non-local mean filtering the reconstructed radio frequency signal to obtain a filtered radio frequency signal;

[0013] time gain compensation on the filtered radio frequency signal to generate a first type image;

[0014] contrast enhancement processing on the first type image to obtain a second type image;

[0015] processing the second type image based on a fusion network model of double-branch features to obtain a global feature map and a local feature map;

[0016] channel attention fusion on the global feature map and the local feature map to generate a fusion feature map;

[0017] defect classification and positioning on the fusion feature map, and outputting a corresponding detection result by the fusion network model.

[0018] Further, the parameter information of the wavelet transform is that the wavelet base type is "sym8" and the transform layer number is 5 layers; and the parameter information of the threshold processing is that the threshold mode is a soft threshold mode.

[0019] The threshold processing on the high frequency coefficient corresponding to the high frequency detail part comprises:

[0020] when the high frequency coefficient is not greater than a preset threshold, setting the current high frequency coefficient as 0; and when the high frequency coefficient is greater than the preset threshold, subtracting the preset threshold from the current high frequency coefficient as a new high frequency coefficient;

[0021] The parameter information of the wavelet reconstructing is that the wavelet base type is "sym8";

[0022] The time gain compensation formula is:

[0023]

[0024] wherein, k=0.05dB / μs 2 G0 is the filtered radio frequency signal before compensation, G(t) is the filtered radio frequency signal after compensation, and t is the element delay time of the probe transmitting the ultrasonic signal and receiving the returned ultrasonic signal;

[0025] wherein, the element delay time The formula is as follows:

[0026]

[0027] where x i , x j is the array element coordinate, x d , z d is the defect position coordinate, and v = 2400 m / s.

[0028] Further, the contrast enhancement processing of the first type image to obtain the second type image is based on a limited contrast adaptive histogram equalization algorithm to perform contrast enhancement processing on the first type image to obtain the second type image.

[0029] Further, the fusion network model based on the dual-branch features processes the second type image to obtain a global feature map and a local feature map, including the following steps:

[0030] The ConvBNReLU method is used to perform convolution operation on the second type image, and the first to fourth reverse residual operations are used to extract the global features of the second type image;

[0031] The global feature map is generated based on the channel attention mechanism operation on the global features after the reverse residual operation;

[0032] The convolution operation with different hole rates is performed on the second type image based on the convolutional neural network;

[0033] The multi-scale feature fusion operation is performed on the second type image after the convolution operation based on the feature pyramid to obtain the local feature map.

[0034] Further, the channel attention fusion of the global feature map and the local feature map is performed to generate a fusion feature map, including the following steps:

[0035] The global feature map and the local feature map are dynamically weighted and fused based on the channel attention mechanism to strengthen the defect area response;

[0036] The feature dimension is compressed by global average pooling, and the fusion feature map is generated based on the channel weight;

[0037] where the channel weight w c is as follows:

[0038]

[0039] where GAP is the global average pooling, , r is the compression ratio, which takes the value of 16, C is the channel number, W1 and W2 are linear transformation matrices, ReLU and σ are activation functions, and F global is the global feature map.

[0040] Wherein, the fusion feature map F fused The formula is as follows:

[0041]

[0042] Wherein, F global is a global feature map, F local is a local feature map, w c is a channel weight.

[0043] Further, the method further comprises the following steps:

[0044] Updating the fusion network model parameters based on the new sample, including determining whether a trigger condition of incremental learning is reached based on the false detection rate of the new defect type to update the fusion network model;

[0045] Wherein, the trigger condition Trigger is:

[0046]

[0047] Wherein, FP is the false detection number, and TP is the correct detection number.

[0048] Further, the method further comprises the following steps:

[0049] Determining the uncertainty of the model prediction based on Monte Carlo Dropout, including:

[0050] Adding a Dropout layer in one or more network models during the model training stage;

[0051] During the model testing stage, when the Dropout layer is forward propagated, the Dropout is randomly enabled according to a preset probability, and T times of sampling are performed to calculate the prediction variance : , wherein, is the average value of the prediction result, is the prediction result; when the prediction variance is greater than 0.1, the manual review is automatically triggered.

[0052] In a second aspect, a polyethylene pipe welding defect image intelligent identification system is provided, comprising:

[0053] A probe is arranged on the wedge block, and the probe is used to receive a scanning signal and emit an ultrasonic signal to a hot melt joint of a polyethylene pipe with different defect types, and is used to return a radio frequency signal;

[0054] An image detection system is used to send the scanning signal and collect the radio frequency signal returned from the probe; and based on wavelet transform, the returned radio frequency signal is decomposed into a low-frequency approximate part and a high-frequency detail part, and threshold processing is performed on the high-frequency coefficients corresponding to the high-frequency detail part.

[0055] The image detection system further performs wavelet reconstruction on the low-frequency approximation part and the high-frequency detail part of the threshold-processed high-frequency part of the radio frequency signal to obtain a reconstructed radio frequency signal, and performs non-local mean filtering on the reconstructed radio frequency signal to obtain a filtered radio frequency signal;

[0056] The image detection system further performs time gain compensation on the filtered radio frequency signal to generate a first type image;

[0057] The image detection system further performs contrast enhancement processing on the first type image to obtain a second type image;

[0058] The image detection system further processes the second type image based on a fusion network model of double-branch features to obtain a global feature map and a local feature map, and performs channel attention fusion on the global feature map and the local feature map to generate a fusion feature map;

[0059] The image detection system further performs defect classification and positioning on the fusion feature map, and outputs a corresponding detection result from the fusion network model.

[0060] Further, the parameter information of the wavelet transform is that the wavelet base type is "sym8" and the transform layer number is 5 layers; and the parameter information of the threshold processing is that the threshold mode is a soft threshold mode;

[0061] The image detection system performs threshold processing on high-frequency coefficients corresponding to the high-frequency detail part, including:

[0062] When the high-frequency coefficient is not greater than a preset threshold, the current high-frequency coefficient is set to 0; when the high-frequency coefficient is greater than the preset threshold, the current high-frequency coefficient is subtracted from the preset threshold as a new high-frequency coefficient;

[0063] The parameter information of the wavelet reconstruction is that the wavelet base type is "sym8";

[0064] The time gain compensation formula is:

[0065]

[0066] Wherein, k = 0.05 dB / μs 2 G0 is the filtered radio frequency signal before compensation, G(t) is the filtered radio frequency signal after compensation, and t is the element delay time of the probe transmitting an ultrasonic signal and receiving a returned ultrasonic signal;

[0067] Wherein, the element delay time The formula is as follows:

[0068]

[0069] wherein x i , x j is the array element coordinate, x d , z d is the defect position coordinate, v = 2400 m / s

[0070] In a third aspect, a computing device is provided, comprising: a processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the foregoing polyethylene welding defect image intelligent recognition method.

[0071] The polyethylene welding defect image intelligent recognition method, system and computing device reduce the deficiency that the ultrasonic echo signal is weak and the defect feature is easily submerged by noise caused by the acoustic impedance characteristics of the polyethylene material, and also reduce the deficiency that the detection efficiency is low and the missed detection rate is high caused by manual interpretation of phased array images. BRIEF DESCRIPTION OF DRAWINGS

[0072] Figure 1 is a structural schematic diagram of an embodiment of the polyethylene welding defect image intelligent recognition system provided by the present application;

[0073] Figure 2 is a flowchart of an embodiment of the polyethylene welding defect image intelligent recognition method provided by the present application;

[0074] Figure 3 is a flowchart of the image classification and positioning method based on the double-branch feature fusion network model provided by the present application;

[0075] Figure 4 is a schematic diagram of normal and partial defect classification provided by the present application;

[0076] Figure 5 is a flowchart of another embodiment of the polyethylene pipeline welding defect image intelligent recognition method provided by the present application;

[0077] Figure 6 is a structural schematic diagram of a computing device provided by the present application. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme of the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0079] Therefore, the following detailed description of the embodiments of the application provided in the drawings is not intended to limit the scope of the application claimed, but merely represents selected embodiments of the application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the application without creative labor fall within the scope of the application.

[0080] It should be noted that similar reference numbers and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.

[0081] In the description of the application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the application is usually placed, and are merely for the convenience of describing the application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the application. In addition, the terms "first", "second", "third", and the like are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0082] In addition, the terms "horizontal", "vertical", and the like do not mean that the components must be absolutely horizontal or vertical, but can be slightly inclined. For example, "horizontal" only means that it is more horizontal relative to "vertical", and does not mean that the structure must be completely horizontal, but can be slightly inclined.

[0083] In the description of the application, it should also be noted that unless otherwise explicitly specified and limited, the terms "provided", "mounted", "connected", "linked" should be broadly understood, for example, can be fixedly connected, can be detachably connected, or integrally connected; can be mechanically connected, can be electrically connected; can be directly connected, can be indirectly connected through an intermediate medium, or can be connected between two elements. For those of ordinary skill in the art, the specific meaning of the above terms in the application can be understood according to the specific circumstances.

[0084] Please refer to Figure 1 which is a structural schematic view of an embodiment of the polyethylene pipe welding defect image intelligent recognition system of the application. Specifically, the polyethylene pipe welding defect image intelligent recognition system comprises a polyethylene pipe 1, a wedge block 2, a probe 3, a control frame 4, an encoder 5, an oscilloscope 6, and an image detection system 7.

[0085] Specifically, in the embodiment, the polyethylene pipe 1 is a natural gas conveying pipe, the mixed material grade of which is PE100, the wall thickness is 45mm, and the outer diameter is 500mm; in other embodiments, the mixed material grade of the polyethylene pipe 1 can be other types, such as PE80, and the wall thickness and the outer diameter can also be other size types.

[0086] Specifically, in the embodiment, the encoder 5 is arranged on the controller 4, which is used to control the displacement, angle and other position information of the wedge block 2, and then the position and angle of the probe 3 are accurately controlled through the encoder 5, so that omnidirectional and multi-angle detection of the target object can be realized, thereby improving the detection efficiency and the accuracy of the detection result. In other embodiments, the displacement and angle of the wedge block 2 can be manually controlled, so that the encoder 5 can not be included.

[0087] Specifically, in the embodiment, the image detection system 7 is connected to the probe 3 through the oscilloscope 6, and the image detection system 7 is used to set a scanning signal and can control the scanning action of the probe 3 through the oscilloscope 6 according to a dynamically adjusted element delay rule. For example, the image detection system 7 can set the scanning mode as a fan-shaped scanning mode, set the sound beam focusing depth of the probe 3 as 50mm, set the acquisition card as 16bit resolution, set the sampling rate as 100MHz, and set the scanning angle range as 70° and the step angle as 0.5° to cover the whole area of the weld.

[0088] Specifically, in the embodiment, the probe 3 has 64 elements, and in other embodiments, the number of elements of the probe 3 can also be other values, and the image detection system 7 can also be directly connected to the probe 3.

[0089] Please refer to Figure 2 which is a flowchart of an embodiment of the polyethylene welding defect image intelligent recognition method of the present application. Specifically, the polyethylene pipe welding defect image intelligent recognition method embodiment includes the following steps:

[0090] S101, collect a radio frequency signal, and perform hybrid noise reduction and gain compensation processing on the radio frequency signal to generate a first type image;

[0091] Specifically, in the step S101 of the embodiment, the radio frequency signal is collected by the image detection system 7, and the collected radio frequency signal is processed by the image detection system 7 for hybrid noise reduction and gain compensation to generate a first type image.

[0092] Specifically, in this embodiment, after receiving the scanning signal transmitted by the image detection system 7 or the oscilloscope 6, the probe 3 emits an ultrasonic signal to detect potential defects in the thermofusion joint 8 of the polyethylene pipe 1. Specifically, the ultrasonic signal emitted by the probe 3 can pass through the wedge 2 and enter the interior of the polyethylene pipe 1 and / or the thermofusion joint 8. When the ultrasonic signal encounters a defect, the change in acoustic impedance will cause the ultrasonic signal at the defect to be reflected. The reflected ultrasonic signal will be received by the probe 3, generating a radio frequency signal, which will then be received by the image detection system 7.

[0093] Specifically, in this embodiment, in order to detect different morphological defects in the heat fusion joint 8 of the polyethylene pipe 1, several normal polyethylene pipes and those with various defects (including but not limited to over-welding, cold welding, lack of fusion, holes, and cracks) of the heat fusion joint 8 can be obtained first, and radio frequency signals of different types of heat fusion joints 8 can be obtained through the probe 3 (e.g., Figure 4 Images corresponding to normal and partially defective radio frequency signals are shown (corresponding to images of over-welding defects, normal welding, and cold welding defects) for model training. During formal inspection of welding defects in the ethylene pipeline 1, probe 3 can directly emit ultrasonic signals to one or more parts of the polyethylene pipeline 1 and / or the heat fusion joint 8. The image detection system 7 can then acquire the corresponding radio frequency signals, and the trained model can intelligently identify the defect images. In one embodiment, the image detection system 7 can perform unsupervised learning, that is, unsupervised learning of several normal signals, radio frequency signals with various defects (including but not limited to over-welding, cold welding, lack of fusion, holes, cracks), and radio frequency signals obtained by directly emitting ultrasonic signals to one or more parts of the polyethylene pipeline 1 and / or the heat fusion joint 8 through probe 3, using the model for unsupervised learning.

[0094] Specifically, in this embodiment, since ultrasonic waves encounter energy attenuation during propagation, which affects the clarity and accuracy of imaging, in order to reduce the shortcomings of weak ultrasonic echo signals and easy noise submersion of defect features caused by the acoustic impedance characteristics of polyethylene material, the radio frequency signal is denoised and gain compensated by the image detection system 7 to generate a first type of image.

[0095] Specifically, in this embodiment, the generated first type of image includes several ultrasonic images of normal and various defective thermofusion joints.

[0096] More specifically, in this embodiment, the image detection system 7 performs noise reduction processing on the radio frequency signal based on a hybrid noise reduction algorithm of wavelet transform-nonlocal mean (Wavelet-NLM), and performs gain compensation processing on the noise-reduced radio frequency signal based on a dynamic time gain control (DTGC) algorithm to obtain the first type of image.

[0097] In the noise reduction processing of the radio frequency signal, the image detection system 7 first performs wavelet transform and threshold processing on the radio frequency signal, then performs wavelet reconstruction to obtain a reconstructed radio frequency signal, and then performs non-local mean filtering on the reconstructed radio frequency signal to obtain a filtered radio frequency signal.

[0098] Preferably, the image detection system 7 first decomposes the radio frequency signal into a low-frequency approximation part and a high-frequency detail part based on wavelet transform, and performs threshold processing on the high-frequency coefficients corresponding to the high-frequency detail part, and then reconstructs the low-frequency approximation part and the threshold-processed high-frequency detail part in the radio frequency signal to obtain a reconstructed radio frequency signal.

[0099] Further, in the embodiment, the function used for wavelet transform is pywt.wavedec2(image,'sym8', level=5), where image is the radio frequency signal, the wavelet basis type is'sym8', and the level transform layer number is 5; the function used for high-frequency coefficient threshold processing is pywt.threshold, and the threshold mode used is'soft' (soft threshold mode); when the high-frequency coefficient is not greater than the preset threshold (k*np.median(np.abs(c))), the current high-frequency coefficient is set to 0; when the high-frequency coefficient is greater than the preset threshold (k*np.median(np.abs(c))), the current high-frequency coefficient is subtracted from the preset threshold to obtain a new high-frequency coefficient; where in the preset threshold (k*np.median(np.abs(c))), np.abs is the absolute value, np.median is the median, k is the coefficient, k is 0.1, and c is the high-frequency coefficient to be threshold processed. The function used for wavelet reconstruction is pywt.waverec2, where the wavelet basis type is'sym8' and the transform layer number is not set.

[0100] In other embodiments, the wavelet basis type, the transform layer number, the threshold mode, the coefficient, etc. can be adjusted or selected according to actual needs.

[0101] In the non-local mean filtering of the reconstructed radio frequency signal, the image detection system 7 performs non-local mean filtering on the reconstructed radio frequency signal through cv2.fastNlMeansDenoising to obtain a filtered radio frequency signal, where the filter strength of the non-local mean filtering can be set to 0.2*255. The core idea of the non-local mean filtering algorithm is that for each pixel, not only the small window around it is considered, but also similar areas are found in the entire image, and the average value of these areas is used to update the value of the current pixel. Through the non-local mean filtering operation, the Gaussian noise in the radio frequency signal can be removed while the texture and details of the radio frequency signal are preserved.

[0102] As the ultrasonic wave propagates, its intensity gradually attenuates with time (or distance). This means that, under the same ultrasonic emission energy, the echo signal intensity received by the near field (shallow tissue) is significantly higher than that by the far field (deep tissue). If not compensated, the ultrasonic image will exhibit a false artifact of near field bright and far field dark, seriously affecting the image quality. Therefore, in the embodiment, the image detection system 7 also performs time gain compensation on the filtered radio frequency signal to generate a first type image;

[0103] The time gain compensation formula is as follows:

[0104] (1)

[0105] In formula (1), k = 0.05 dB / μs 2 , G0 is the filtered radio frequency signal before compensation, G(t) is the filtered radio frequency signal after compensation, and t is the element delay time of the probe 3 transmitting the ultrasonic signal and receiving the returned ultrasonic signal;

[0106] The element delay time formula (taking the i th transmitting element and the j th receiving element as an example) is as follows:

[0107] (2)

[0108] In formula (2), x i , x j is the element coordinate, x d , z d is the defect position coordinate, and v = 2400 m / s (ultrasonic longitudinal wave speed in a polyethylene pipeline).

[0109] In the embodiment, after wavelet transform and threshold processing of the radio frequency signal, wavelet reconstruction and non-local mean filtering are performed, which is beneficial to reduce the deficiency that the defect features are easily submerged by noise. At the same time, through gain compensation processing, it is beneficial to reduce the deficiency that the ultrasonic echo signal is weak due to the acoustic impedance characteristics of the polyethylene material.

[0110] Specifically, the polyethylene pipeline welding defect image intelligent recognition method embodiment further comprises the following steps:

[0111] S102, performing contrast enhancement processing on the first type image to obtain a second type image.

[0112] ​Specifically, in step S101, the first type image is subjected to a contrast enhancement processing by the image detection system 7 to obtain a second type image. More specifically, in order to enhance the features of low-contrast defects such as pores and cracks, in the present embodiment, the image detection system 7 adopts a CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm to perform the contrast enhancement processing on the first type image. The CLAHE algorithm mainly includes the following steps:

[0113] (1) The image is divided into several small blocks called "tiles", and the size of the small block is ;

[0114] (2) The histogram equalization is applied to each small block independently.

[0115] In addition, in order to limit the amplification of noise, the CLAHE applies a contrast limit, that is, if any histogram bin exceeds the specified contrast limit, the excess pixels will be evenly distributed to other bins before the equalization is applied. This method can effectively improve the local contrast while avoiding the noise problem that may be caused by global histogram equalization. Specifically, in the present embodiment, the function used for the contrast enhancement processing is cv2.createCLAHE, which contains a contrast limit parameter clip_limit of 2 and a small block size parameter grid of .

[0116] Specifically, the polyethylene pipe welding defect image intelligent recognition method embodiment further includes the following steps:

[0117] S103, classifying and positioning the defects contained in the second type image based on the double-branch feature fusion network model, and outputting the corresponding detection result.

[0118] Please refer to Figure 3FIG. 1 is a flowchart of an embodiment of a method for image classification and positioning based on a dual-branch feature fusion network (DBF-Net) model of the present application. In this embodiment, the image classification and positioning method based on the dual-branch feature fusion network first extracts global semantic features of the second type image through a MobileNetV3 model to obtain a global feature map, so as to suppress the overall texture and noise of the weld area (or the detected area) and achieve the purpose of applying to complex morphological defects (such as incomplete fusion, holes, and cracks). At the same time, the method can extract multi-scale local detail features of the second type image through a cavity convolution model to obtain a local feature map, that is, by capturing multi-scale local detail features and capturing defect edges and microstructure details, the method is adapted to irregular morphological defects (such as crack bifurcation and pore edge artifacts). Subsequently, the method fuses the global feature map and the local feature map through channel attention to generate a fusion feature map, and finally classifies and positions defects through the fusion feature map and outputs the corresponding detection results.

[0119] Specifically, in step S103 of the present embodiment, the dual-branch feature fusion network model classifies and positions the defects contained in the second type image and outputs the corresponding detection results, including the following steps:

[0120] S301, receiving a second type image, the second type image having a preset attribute;

[0121] Specifically, in the present embodiment, the preset attribute of the second type image is 3 channels, pixels, and in other embodiments, for the second type image that does not meet the preset attribute, the second type image can be converted, such as cropping and other conversion operations. In addition, the preset attribute of the second type image can also be other values.

[0122] S302, performing a global feature extraction operation on the second type image to obtain a global feature map;

[0123] Specifically, in the present embodiment, the image detection system 7 first performs a convolution operation on the second type image based on a convolutional neural network (CNN) to extract the initial features of the image and reduce the spatial dimension. The convolution layer is a Stem layer, which uses a ConvBNReLU method, and the corresponding input channel number is 3, the output channel number is 16, the kernel size is 3, and the stride is 2. The convolution layer (Conv) extracts image features, the batch normalization layer (Batch Normalization, BN), and the rectified linear unit (Rectified Linear Unit, ReLU) are combined. In this way, by applying normalization and activation functions immediately after the convolution operation, the performance and training speed of the network can be significantly improved.

[0124] Then, the image after the convolution operation is further extracted by the image detection system 7 through an inverted residual operation to further extract the global features of the second type image. Specifically, the image detection system 7 includes a plurality of inverted residual operations (such as the first to fourth inverted residual operations), each of which uses an InvertedResidual function, the first parameter of which is the input channel number, the second parameter of which is the output channel number, the third parameter of which is the stride, and the fourth parameter of which is the expansion channel number compression value:

[0125] InvertedResidual(16, 24, stride=2, expand_ratio=6);

[0126] InvertedResidual(24, 40, stride=2, expand_ratio=6);

[0127] InvertedResidual(40, 80, stride=2, expand_ratio=6);

[0128] InvertedResidual(80, 160, stride=1, expand_ratio=6);

[0129] The design of the inverted residual structure makes the model less information loss when processing high-dimensional features, and improves the calculation efficiency and memory utilization efficiency through depth separable convolution, so as to better adapt to mobile terminal devices, because it can significantly reduce the memory occupation required during inference.

[0130] Finally, the image detection system 7 generates a global feature map based on a channel attention mechanism (Squeeze-and-Excitation) operation, which specifically uses an SEBlock(160, reduction=16) channel attention mechanism, the channel number is 160, and the dimension reduction ratio reduction is 16, to automatically learn which channel features are more important, thereby improving the sensitivity of the model to important features.

[0131] S303, performing a local feature extraction operation on the second type image to obtain a local feature map;

[0132] Specifically, in this embodiment, first, the image detection system 7 captures multi-scale local details based on a dilated convolution module, for example, performs multi-layer convolution operation on the second type image based on a convolutional neural network (CNN) to extract multi-scale features, which uses a ConvBNReLU method, wherein the first parameter is the input channel number, the second parameter is the output channel number, the third kernel size, and the fourth parameter is the dilated rate:

[0133] ConvBNReLU(3, 64, kernel=3, dilation=1);

[0134] ConvBNReLU(64, 64, kernel=3, dilation=2);

[0135] ConvBNReLU(64, 64, kernel=3, dilation=4);

[0136] By selecting void ratios of 1, 2, and 4, the artifact range of defects of different sizes can be covered. The sensory field and corresponding defect size for different void ratios are shown in Table 1 below:

[0137] Table 1

[0138] Cavitation rate Receptive field (pixels) Corresponding defect size 1 3×3 Pores Φ 0.2-0.5 mm 2 7×7 Pores / short cracks Φ 0.5-2 mm 4 15×15 Unfused areas / long cracks

[0139] Then, the image detection system 7 fuses the extracted multi-scale features based on feature pyramids to obtain local feature maps, thereby improving the model's ability to detect or segment targets at different scales. For example, the FeaturePyramid() method is used for multi-scale feature fusion.

[0140] S304, perform channel attention fusion on the global feature map and local feature map to generate a fused feature map;

[0141] Specifically, in this embodiment, the image detection system 7 first dynamically weights and fuses the global feature map and the local feature map based on the channel attention mechanism to enhance the response of the defect area; then, it compresses the feature dimension through global average pooling and generates a fused feature map based on the channel weights; wherein, the high-weight channels correspond to the defect area (such as the bright ring area of ​​the pores), and the low-weight channels suppress background noise.

[0142] Wherein, the channel weight w c The formula is as follows:

[0143] (3)

[0144] In equation (3), GAP represents global average pooling. , Compression ratio r is 16, C is the number of channels, W1 and W2 are linear transformation matrices, ReLU and σ are activation functions, and F... global This is a global feature.

[0145] Among them, the fused feature map F fused The formula is as follows:

[0146] (4)

[0147] In formula (4), F global is a global feature map, F local is a local feature map, w c is a channel weight.

[0148] S305, defect classification and positioning are performed on the fused feature map, and a corresponding detection result is output;

[0149] Specifically, in the embodiment, the defect classification includes overwelding, cold welding, incomplete fusion, hole, crack, etc. The image detection system 7 can perform classification processing on the fused feature map based on the classification result (classification_head) and the regression result (regression_head) to obtain the detection result, wherein the classification_head and the regression_head include components such as fully connected layers and activation functions (such as softmax or sigmoid), which are used to classify and locate possible defects of the hot melt joint 8.

[0150] Specifically, in the embodiment, the image detection system 7 can mark the number of ultrasonic reflections and the corresponding types in the detection result. For example: Figure 4 shows normal and partial defect classification, and in Figure 4 (a) the number of ultrasonic reflections in the image is 5, and the corresponding type is an overwelding defect; Figure 4 (b) the number of ultrasonic reflections in the image is 5, and the corresponding type is normal welding; Figure 4 (c) the number of ultrasonic reflections in the image is 3, and the corresponding type is a cold welding defect.

[0151] Specifically, in the embodiment, after the image detection system 7 detects the images of the hot melt joints 8 of different defect types, the related detection rates, false detection rates, and minimum detection sizes are as shown in Table 2:

[0152] Table 2

[0153] Defect type Detection rate False detection rate Minimum detection size Pores 99.1% 0.3% Φ 0.25 mm Unfused 98.7% 0.9% 1.8 mm2 Cracks 97.5% 1.2% Length 0.5 mm Overwelding cold weld 97.2% 1.8% Temperature 10°

[0154] According to the present application, the single-pass weld detection time can be shortened from 15 minutes of manual interpretation to 2 minutes, the missed detection rate is greatly reduced, and the detection cost is reduced.

[0155] Please refer to Figure 5 is a flowchart of another embodiment of the polyethylene welding defect image intelligent recognition method of the present application, which specifically includes the following steps:

[0156] S501, a radio frequency signal is collected, and hybrid noise reduction and gain compensation processing are performed on the radio frequency signal to generate a first type image.

[0157] S502, performing a contrast enhancement process on the first type of image to obtain a second type of image.

[0158] S503, classifying and positioning the defects contained in the second type of image based on the double-branch feature fusion network model, and outputting corresponding detection results.

[0159] Specifically, in the embodiment, S501 to S503 are the same as S301 to S303 in the foregoing embodiment, and thus no further description is given herein.

[0160] S504, updating the model parameters based on the new sample.

[0161] Specifically, in the embodiment, to improve the accuracy of the model in judging the defect type, the image detection system 7 can also update the fusion network model parameters based on the new sample. For example, when there is a new defect type, the radio frequency signal corresponding to the new defect type can be input into the fusion network model corresponding to S501 to S503, and whether the trigger condition of incremental learning is reached is determined based on the new defect type false detection rate, so as to update the model.

[0162] wherein the trigger condition Trigger is:

[0163]

[0164] wherein FP is the false detection number, and TP is the correct detection number.

[0165] When the new defect type false detection rate is greater than 15% for three times in succession, the trigger condition of incremental learning is reached, and the model is updated.

[0166] Specifically, in the embodiment, to improve the accuracy of the model in judging the defect type, the image detection system 7 can also judge the uncertainty of the model prediction based on the Monte Carlo Dropout. For example, in the model training stage, a Dropout layer is added to one or more network models in S501 to S503, and in the testing stage, when the Monte Carlo Dropout layer is forward propagated, the Dropout is randomly enabled for T=10 times sampling according to a preset probability (the probability p=0.2), and the prediction variance : is calculated, wherein is the average value of the prediction result, is the prediction result, and the low confidence samples (σ>0.1, i.e., the prediction variance is greater than 0.1) are automatically triggered for manual review, such as reviewing and updating the parameters of the model, reviewing and updating the training samples, and the like.

[0167] Please refer to Figure 6A structural schematic diagram of a computing device is provided. The image detection system 7 can be applied to the computing device 600. Specifically, the computing device 600 includes a processor 601, a memory 603, a communication interface 605 and a bus 608; wherein the processor 601, the memory 603 and the communication interface 605 can be connected to each other through the bus 608, or can be connected in other connection modes other than the bus 608.

[0168] Specifically, the processor 601 can be a general-purpose processor, which can be a processor that executes specific steps and / or operations by reading and executing the contents stored in the memory (for example, the memory 603). For example, the general-purpose processor can be a central processing unit (CPU). The processor 601 can include at least one circuit to execute the above steps. Figure 2 Or Figure 3 Or Figure 5 All or part of the steps of the method shown.

[0169] Specifically, the memory 603 can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), flash memory, optical storage, hard disk, etc.

[0170] Specifically, the memory 603 can be used to store a plurality of program codes and the program codes corresponding to the image detection system 7. When the processor 601 executes the program codes, the above steps are realized. Figure 2 Or Figure 3 Or Figure 5 The corresponding flow steps.

[0171] Specifically, the communication interface 605 includes input / output (I / O) interfaces, physical interfaces and logical interfaces for realizing the interconnection of devices inside the computing device 600, and interfaces for realizing the interconnection of the computing device 600 with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber interface, an ATM interface, etc.

[0172] In particular, the bus 608 can be any type of communication bus, for example a system bus, for interconnecting the processor 601, the memory 603 and the communication interface 605.

[0173] For example, for the detection of porosity defects, 100 groups of hot melt welded joints 8 containing porosity defects with a diameter of 0.5 mm can be prepared, and the hot melt joints containing porosity defects can be detected by using the conventional method and the method proposed in the present application.

[0174] An ultrasonic phased array probe 3 with a 5MHz / 64-element ultrasonic phased array probe 3 is used, the acoustic beam focusing depth is 50mm, the data acquisition card has a 16bit resolution and a 100MHz sampling rate, and the processor 601 outputs a scanning signal to the probe 3 to control the probe 3 to emit an ultrasonic signal and can receive a radio frequency signal returned from the probe 3.

[0175] The processor 601 performs pre-processing of the radio frequency signal, such as wavelet threshold denoising, a wavelet basis sym8, a decomposition layer number 5, threshold calculation, and a signal-to-noise ratio of the denoised signal improved to 12.

[0176] The processor 601 performs CLAHE enhancement, wherein the block size is 8x8 pixels, the Clip Limit is 2.0, the porosity region gray value is improved to 160, and the background standard deviation is kept below 10; the pseudo-color image size after CLAHE enhancement is 256x256x3, the porosity position is marked: center coordinates (128, 100), diameter ≈4 pixels (corresponding to Φ0.5mm).

[0177] The processor 601 performs global branch feature extraction, wherein the Stem layer output is 128x128x16 (feature map resolution), the 3rd layer inverted residual block output is 32x32x40, and the final global feature map is 8x8x160.

[0178] The processor 601 performs local branch feature extraction, wherein the hollow rate =1: the feature map is 64x64x64, the hollow rate =2: the feature map is 32x32x64, the hollow rate =4: the feature map is 16x16x64, and the multi-scale pyramid fusion output is 32x32x192.

[0179] The processor 601 performs feature fusion and classification, the global feature GAP dimension is compressed from 160 to 10 (r=16), the excitation is recovered to 160, the porosity region channel weight wc=0.35, and the fusion output is:

[0180]

[0181] The processor 601 outputs a classification result: a porosity probability is 0.98, a crack probability is 0.02, and an unfusion probability is 0.00.

[0182] The processor 601 also performs online self-adaptive learning by adding a cold welding defect, the new defect type (cold welding) appears continuously for 5 times, the average confidence of the model = 0.25 < 0.3, parameter fine-tuning is performed, the unfreezing layer is divided into the last 3 layers (classification head + fusion layer), the learning rate is 1e-4, and the iteration number is 50.

[0183] The detection rate of the method of the application for a Φ0.5mm porosity reaches 99.1%, far more than 62% of the traditional method, the detection rate of the newly added cold welding defect is improved to 92%, single frame processing time is 280ms, and the real-time detection efficiency is greatly improved.

[0184] The above electronic devices can be respectively arranged on independent chips, or at least partially or entirely arranged on the same chip. Whether each device is independently arranged on a different chip or integrated on one or more chips often depends on the needs of product design. In the present application, the specific implementation form of the above electronic devices is not limited.

[0185] It should be noted that, Figure 6 The computing device 600 shown is merely exemplary, and in the implementation process, the computing device 600 can also include other components, which are not listed one by one herein.

[0186] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD), or semiconductor media (such as solid state disk (SSD)) and the like.

[0187] It can be understood that various numerical numbers involved in the embodiments of the present application are only distinguished for convenience of description, and are not used to limit the scope of the embodiments of the present application. It should be understood that in the embodiments of the present application, the size of the serial number of the above processes does not mean the order of execution, and the execution order of the processes should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0188] The above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.

Claims

1. A method for intelligent image recognition of welding defects in polyethylene pipes, characterized in that, Includes the following steps: The probe is controlled to emit ultrasonic signals toward the heat fusion joint of polyethylene pipes with different defect types, and the radio frequency signals returned by the probe are collected. Based on wavelet transform, the returned radio frequency signal is decomposed into a low-frequency approximation part and a high-frequency detail part, and the high-frequency coefficients corresponding to the high-frequency detail part are thresholded. Wavelet reconstruction is performed on the low-frequency approximation portion and the high-frequency detail portion after threshold processing of the radio frequency signal to obtain the reconstructed radio frequency signal; The reconstructed radio frequency signal is subjected to nonlocal mean filtering to obtain the filtered radio frequency signal; Time gain compensation is applied to the filtered radio frequency signal to generate a first type of image; The first type of image is subjected to contrast enhancement processing to obtain the second type of image; The second type of image is processed by a fusion network model based on dual-branch features to obtain a global feature map of the overall texture of the heat fusion joint and a local feature map of the defect edge of the heat fusion joint. Channel attention fusion is performed on the global feature map and the local feature map to generate a fused feature map; The fused feature map is used to classify and locate defects, and the fused network model outputs the corresponding detection results.

2. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 1, characterized in that, The wavelet transform parameters are: wavelet basis type "sym8" and number of transform layers is 5; the thresholding parameters are: threshold mode is soft thresholding mode. The thresholding process for the high-frequency coefficients corresponding to the high-frequency detail components includes: When the high-frequency coefficient is not greater than the preset threshold, the current high-frequency coefficient is set to 0; when the high-frequency coefficient is greater than the preset threshold, the current high-frequency coefficient is subtracted from the preset threshold to obtain the new high-frequency coefficient. The parameter information for the wavelet reconstruction is: the wavelet basis type is "sym8"; The time gain compensation formula is as follows: Where, k = 0.05 dB / μs 2 G0 is the filtered radio frequency signal before compensation, G(t) is the filtered radio frequency signal after compensation, and t is the array element delay time of the ultrasonic signal emitted by the probe and the returned ultrasonic signal. Wherein, the array element delay time between the i-th transmitting array element and the j-th receiving array element of the probe. The formula is as follows: Where, x i x j x represents the coordinates of the array element. d , z d Here are the coordinates of the defect location, v = 2400 m / s.

3. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 1, characterized in that, The process of enhancing the contrast of the first type of image to obtain the second type of image is based on a contrast-limited adaptive histogram equalization algorithm. The parameters of this algorithm are: a contrast limit parameter of 2, and a block size parameter of [missing information]. .

4. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 1, characterized in that, The fusion network model based on dual-branch features processes the second type of image to obtain a global feature map of the overall texture of the heat fusion joint and a local feature map of the defect edge of the heat fusion joint, including the following steps: Global semantic features are extracted from the second type of image based on the MobileNetV3 model to obtain the global feature map, including: The ConvBNReLU method is used to perform convolution operations on the second type of image, and the global features of the second type of image are extracted through the first to fourth inverse residual operations. The global feature map is generated by operating on the global features after the inverse residual operation based on the channel attention mechanism. Multi-scale local detail feature extraction is performed on the second type of image based on the dilated convolution model to obtain the local feature map, including: The second type of image is subjected to convolution operations with different dilation rates based on a convolutional neural network; The local feature map is obtained by performing multi-scale feature fusion on the second type of image after convolution based on the feature pyramid.

5. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 4, characterized in that, The step of performing channel attention fusion on the global feature map and the local feature map to generate a fused feature map includes the following steps: The response in defective regions is enhanced by dynamically weighting and fusing global and local feature maps based on a channel attention mechanism. The feature dimension is compressed by global average pooling, and a fused feature map is generated based on the channel weights; Wherein, the channel weight w c The formula is as follows: GAP stands for Global Average Pooling. , r is the compression ratio, which takes a value of 16; C is the number of channels; W1 and W2 are linear transformation matrices; ReLU and σ are activation functions; F global For global feature maps; Among them, the fused feature map F fused The formula is as follows: Among them, F global For the global feature map, F local For local feature maps, w c This represents the channel weight.

6. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 1, characterized in that, It also includes the following steps: Updating the parameters of the fusion network model based on the new samples includes: The false detection rate of the new defect type is used to determine whether the triggering condition for incremental learning has been met, so as to update the fusion network model. The trigger condition is: Where FP represents the number of false positives and TP represents the number of correct positives.

7. The intelligent image recognition method for welding defects in polyethylene pipes as described in claim 1, characterized in that, Also includes: Monte Carlo Dropout is used to assess the uncertainty of model predictions, including: During the model training phase, Dropout layers are added to one or more network models; During the model testing phase, when propagating forward through the Dropout layer, Dropout is randomly activated according to a preset probability, and T samples are taken to calculate the prediction variance. : ,in, The average of the prediction results. The prediction result is used as the basis for prediction; when the prediction variance is greater than 0.1, manual review is automatically triggered.

8. A smart image recognition system for welding defects in polyethylene pipes, characterized in that, include: The probe is used to receive scanning signals and transmit ultrasonic signals to the heat fusion joint of polyethylene pipes with different defect types, as well as return radio frequency signals. An image detection system is used to send the scanning signal and acquire the radio frequency signal returned from the probe; it also decomposes the returned radio frequency signal into a low-frequency approximate part and a high-frequency detail part based on wavelet transform, and performs threshold processing on the high-frequency coefficients corresponding to the high-frequency detail part. The image detection system also performs wavelet reconstruction on the low-frequency approximation part and the high-frequency detail part after threshold processing of the radio frequency signal to obtain the reconstructed radio frequency signal, and performs non-local mean filtering on the reconstructed radio frequency signal to obtain the filtered radio frequency signal. The image detection system also performs time gain compensation on the filtered radio frequency signal to generate a first type of image; The image detection system also performs contrast enhancement processing on the first type of image to obtain a second type of image; The image detection system also processes the second type of image based on a dual-branch feature fusion network model to obtain a global feature map and a local feature map, and performs channel attention fusion on the global feature map and the local feature map to generate a fused feature map. The image detection system also performs defect classification and localization on the fused feature map, and the fused network model outputs the corresponding detection results.

9. The intelligent image recognition system for polyethylene pipe welding defects as described in claim 8, characterized in that, The wavelet transform parameters are: wavelet basis type "sym8" and number of transform layers is 5; the thresholding parameters are: threshold mode is soft thresholding mode. The image detection system performs thresholding on the high-frequency coefficients corresponding to high-frequency details, including: When the high-frequency coefficient is not greater than the preset threshold, the current high-frequency coefficient is set to 0; when the high-frequency coefficient is greater than the preset threshold, the current high-frequency coefficient is subtracted from the preset threshold to obtain the new high-frequency coefficient. The parameter information for the wavelet reconstruction is: the wavelet basis type is "sym8"; The time gain compensation formula is as follows: Where, k = 0.05 dB / μs 2 G0 is the filtered radio frequency signal before compensation, G(t) is the filtered radio frequency signal after compensation, and t is the array element delay time of the ultrasonic signal emitted by the probe and the returned ultrasonic signal. Wherein, the array element delay time between the i-th transmitting array element and the j-th receiving array element of the probe. The formula is as follows: Where, x i x j x represents the coordinates of the array element. d , z d Here are the coordinates of the defect location, v = 2400 m / s.

10. A computing device, characterized in that, include: A processor and a memory, the processor being configured to execute a computer program stored in the memory to implement the intelligent recognition method for polyethylene welding defect images according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • XLPE cable partial discharge defect type identification method

    CN104808107A

  • A method for intelligently identifying urban gas pipeline defects

    CN109886433A