Ring ultrasonic detection noise reduction and identification method and system, and computer storage medium
By using the adaptive noise reduction YOLOv5 object detection model and the variational autoencoder noise reduction model in the ring-piece ultrasonic phased array detection, the problem of low signal-to-noise ratio of defect images in ring-piece ultrasonic detection is solved, and intelligent defect recognition and noise reduction processing with high accuracy is achieved.
Patent Information
- Application Number
- CN202411559956.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-02-28
AI Technical Summary
In the detection of ring-piece ultrasonic phased array, the signal-to-noise ratio of defect images is low, and defect recognition depends on manual experience and has high labor intensity.
Adaptive noise reduction YOLOv5 target detection model combined with the variational autoencoder noise reduction model is used to collect ultrasonic images through water-immersed ultrasonic phased array detection and transmit them to the pre-trained model in real time for defect identification and noise reduction processing.
It improves the accuracy of defect recognition, reduces the intensity of manual labor, and realizes intelligent noise reduction and recognition of ring-piece ultrasonic detection.
Smart Images

Figure CN119534616A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ultrasonic nondestructive testing, and in particular to a method and system for noise reduction and identification of ultrasonic testing of ring parts, and a computer storage medium, which are suitable for adaptive noise reduction and identification of internal defect detection images of ring parts. Background Art
[0002] The performance and quality of components are an important basis for ensuring the safe and stable operation of high-end equipment. Developing advanced production and intelligent testing of high-performance components and improving the efficiency and reliability of product manufacturing and testing processes are of great significance to the reform of the information industry.
[0003] Rings have the advantages of high strength, good corrosion resistance, and strong heat resistance. Rings are widely used in key components such as rocket fuel tanks, ships, and satellite shells. They often face severe working conditions such as high temperature and high pressure, and are difficult to replace during use. It has high comprehensive requirements, high bearing pressure, and strict quality requirements to ensure safety and reliability during the service life. However, affected by factors such as material surface roughness, grain size, and organizational uniformity, the ultrasonic phased array detection image has serious noise and low signal-to-noise. Therefore, the defect signal is easily submerged by the noise, resulting in missed detection and false detection of defects. At present, conventional ultrasonic testing mostly uses manual handheld instruments for detection, which is highly dependent on manual experience, and has the disadvantages of high training cost, susceptibility to interference from environmental factors, and low production efficiency. Summary of the invention
[0004] The present invention mainly aims at the problems in the prior art of low signal-to-noise ratio of defect images in ultrasonic phased array detection of ring parts, reliance on manual experience and high labor intensity in defect identification, and proposes a method and system for denoising and identifying ultrasonic detection of ring parts, and a computer storage medium.
[0005] The technical solution adopted by the present invention is:
[0006] The present invention provides a method for reducing noise and identifying a ring by ultrasonic detection, comprising the steps of:
[0007] S1. According to the cross-sectional shape and size of the workpiece, a matching ultrasonic phased array probe is selected and process parameters are set, wherein the process parameters include at least one of probe frequency, number of array elements, water layer height, and focus depth;
[0008] S2. Perform water immersion ultrasonic phased array testing on the ring according to the selected ultrasonic phased array probe and process parameters, perform full coverage scanning in the weld area, and use an encoder to record the probe scanning position in real time;
[0009] S3, during the scanning process, the ultrasonic image scanned by the phased array probe is collected in real time, and the ultrasonic image is transmitted to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect identification;
[0010] S4. The angular position of the ring rotation is recorded in real time through an encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
[0011] Furthermore, the training method of the adaptive denoising YOLOv5 target detection algorithm model includes:
[0012] To simulate the ring structure, multiple ring test blocks with different thicknesses and curvatures are set, and defect samples of different sizes and types are processed on each ring test block;
[0013] Use water-immersion ultrasonic phased array to detect multiple ring test blocks and collect ultrasonic images;
[0014] Annotating the location and type of the defect sample in the ultrasonic image, generating a label file, and establishing an image data set corresponding to the defect sample;
[0015] A YOLOv5 target detection algorithm model is constructed and trained using the image dataset to obtain a trained adaptive denoising YOLOv5 target detection algorithm model.
[0016] Furthermore, the detecting of multiple ring test blocks by using a water-immersion ultrasonic phased array and collecting ultrasonic images include:
[0017] The numerical values of the process parameters are adjusted, a water immersion ultrasonic phased array detection test is performed on the ring test block, and the collected ultrasonic image data is expanded using a data enhancement algorithm to obtain an ultrasonic image.
[0018] Furthermore, the transmitting of the ultrasonic image to a pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition includes:
[0019] Setting a calculation formula for the peak signal-to-noise ratio of the ultrasound image to calculate the peak signal-to-noise ratio of the ultrasound image;
[0020] Setting a noise reduction threshold, and comparing the peak signal-to-noise ratio of the ultrasound image with the noise reduction threshold;
[0021] In response to a peak signal-to-noise ratio of the ultrasonic image being less than or equal to the noise reduction threshold, performing noise reduction processing on the ultrasonic image before performing defect identification;
[0022] In response to the peak signal-to-noise ratio of the ultrasonic image being greater than the noise reduction threshold, defect identification is performed on the ultrasonic image.
[0023] Furthermore, the calculation formula for setting the peak signal-to-noise ratio of the ultrasound image includes:
[0024] The calculation formula of the peak signal-to-noise ratio of the ultrasound image is:
[0025]
[0026] Among them, PSNR is the peak signal-to-noise ratio, which is used to measure the distortion of the denoised image and the original image, and represents the difference between the two images. represents the mean square error, which reflects the difference between the denoised image and the original image. m and n represent the width and height of the original image respectively. X represents the denoised image, X' represents the original image, X(i, j) represents the pixel value of the coordinate point (i, j) in the denoised image, X'(i, j) represents the pixel value of the coordinate point (i, j) in the original image, and MaxValue is the maximum value that the image pixel can take.
[0027] Furthermore, the denoising process of the ultrasonic image includes:
[0028] A denoising model is established based on the variational autoencoder structure. The noisy image is reduced in dimension through convolution, and restored to form a reconstructed image through deconvolution. Self-supervised training is performed by constructing a loss function between the noise-free image and the reconstructed image.
[0029] Acquire multiple sets of defect detection images under different gains to obtain high-noise-low-noise corresponding images with unchanged defect target features, and combine them to form a denoised data set;
[0030] The ultrasonic image is input as a noisy image into the denoising model to perform target segmentation based on the denoising data set to form segmented targets and their position information, the segmented targets and their position information are restored, and combined with a low-gain image to form a low-noise image.
[0031] Furthermore, the loss function is composed of the reconstruction error L bce and KL divergence L KL Composition, the loss function is L loss =L bce +βL KL , the reconstruction loss is used to measure the difference between the original image and the reconstructed image, the binary cross entropy is selected to characterize the reconstruction loss of the encoder, and the KL divergence is used to measure the difference between the latent variable distribution and the standard normal distribution; wherein the reconstruction loss is The KL divergence is M represents the number of samples, x represents the low-noise image, and x i represents the reconstructed image, d represents the dimension of the latent variable, μ j and σ j denote the mean and variance of the j-th dimension latent variable of the encoder network output, L loss represents the comprehensive loss function of the variational autoencoder network, L bceIt is the binary cross entropy that characterizes the reconstruction error. β is the weight coefficient of KL divergence, which is used to control the balance between reconstruction error and KL divergence. β is set to 1 or 0.1.
[0032] Furthermore, the defect recognition of the ultrasonic image includes:
[0033] The ultrasonic image is subjected to a convolutional neural network to extract multiple groups of image features, and the multiple groups of image features are mapped to multiple different feature layers. Each feature layer gives the bounding box and confidence of the target defect. The overlapping bounding boxes and low-confidence bounding boxes are removed by the non-maximum suppression method to obtain the final bounding box of the target defect, the target category and the confidence as the detection result.
[0034] The present invention also provides a ring ultrasonic detection noise reduction and identification system, which includes:
[0035] An ultrasonic phased array probe and process parameter setting module, which is used to select a matching ultrasonic phased array probe and set process parameters according to the cross-sectional shape and size of the workpiece, wherein the process parameters include at least one of the probe frequency, the number of array elements, the water layer height, and the focus depth;
[0036] The scanning setting module is used to perform water immersion ultrasonic phased array testing of ring parts according to the selected ultrasonic phased array probe and process parameters, perform full coverage scanning in the weld area, and use an encoder to record the probe scanning position in real time;
[0037] The noise reduction and recognition module is used to collect ultrasonic images scanned by the phased array probe in real time during the scanning process, transmit the ultrasonic images to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition, and display the defect recognition results in real time;
[0038] The early warning module is used to record the angular position of the ring rotation in real time through the encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
[0039] The present invention also provides a computer storage medium, which stores a computer program that can be executed by a processor, and the computer program executes the above-mentioned ring ultrasonic detection noise reduction and identification method.
[0040] The beneficial effects of the present invention are as follows: the method and system for noise reduction and identification of ultrasonic detection of ring parts, and the computer storage medium proposed in the present invention are suitable for intelligent noise reduction and identification of ultrasonic phased array detection of ring parts, which can improve the accuracy of defect identification and reduce manual labor intensity.
[0041] In addition, the ultrasonic phased array detection method for ring parts adopts water immersion coupling, which has low requirements for weld excess height and surface roughness. Its probe coupling is stable and not easy to wear. The detection results are repeatable. The detection device of this method is easier to implement and has strong industrial applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 It is a schematic flow chart of the method for noise reduction and identification of ultrasonic detection of ring parts of the present invention;
[0044] Figure 2 It is a flow chart of constructing a denoising data set for an ultrasonic phased array detection image of a ring component according to the present invention;
[0045] Figure 3 It is a schematic diagram of the structure of the ring water immersion automatic scanning device of the present invention;
[0046] Figure 4 It is a weighted bidirectional feature pyramid network structure diagram of the present invention;
[0047] Figure 5 It is a structural diagram of the CBAM hybrid attention mechanism of the present invention;
[0048] Figure 6 It is a structural diagram of four detection heads improved by the intelligent recognition model of the present invention;
[0049] Figure 7 It is a structural diagram of an intelligent noise reduction model based on an autoencoder of the present invention;
[0050] Figure 8 The present invention is a flow chart of image noise reduction in ultrasonic phased array detection of ring parts. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0052] Example 1
[0053] Please refer to Figure 1 Embodiment 1 of the present invention provides a method for reducing noise and identifying ultrasonic detection of ring parts, comprising the following steps:
[0054] S1. According to the cross-sectional shape of the ring workpiece, wall thickness, pipe curvature, weld size and other parameters, select appropriate ultrasonic phased array detection and set appropriate process parameters, including probe frequency, probe, number of array elements, water layer height, focus depth, etc.;
[0055] S2. According to the probe selected in S1 and the corresponding process parameters, carry out water immersion ultrasonic phased array testing of ring parts, conduct full coverage scanning in the weld area, and scan the probe around the center of the pipe. During the scanning process, the water layer height should be kept constant, and the encoder records the probe scanning angle and position in real time;
[0056] S3. During the scanning process, the ultrasonic phased array software collects the detection images in real time and transmits the ultrasonic images to the pre-trained adaptive noise reduction YOLOv5 target detection model. The model decides whether noise reduction is needed based on the signal-to-noise ratio of the detection image and identifies defects online.
[0057] S4. The angular position of the pipeline rotation is recorded in real time by the encoder and synchronized to the ultrasonic phased array detection software. When the target detection model finds a defect, the software automatically records the defect location and generates warning information.
[0058] As a preferred solution of the present invention, in step S3, intelligent denoising and recognition of defect detection images are implemented based on the YOLOv5 target detection algorithm model and the variational autoencoder denoising model. The model establishment process is as follows:
[0059] (a) Making ring defect test blocks
[0060] Common defects in the weld during pipeline welding include lack of fusion, lack of penetration, pores, cracks, slag inclusions, etc. The defective test blocks naturally generated during pipeline welding are preserved. In addition, due to the scarcity of natural defects, in order to expand the data set, ring test blocks with different wall thicknesses and curvatures are simulated and artificial defects are processed.
[0061] (b) Collecting ring defect images and constructing target recognition datasets
[0062] The defective test block was subjected to water immersion ultrasonic phased array detection test, and different detection parameters such as probe, water layer height, and focus depth were changed to obtain multiple sets of detection images. The acquired images were annotated using annotation software to obtain json label files to form a preliminary data set. The preliminary data was expanded using data enhancement algorithms, and the data set was expanded using random cropping, random rotation, and changes in color space to obtain the target recognition network training data set.
[0063] (c) Construction of denoising dataset
[0064] Perform water immersion ultrasonic phased array detection test on defective test blocks, change detection parameters, obtain multiple sets of defect detection images under different gains, perform target segmentation on noise images, and copy and paste the segmented objects to the corresponding low-gain background images, such as Figure 2 As shown, the high-noise-low-noise corresponding images with unchanged defect target features are obtained and combined to form a denoising dataset.
[0065] (d) Establish an improved adaptive denoising YOLOv5 target detection model
[0066] The ultrasonic phased array detection of ring parts has serious noise, which interferes with the detection of defects. The traditional target detection algorithm has poor detection effect on ring parts. Therefore, the classic target detection algorithm YOLOv5 is improved to make it more suitable for intelligent defect recognition of ultrasonic detection images of ring parts. First, an attention mechanism can be added to the feature extraction network to increase the model's sensitivity to the target and improve the network's detection accuracy of the target; secondly, considering the small size of the target, a small target detection head is added to the network detection head to form a multi-detection head structure, so that the model can detect smaller targets; in addition, considering that the detection object has the characteristics of spatiotemporal context, the network Neck model can be changed in a targeted manner to improve the network's sensitivity to spatiotemporal context.
[0067] In this embodiment, ring test blocks with different wall thicknesses and curvatures are simulated and artificial defects are processed. Water immersion ultrasonic phased array detection tests are performed on the defective test blocks. Different detection parameters such as probes, water layer heights, and focusing depths are replaced, and the preliminary data are expanded using a data enhancement algorithm to obtain a target recognition network training data set.
[0068] When establishing the image database, phased array probes of different frequencies were used for detection, and ultrasonic phased array detection images of ring parts under different probe conditions were obtained. A data enhancement algorithm was used for the acquired image database to expand the database by changing the color space of the image, such as brightness, contrast, and saturation, and random occlusion and Mixup were used to increase the richness of the data.
[0069] ①Improved YOLOv5 target detection model
[0070] A hybrid attention mechanism based on spatial attention mechanism and channel attention mechanism can further improve network accuracy. In the backbone network of YOLOv5, the CBAM attention mechanism has the following structure: Figure 5As shown in the figure, the model's sensitivity to the target is increased; the general network head uses three prediction heads to predict the target, which is often prone to missed detection. Therefore, a prediction head for small-size object detection is added. This prediction head is generated by the low-level high-resolution feature map and is more sensitive to tiny objects. Combined with the other three prediction heads, the four-head structure can alleviate the negative impact of drastic changes in target scale; BIFPN constructs a multi-level feature pyramid structure, which can capture the spatiotemporal information of the target at different scales, and it has a bidirectional information transmission mechanism, which can interact and fuse information between feature maps at different levels, thereby effectively extracting spatiotemporal context information. This bidirectional transmission allows high-level semantic information to be transmitted to low-level feature maps, and low-level detail information can also be transmitted to high-level, which is conducive to the fusion of global and local information. The target recognition dataset is divided into training set and test set according to a certain ratio, the number of model training rounds (epoch) is set to 500, the amount of data input at one time (batchsize) is set to 128, the intersection-over-union ratio threshold is set to the default 0.5, and the hyperparameters are set according to the default situation. The best weight file is obtained through training.
[0071] ②Adaptive noise reduction model
[0072] Autoencoder (AE) is an unsupervised learning neural network, commonly used for data dimensionality reduction and feature extraction, and consists of an encoder and a decoder. The original high-dimensional detection image contains a lot of redundant information. The denoising model based on the autoencoder can encode the high-dimensional image into a low-dimensional expression, and then generate a reconstructed image by decoding the expression, and use the reconstruction error as the loss representation of training to learn the efficient expression of the input data and use the model optimization algorithm to minimize the loss function. Figure 7 The denoising model shown in the figure is used, and the denoising threshold is set. When the peak signal-to-noise ratio of the detected image is less than or equal to the threshold, the denoising module intervenes, and the image result is denoised before defect recognition. When the peak signal-to-noise ratio of the detected image is greater than the denoising threshold, the image is directly used for defect recognition. The denoising threshold is usually set manually according to the data noise situation. The model operation process will give a recommended denoising threshold based on the feature calculation of the data to be tested. The denoising module is combined with the improved YOLOv5 model to form an adaptive denoising YOLOv5 target detection model.
[0073] (e) Prediction of the adaptive denoising YOLOv5 object detection model
[0074] The image to be detected is input into the adaptive denoising YOLOv5 target detection model, such as Figure 8 As shown, first calculate the peak signal-to-noise ratio of the image to be tested, and the calculation formula is as follows:
[0075]
[0076] in, represents the mean square error, reflecting the difference between the denoised image and the original image, m and n represent the width and height of the image respectively, X represents the denoised image, X' represents the original image, X(i, j) represents the pixel value of the coordinate point (i, j) in the denoised image, X'(i, j) represents the pixel value of the coordinate point (i, j) in the original image, and MaxValue is the maximum value that the image pixel can take. When the peak signal-to-noise ratio of the image to be tested is less than or equal to the denoising threshold, the image is first denoised and then input into the target detection module. When the peak signal-to-noise ratio of the image to be tested is greater than the denoising threshold, it is directly input into the target recognition module. When the image is input into the target recognition module, its features are first extracted through the convolutional neural network. Four sets of image features are mapped to four different feature layers. Each feature layer gives the bounding box and confidence of the target. The overlapping bounding boxes and low-confidence bounding boxes are removed by the non-maximum suppression method to obtain the final target bounding box, target category and its confidence.
[0077] Following the above technical solution, the adaptive denoising YOLOv5 target detection algorithm model is formed by combining the improved YOLOv5 network model and the autoencoder-based denoising model. The improved YOLOv5 model replaces the C3 module of the YOLOv5 backbone network with the CBAM hybrid attention mechanism module to improve the model's sensitivity to targets in space and channels. Figure 4 As shown in the figure, FPN (Feature Pyramid Network) is replaced with BIFPN (Weighted Bidirectional Feature Pyramid Network) to increase the model's sensitivity to spatiotemporal context, and a small-sized detection head is added to form four detection heads to alleviate missed detections caused by drastic changes in target size.
[0078] Following the above technical solution, the denoising model is established based on the variational autoencoder structure. The noisy image is reduced in dimension through convolution operation and restored again through deconvolution operation. Self-supervised training is performed by constructing a loss function between the noise-free image and the reconstructed image. The loss function consists of reconstruction error and KL divergence. The reconstruction error is used to measure the difference between the original data and the reconstructed data. The binary cross entropy is selected to characterize the reconstruction loss of the encoder. The KL divergence is used to measure the difference between the distribution of the latent variable and the standard normal distribution. loss =L bce +βL KL , where the reconstruction loss KL divergence M represents the number of samples, x represents the low-noise image, xi represents the reconstructed image, d represents the dimension of the latent variable, μ j and σ j They represent the mean and variance of the j-th dimension latent variable of the encoder network output respectively. loss represents the comprehensive loss function of the variational autoencoder network, L bceIt is the binary cross entropy that characterizes the reconstruction error. β is the weight coefficient of KL divergence, which is used to control the balance between reconstruction error and KL divergence. Generally, β is set to 1 or 0.1.
[0079] The proposed improved YOLOv5 target recognition algorithm improves its defect recognition accuracy through the attention mechanism, weighted bidirectional pyramid structure and multi-detection head improvement. In addition, the ring ultrasonic phased array detection method adopts water immersion coupling, which has low requirements on weld height and surface roughness. Its probe coupling is stable, not easy to wear, and the detection results are repeatable. The detection device of this method is easier to implement and has strong industrial applicability.
[0080] As a preferred embodiment of the present invention, the present invention also provides a ring water immersion automatic scanning device, which is mainly used to implement the above method embodiment. Figure 3 As shown, the device includes a water tank 1, a four-claw chuck 2, an ultrasonic phased array probe 3, a manipulator 4, an ultrasonic phased array detector 5, an industrial computer 6 and a computer 7. The ring 8 is placed on the rotating table 9 by hoisting, and the pipe 8 is clamped and positioned by the four-claw chuck 2; the ultrasonic phased array probe 3 is fixed on the top of the manipulator 4, and the manipulator 4 can realize three-dimensional movement in X / Y / Z space and rotation of the probe angle; the ultrasonic phased array detector 5 is connected to the ultrasonic phased array probe 3; the ultrasonic phased array detector 5 transmits the collected ultrasonic signal data to the computer 7, and the computer 7 is installed with ultrasonic phased array detection software and adaptive noise reduction YOLOv5 target detection model network; the industrial computer 6 transmits the angle coding information of the rotating table 9 and the position coding information of the manipulator 4 to the computer 7 in real time. The rotating table 9 can drive the ring 8 to make a rotational motion, and the rotating table 9 can move up and down along the Z axis. While the ultrasonic phased array probe 3 scans the cross-sectional profile of the ring 8, the ring 8 makes a rotational motion.
[0081] In view of the above-mentioned device, the ultrasonic phased array intelligent detection method for complex ring parts with multiple types of defects proposed in the present invention comprises the following steps:
[0082] Step (1): According to the cross-sectional shape of the ring 8, the curvature of the pipe wall thickness and the size of the weld, a suitable ultrasonic phased array probe is selected and process parameters are set, including probe frequency, probe, number of array elements, water layer height, focusing depth, etc.
[0083] Step (2): According to the ultrasonic phased array detection process parameters of the ring 8 in step (1), the scanning path of the ultrasonic phased array probe 3 is planned, and the manipulator 4 controls the ultrasonic phased array probe 3 to scan along the cross section of the ring 8. At the same time, the rotating table 9 drives the ring 8 to rotate. In this way, full coverage scanning of complex rings can be completed.
[0084] Step (3): During the scanning process, the ultrasonic phased array software collects the detection image in real time and transmits the ultrasonic image to the pre-trained adaptive denoising YOLOv5 target detection model. The model decides whether denoising is required based on the signal-to-noise ratio of the detection image and identifies defects online.
[0085] Step (4): The industrial computer 7 records the angular encoder position of the ring 8 and the encoder position information of the manipulator 4 in real time, and transmits the position information to the ultrasonic phased array detection software in the computer 7. When the target detection model recognizes a defect, the ultrasonic detection software synchronously records the position information of the ring 8 and the ultrasonic phased array probe 3. The ultrasonic detection software issues an early warning and displays the defect recognition result and position information.
[0086] The method for designing the ultrasonic phased array detection process for complex ring parts in the above step (1) is a prior art and will not be described in detail here.
[0087] As a preferred solution of the present invention, in step (3), intelligent defect recognition and classification are implemented based on the YOLOv5 target detection algorithm model and the autoencoder denoising model. The model establishment process is as follows:
[0088] (a) Making ring defect test blocks
[0089] Common defects in the weld during pipeline welding include lack of fusion, lack of penetration, pores, cracks, slag inclusions, etc. The defective test blocks naturally generated during pipeline welding are saved. In addition, due to the scarcity of natural defects, ring test blocks with different wall thicknesses and curvatures are simulated and artificial defects are processed to expand the data set. In this implementation example, six test blocks are made, and 20 defects of different depths and equivalents are processed.
[0090] (b) Collecting ring defect images and constructing target recognition datasets
[0091] The defective test block was subjected to water immersion ultrasonic phased array detection test, and different detection parameters such as probe, water layer height, and focus depth were changed to obtain multiple sets of detection images. The acquired images were annotated using annotation software to obtain json label files to form a preliminary data set, which contained 4123 images. The preliminary data was expanded using data enhancement algorithms, and the data set was expanded to 14225 images by random cropping, random rotation, and changes in color space to obtain the target recognition network training data set.
[0092] (c) Construction of denoising dataset
[0093] The defective test block was tested by water immersion ultrasonic phased array detection. The detection parameters were changed to obtain multiple sets of defect detection images under different gains. The noise image was segmented, and the segmented object was copied and pasted to the corresponding low-gain background image, so as to obtain high-noise-low-noise corresponding images with unchanged defect target features, and combined to form a denoising data set. When constructing the denoising model, in order to unify the input size of the model, the phased array defect detection images of different sizes were firstly resized to similar sizes of 400×400, 200×400, 200×600 and 200×800, and then cropped to unify the size to 200×200 and used as the model input. The processed data set images are all 200×200 in size, with a total of 8798 images.
[0094] (d) Establish an improved adaptive denoising YOLOv5 target detection model
[0095] The ultrasonic phased array detection of ring parts has serious noise, which interferes with the detection of defects. The traditional target detection algorithm has poor detection effect on ring parts. Therefore, the classic target detection algorithm YOLOv5 is improved to make it more suitable for intelligent defect recognition of ultrasonic detection images of ring parts. An attention mechanism is added to the feature extraction network to increase the model's sensitivity to the target and improve the network's detection accuracy of the target. A small target detection head is added to the network detection head to form a multi-detection head structure, so that the model can detect smaller targets. The network Neck model is changed in a targeted manner to improve the network's sensitivity to spatiotemporal context.
[0096] (e) Prediction of the adaptive denoising YOLOv5 object detection model
[0097] The ring ultrasonic inspection image is input into the trained adaptive denoising YOLOv5 target detection model. Table 1 shows the intelligent defect recognition results of ultrasonic phased array imaging detection in a certain environment. The proposed adaptive denoising YOLOv5 target detection model successfully identifies defects in the ring ultrasonic phased array inspection image, with an average defect accuracy of 98.27% and a recognition speed of 111 FPS.
[0098] Table 1. Intelligent detection results of adaptive denoising YOLOv5 model
[0099]
[0100] In summary, the present invention adopts an immersion ultrasonic phased array to automatically detect ring parts. By producing ultrasonic detection image datasets of ring parts with different equivalent defects at different depths, training a YOLOv5 target detection model and an autoencoder denoising model, the ultrasonic detection denoising and recognition of ring parts can be achieved. The defect recognition accuracy is high, and industrial automated detection and evaluation can be easily realized.
[0101] Example 2
[0102] like Figure 1 As shown, Example 2 of the present application provides a method for ultrasonic detection noise reduction and identification of ring parts, including the steps of:
[0103] S1. According to the cross-sectional shape and size of the workpiece, a matching ultrasonic phased array probe is selected and process parameters are set, wherein the process parameters include at least one of probe frequency, number of array elements, water layer height, and focus depth;
[0104] S2. Perform water immersion ultrasonic phased array testing of the ring according to the selected ultrasonic phased array probe and process parameters, perform full coverage scanning in the weld area, and use an encoder to record the probe scanning position in real time;
[0105] S3, during the scanning process, the ultrasonic image scanned by the phased array probe is collected in real time, and the ultrasonic image is transmitted to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect identification;
[0106] S4. The angular position of the ring rotation is recorded in real time through an encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
[0107] Furthermore, the training method of the adaptive denoising YOLOv5 target detection algorithm model includes:
[0108] To simulate the ring structure, multiple ring test blocks with different thicknesses and curvatures are set, and defect samples of different sizes and types are processed on each ring test block;
[0109] Use water-immersion ultrasonic phased array to detect multiple ring test blocks and collect ultrasonic images;
[0110] Annotating the location and type of the defect sample in the ultrasonic image, generating a label file, and establishing an image data set corresponding to the defect sample;
[0111] A YOLOv5 target detection algorithm model is constructed and trained using the image dataset to obtain a trained adaptive denoising YOLOv5 target detection algorithm model.
[0112] Among them, by processing ring test blocks with different thicknesses and curvatures, collecting ultrasonic phased array detection images of rings, constructing and expanding data sets, realizing intelligent noise reduction and recognition of ultrasonic phased array of rings, improving the signal-to-noise ratio of detection images, reducing manual workload, and improving defect recognition accuracy and detection efficiency.
[0113] Furthermore, the detecting of multiple ring test blocks by using a water-immersion ultrasonic phased array and collecting ultrasonic images include:
[0114] The numerical values of the process parameters are adjusted, a water immersion ultrasonic phased array detection test is performed on the ring test block, and the collected ultrasonic image data is expanded using a data enhancement algorithm to obtain an ultrasonic image.
[0115] Furthermore, the transmitting of the ultrasonic image to a pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition includes:
[0116] Setting a calculation formula for the peak signal-to-noise ratio of the ultrasound image to calculate the peak signal-to-noise ratio of the ultrasound image;
[0117] Setting a noise reduction threshold, and comparing the peak signal-to-noise ratio of the ultrasound image with the noise reduction threshold;
[0118] In response to a peak signal-to-noise ratio of the ultrasonic image being less than or equal to the noise reduction threshold, performing noise reduction processing on the ultrasonic image before performing defect identification;
[0119] In response to the peak signal-to-noise ratio of the ultrasonic image being greater than the noise reduction threshold, defect identification is performed on the ultrasonic image.
[0120] Furthermore, the calculation formula for setting the peak signal-to-noise ratio of the ultrasound image includes:
[0121] The calculation formula of the peak signal-to-noise ratio of the ultrasound image is:
[0122]
[0123] Among them, PSNR is the peak signal-to-noise ratio, which is used to measure the distortion of the denoised image and the original image, and represents the difference between the two images. represents the mean square error, which reflects the difference between the denoised image and the original image. m and n represent the width and height of the original image respectively. X represents the denoised image, X' represents the original image, X(i, j) represents the pixel value of the coordinate point (i, j) in the denoised image, X'(i, j) represents the pixel value of the coordinate point (i, j) in the original image, and MaxValue is the maximum value that the image pixel can take.
[0124] Furthermore, the denoising process of the ultrasonic image includes:
[0125] A denoising model is established based on the variational autoencoder structure. The noisy image is reduced in dimension through convolution, and restored to form a reconstructed image through deconvolution. Self-supervised training is performed by constructing a loss function between the noise-free image and the reconstructed image.
[0126] Acquire multiple sets of defect detection images under different gains to obtain high-noise-low-noise corresponding images with unchanged defect target features, and combine them to form a denoised data set;
[0127] The ultrasonic image is input as a noisy image into the denoising model to perform target segmentation based on the denoising data set to form segmented targets and their position information, the segmented targets and their position information are restored, and combined with a low-gain image to form a low-noise image.
[0128] The denoising model based on variational autoencoder removes noise signals through image dimensionality reduction and reconstruction, retains defect signals, improves the signal-to-noise ratio of the detection image, and effectively reduces the difficulty of defect recognition, while improving the efficiency and accuracy of defect recognition.
[0129] Furthermore, the loss function is composed of the reconstruction error L bce and KL divergence L KL Composition, the loss function is L loss =L bce +βL KL , the reconstruction loss is used to measure the difference between the original image and the reconstructed image, the binary cross entropy is selected to characterize the reconstruction loss of the encoder, and the KL divergence is used to measure the difference between the latent variable distribution and the standard normal distribution; wherein the reconstruction loss is The KL divergence is M represents the number of samples, x represents the low-noise image, and x i represents the reconstructed image, d represents the dimension of the latent variable, μ j and σ j denote the mean and variance of the j-th dimension latent variable of the encoder network output, L loss represents the comprehensive loss function of the variational autoencoder network, L bce It is the binary cross entropy that characterizes the reconstruction error. β is the weight coefficient of KL divergence, which is used to control the balance between reconstruction error and KL divergence. β is set to 1 or 0.1.
[0130] Furthermore, the defect recognition of the ultrasonic image includes:
[0131] The ultrasonic image is subjected to a convolutional neural network to extract multiple groups of image features, and the multiple groups of image features are mapped to multiple different feature layers. Each feature layer gives the bounding box and confidence of the target defect. The overlapping bounding boxes and low-confidence bounding boxes are removed by the non-maximum suppression method to obtain the final bounding box of the target defect, the target category and the confidence as the detection result.
[0132] Example 3
[0133] In embodiment 3 of the present invention, a ring ultrasonic detection noise reduction and identification system is provided, which includes:
[0134] An ultrasonic phased array probe and process parameter setting module, which is used to select a matching ultrasonic phased array probe and set process parameters according to the cross-sectional shape and size of the workpiece, wherein the process parameters include at least one of the probe frequency, the number of array elements, the water layer height, and the focus depth;
[0135] The scanning setting module is used to perform water immersion ultrasonic phased array testing of ring parts according to the selected ultrasonic phased array probe and process parameters, perform full coverage scanning in the weld area, and use an encoder to record the probe scanning position in real time;
[0136] The noise reduction and recognition module is used to collect ultrasonic images scanned by the phased array probe in real time during the scanning process, transmit the ultrasonic images to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition, and display the defect recognition results in real time;
[0137] The early warning module is used to record the angular position of the ring rotation in real time through the encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
[0138] For the specific definition of the ring ultrasonic detection noise reduction and identification system, please refer to the definition of the ring ultrasonic detection noise reduction and identification method above, which will not be repeated here. Each module in the above-mentioned ring ultrasonic detection noise reduction and identification system can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0139] The present invention also provides a computer storage medium, which stores a computer program that can be executed by a processor, and the computer program executes the above-mentioned ring ultrasonic detection noise reduction and identification method.
[0140] The present application also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and when the program is executed by a processor, a corresponding function is realized. When the computer-readable storage medium of this embodiment is executed by a processor, the method for reducing noise and identifying the ultrasonic detection of a ring part of the method embodiment is realized.
[0141] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, and two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.
[0142] The order of execution of each step in the above embodiment does not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0143] It should be understood that those skilled in the art can make improvements or changes based on the above description, and all these improvements and changes should fall within the scope of protection of the appended claims of the present invention.
Claims
1. A method for noise reduction and identification of ring parts by ultrasonic detection, characterized in that: Includes steps: According to the cross-sectional shape and size of the workpiece, a matching ultrasonic phased array probe is selected and process parameters are set, wherein the process parameters include at least one of probe frequency, number of array elements, water layer height, and focus depth; According to the selected ultrasonic phased array probe and process parameters, water immersion ultrasonic phased array testing of ring parts is carried out, full coverage scanning is performed in the weld area, and the probe scanning position is recorded in real time using an encoder; During the scanning process, the ultrasonic images scanned by the phased array probe are collected in real time and transmitted to the pre-trained adaptive denoising YOLOv5 target detection model for defect identification; The angular position of the ring rotation is recorded in real time by the encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
2. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 1, characterized in that: The training method of the adaptive denoising YOLOv5 target detection algorithm model includes: To simulate the ring structure, multiple ring test blocks with different thicknesses and curvatures are set, and defect samples of different sizes and types are processed on each ring test block; Use water-immersion ultrasonic phased array to detect multiple ring test blocks and collect ultrasonic images; Annotating the location and type of the defect sample in the ultrasonic image, generating a label file, and establishing an image data set corresponding to the defect sample; A YOLOv5 target detection algorithm model is constructed and trained using the image dataset to obtain a trained adaptive denoising YOLOv5 target detection algorithm model.
3. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 2, characterized in that: The method of detecting a plurality of ring test blocks by using a water-immersion ultrasonic phased array and collecting ultrasonic images includes: The numerical values of the process parameters are adjusted, a water immersion ultrasonic phased array detection test is performed on the ring test block, and the collected ultrasonic image data is expanded using a data enhancement algorithm to obtain an ultrasonic image.
4. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 1, characterized in that: The transmitting of the ultrasonic image to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition includes: Setting a calculation formula for the peak signal-to-noise ratio of the ultrasound image to calculate the peak signal-to-noise ratio of the ultrasound image; Setting a noise reduction threshold, and comparing the peak signal-to-noise ratio of the ultrasound image with the noise reduction threshold; In response to a peak signal-to-noise ratio of the ultrasonic image being less than or equal to the noise reduction threshold, performing noise reduction processing on the ultrasonic image before performing defect identification; In response to the peak signal-to-noise ratio of the ultrasonic image being greater than the noise reduction threshold, defect identification is performed on the ultrasonic image.
5. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 4, characterized in that: The calculation formula for setting the peak signal-to-noise ratio of the ultrasound image includes: The calculation formula of the peak signal-to-noise ratio of the ultrasound image is: Among them, PSNR is the peak signal-to-noise ratio, which is used to measure the distortion of the denoised image and the original image, and represents the difference between the two images. represents the mean square error, which reflects the difference between the denoised image and the original image. m and n represent the width and height of the original image respectively. X represents the denoised image, X' represents the original image, X(i, j) represents the pixel value of the coordinate point (i, j) in the denoised image, X'(i, j) represents the pixel value of the coordinate point (i, j) in the original image, and MaxValue is the maximum value that the image pixel can take.
6. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 4, characterized in that: The denoising process of the ultrasonic image comprises: A denoising model is established based on the variational autoencoder structure. The noisy image is reduced in dimension through convolution, and restored to form a reconstructed image through deconvolution. Self-supervised training is performed by constructing a loss function between the noise-free image and the reconstructed image. Acquire multiple sets of defect detection images under different gains to obtain high-noise-low-noise corresponding images with unchanged defect target features, and combine them to form a denoised data set; The ultrasonic image is input as a noisy image into the denoising model to perform target segmentation based on the denoising data set to form segmented targets and their position information, the segmented targets and their position information are restored, and combined with a low-gain image to form a low-noise image.
7. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 6, characterized in that: The loss function is composed of the reconstruction error L bce and KL divergence L KL The loss function is L loss =L bce +βL KL , the reconstruction loss is used to measure the difference between the original image and the reconstructed image, the binary cross entropy is selected to characterize the reconstruction loss of the encoder, and the KL divergence is used to measure the difference between the latent variable distribution and the standard normal distribution; wherein the reconstruction loss is The KL divergence is M represents the number of samples, x represents the low-noise image, and x i represents the reconstructed image, d represents the dimension of the latent variable, μ j and σ j denote the mean and variance of the j-th dimension latent variable of the encoder network output, L loss represents the comprehensive loss function of the variational autoencoder network, L bce It is the binary cross entropy that characterizes the reconstruction error. β is the weight coefficient of KL divergence, which is used to control the balance between reconstruction error and KL divergence. β is set to 1 or 0.
1.
8. The method for noise reduction and identification of ring parts by ultrasonic detection according to claim 4, characterized in that: The defect recognition of the ultrasonic image comprises: The ultrasonic image is subjected to a convolutional neural network to extract multiple groups of image features, and the multiple groups of image features are mapped to multiple different feature layers. Each feature layer gives the bounding box and confidence of the target defect. The overlapping bounding boxes and low-confidence bounding boxes are removed by the non-maximum suppression method to obtain the final bounding box of the target defect, the target category and the confidence as the detection result.
9. A ring ultrasonic detection noise reduction and identification system, characterized in that: include: An ultrasonic phased array probe and process parameter setting module, which is used to select a matching ultrasonic phased array probe and set process parameters according to the cross-sectional shape and size of the workpiece, wherein the process parameters include at least one of the probe frequency, the number of array elements, the water layer height, and the focus depth; The scanning setting module is used to perform water immersion ultrasonic phased array testing of ring parts according to the selected ultrasonic phased array probe and process parameters, perform full coverage scanning in the weld area, and use an encoder to record the probe scanning position in real time; The noise reduction and recognition module is used to collect ultrasonic images scanned by the phased array probe in real time during the scanning process, transmit the ultrasonic images to the pre-trained adaptive noise reduction YOLOv5 target detection model for defect recognition, and display the defect recognition results in real time; The early warning module is used to record the angular position of the ring rotation in real time through the encoder. When the target detection model finds a defect, the defect position is recorded and an alarm message is generated.
10. A computer storage medium, characterized in that: A computer program executable by a processor is stored therein, and the computer program executes the method for denoising and identifying ultrasonic detection of ring parts according to any one of claims 1 to 8.
Citation Information
Cited By
Metal surface microdefect identification method and system based on ultrasonic microscopy
CN120102710A
Storage tank propellant liquid level three-dimensional reconstruction and liquid volume accurate measurement method based on ultrasonic phased array
CN120538631A
Method for three-dimensional reconstruction of propellant liquid level in storage tank based on ultrasonic phased array and accurate measurement of liquid volume
CN120538631B
Hydrogen conveying pipeline defect detection method and system, equipment and storage medium
CN120832635A
Ultrasonic water immersion detection method and device for disc ring piece
CN121540810A