Workpiece defect identification method based on digital ray image structural features and CT image

By extracting structural features from digital ray images and combining CT images to build an improved semantic segmentation model, the problem of difficulty in distinguishing defects and structural artifacts in CT images is solved, and higher defect detection accuracy and lower error detection rate are achieved.

CN120031785AActive Publication Date: 2025-05-23ZHEJIANG UNIV

Patent Information

Application Number
CN202411836035.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-05-23
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In the prior art, when using CT images to train deep neural networks for artifact defect recognition, it is difficult to effectively distinguish defects from structural artifacts, and the structural information in digital ray images is ignored.

Method used

By first performing semantic segmentation of digital ray images, the structural features of the hole-type region are extracted, and combined with CT images, an improved semantic segmentation model is constructed, and the structural features are accumulated distribution curves and improved loss function are used to improve the accuracy of defect recognition.

Benefits of technology

It realizes effective identification of workpiece defects and structural artifacts, improves the accuracy of defect detection, and reduces the missed detection rate and false detection rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031785A_ABST
    Figure CN120031785A_ABST
Patent Text Reader

Abstract

The invention discloses a workpiece defect identification method based on digital ray image structural features and CT images. The method comprises the following steps: acquiring a digital ray image of a workpiece by utilizing industrial CT equipment, acquiring a hole pattern area of the digital ray image based on a semantic segmentation model, scanning by utilizing the industrial CT equipment to obtain a CT scanning image of the workpiece to be detected at a target detection area position, and calculating the target detection area position of the workpiece to be detected according to the digital ray image. The method comprises the following steps: acquiring a structural feature cumulative distribution curve corresponding to each CT scanning image, constructing an improved semantic segmentation model, training the improved semantic segmentation model by using the CT scanning images and the structural feature cumulative distribution curve to obtain a trained improved semantic segmentation model, and finally outputting a defect detection result of a workpiece through the improved semantic segmentation model. According to the method, the structural features in the digital ray image are extracted and input into the deep learning model together with the CT image, so that the defects and the structural artifacts are effectively distinguished, and the accuracy of workpiece defect detection can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of nondestructive testing, and in particular relates to a workpiece defect recognition method based on digital radiographic image structural features and CT images. Background Art

[0002] Industrial computed tomography (CT) images are formed by projecting the workpiece structure within a certain slice thickness range onto the target plane. Affected by the workpiece structure, structural artifacts similar to low-density inclusions, looseness, holes and other defect forms may be generated on the tomography image. Since the representation forms of structural artifacts and defects are basically the same, it is difficult to obtain ideal results by directly using CT images to train deep neural networks.

[0003] In actual inspection, inspectors usually first perform digital ray DR scanning on the workpiece to determine the specific height of the area to be inspected in the inspection system, and then perform CT scanning on the corresponding position. When training the CT image defect recognition model, the structural information contained in the DR image is often ignored. Therefore, the prior art lacks an intelligent defect recognition method for industrial CT inspection images based on the cumulative distribution of digital ray image structural features. Summary of the invention

[0004] In order to solve the problems existing in the background technology, the purpose of the present invention is to provide a workpiece defect recognition method based on digital radiographic image structural features and CT images.

[0005] The technical solution adopted by the present invention comprises the following steps:

[0006] Step S1, firstly, placing a workpiece to be inspected for defects on an industrial CT device, and using the industrial CT device to perform DR scanning to obtain a digital radiographic image I of the workpiece; in step S1, the width of the digital radiographic image I is W, and the height is H;

[0007] Step S2: acquiring a hole area L of the digital radiographic image I based on the first semantic segmentation model;

[0008] The step S2 specifically includes: inputting the digital radiographic image I with a width of W and a height of H into the trained first semantic segmentation model Unet, and outputting the hole-shaped area of ​​the digital radiographic image I;

[0009] Among them, the training method of the first semantic segmentation model Unet is as follows: first, construct a hole type area dataset, including multiple digital radiographic images I and their corresponding real hole type areas, and the real hole type area is the label of the hole type area dataset; then construct the first semantic segmentation model Unet, and input the hole type area dataset into the constructed first semantic segmentation model Unet for training to obtain the trained first semantic segmentation model Unet. The trained first semantic segmentation model Unet can be used to output the hole type area of ​​the digital radiographic image I.

[0010] Step S3: Next, an industrial CT device is used to scan and obtain a CT scan image of the workpiece to be inspected at the position of the target inspection area;

[0011] The target detection area position is a common defect position of the workpiece to be detected, such as a weld position, etc. The target detection area position of the workpiece can be obtained by directly observing the digital radiographic image I of the workpiece.

[0012] Step S4, obtaining a cumulative distribution curve of structural features corresponding to each CT scan image according to the digital radiographic image I;

[0013] Step S5, constructing an improved semantic segmentation model Unet, and training the improved semantic segmentation model using CT scan images and cumulative distribution curves of structural features to obtain a trained improved semantic segmentation model;

[0014] Step S6: Finally, the CT scan image of the workpiece with defects to be detected is input into the trained improved semantic segmentation model Unet, and the defect detection result of the workpiece is output.

[0015] The step S3 is specifically as follows:

[0016] First, the target detection area of ​​the workpiece is determined according to the digital radiographic image I of the workpiece. Then, the scanning height hc and the tomographic scanning slice thickness d of the industrial CT device are set according to the position of the target detection area. Then, a CT scan is performed at the position of the target detection area of ​​the workpiece using the industrial CT device to obtain a CT scan image of the workpiece at the position of the target detection area. Subsequently, the scanning height hc and the tomographic scanning slice thickness d of the industrial CT device can be adjusted to scan multiple CT scan images.

[0017] The step S4 is specifically as follows:

[0018] Step S4.1: coordinate transformation is performed on each CT scan image according to the following formula to obtain the position of the target detection area in the CT scan image in the digital radiographic image I:

[0019]

[0020] Wherein, h′ represents the height corresponding to the scanning height hc of the CT scan image in the digital radiographic image I; d′ represents the slice thickness corresponding to the tomographic scanning slice thickness d of the CT scan image in the digital radiographic image I; P start Indicates the starting scanning height of the industrial CT equipment coordinate system during DR scanning; P end It represents the end scanning height of the industrial CT equipment coordinate system during DR scanning; H is the height of the digital radiographic image I; S represents the pixel size of the radiographic image I, that is, the pixel size of the digital radiographic image I is S×S;

[0021] Step S4.2: Based on the position of the target detection area in the digital radiographic image I, obtain the cumulative distribution curve G(x, fx) of the structural features corresponding to each CT scan image.

[0022] In step S4.2, the structure feature cumulative distribution curve G(x,fx) is obtained as follows:

[0023] Step S4.2.1, firstly obtain a number of structural feature data points (x, fx) according to the radiographic image I, wherein fx represents the number of pixels of the hole area L identified by the first semantic segmentation model at the position of the horizontal coordinate x of the target hole area R in the digital radiographic image I;

[0024] The expression of the target hole area R in the digital radiographic image I is as follows:

[0025]

[0026] Wherein, x and y represent the abscissa and ordinate of the target hole area R, respectively, and W represents the width of the digital radiographic image I;

[0027] Step S4.2.2, then, with the abscissa x of the target hole area R as the abscissa axis and the number of pixel points fx as the ordinate axis, draw a cumulative distribution curve G(x, fx) of the structural characteristics.

[0028] The step S5 is specifically as follows:

[0029] Step S5.1, establishing a workpiece defect image data set, including CT scan images and their corresponding category labels, wherein the category labels of the workpiece defect image data set include a structural feature cumulative distribution curve G(x, fx) and real defects of the workpiece;

[0030] Step S5.2, constructing an improved semantic segmentation model Unet;

[0031] Step S5.3: input the workpiece defect image dataset into the constructed improved semantic segmentation model Unet for training to obtain the trained improved semantic segmentation model Unet.

[0032] In step S5.2, the improved semantic segmentation model Unet is obtained by adding a convolutional layer, a feature extractor Transformer, a feature fusion layer and a fully connected layer to the conventional semantic segmentation model Unet. The specific adding method is as follows:

[0033] In the conventional semantic segmentation model Unet, the convolution layer, feature extractor Transformer and feature fusion layer are connected in sequence between the last encoder and the first decoder. The fully connected layer is connected to the feature fusion layer. The fully connected layer is used to process the input structural feature cumulative distribution curve G(x, fx). The output of the feature extractor Transformer and the structural feature cumulative distribution curve processed by the fully connected layer are spliced ​​and then input into the feature fusion layer.

[0034] In step S5.3, when the improved semantic segmentation model Unet is trained, the loss function is used to calculate the segmentation loss. The loss function adopts the improved binary cross entropy function. The loss calculation is specifically obtained by the following formula:

[0035] Loss = αL 1 +β(L 2 +L 3 )

[0036]

[0037] L 2 =ω 1 y″(1-y′)

[0038] L 3 =ω 2 y′(1-y″)

[0039] Among them, Loss represents the improved binary cross entropy function; α and β represent the weights of local loss and global loss respectively; L 1 represents the binary cross entropy function before improvement; L 2 Indicates missed detection rate; L 3 represents the false detection rate; N represents the total number of pixels in the image; y i Indicates the true probability that pixel i is a defect; represents the predicted probability that pixel i is a defect; ω 1 Represents the weight of missed detection rate; ω 2 Indicates the weight of the false positive rate; y″ represents the global actual value. When y″=1, it means that the image has defects, and when y″=0, it means that the image does not have defects; y′ represents the global predicted value. When y′=1, it means that the predicted image has defects, and when y′=0, it means that the predicted image does not have defects.

[0040] The overall DR image of the workpiece can reflect the distribution of the characteristic structure in the workpiece in the axial direction (vertical direction). By extracting the information in the DR image, it can be used as prior knowledge to constrain the training of the CT image defect recognition model and improve the recognition accuracy of the CT image defect recognition model.

[0041] The beneficial effects of the present invention are:

[0042] 1. The present invention extracts structural features from DR images and inputs them into a deep learning model together with CT images to achieve effective identification of defects and structural artifacts, which can effectively improve the accuracy of workpiece defect detection.

[0043] 2. The present invention is based on an improved defect recognition model loss function, which adds a global loss term on the basis of binary cross entropy loss to reduce the missed detection rate and false detection rate of the model.

[0044] 3. The defect recognition of conventional industrial CT images is limited to the information inside the CT images, and it is difficult to distinguish structural artifacts that are basically consistent with the defect representation form. The present invention extracts the structural features in the DR images and inputs them into the deep learning model together with the CT images to achieve effective identification of defects and structural artifacts. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is the overall flow chart of the present invention;

[0046] Figure 2 It is the piston DR image;

[0047] Figure 3 is the hole area in the predicted DR image;

[0048] Figure 4 It is the calculation principle diagram of the cumulative distribution curve of structural characteristics;

[0049] Figure 5 is the cumulative distribution curve of structural characteristics;

[0050] Figure 6 It is the overall structure diagram of the improved semantic segmentation model;

[0051] Figure 7 This is a comparison chart of typical CT image recognition results. DETAILED DESCRIPTION

[0052] The present invention is described in detail below in conjunction with specific implementation cases. The following implementation cases will help those skilled in the art to further understand the present invention, but will not limit the present invention in any form.

[0053] The steps of the embodiment of the present invention are as follows: Figure 1 As shown:

[0054] Step S1: First, place the piston to be inspected for defects on the industrial CT equipment, use the industrial CT equipment to perform a DR scan to obtain a digital radiographic image I of the piston, then rotate the piston 90°, and perform a digital ray projection, such as Figure 2 As shown, the width W of the digital radiographic image I is 1500 and the height H is 1600;

[0055] Step S2: Based on the first semantic segmentation model Unet, the hole area L of the digital radiographic image I is obtained. The predicted result is as follows: Figure 3 As shown;

[0056] Step S3: Next, an industrial CT device is used to scan and obtain a CT scan image of the workpiece to be inspected at the position of the target inspection area, and the target inspection area is specifically the bottom of the inner cooling oil channel of the piston;

[0057] Step S3 is specifically as follows:

[0058] First, the position of the target detection area of ​​the workpiece is determined according to the digital radiographic image I of the piston. Then, the scanning height hc of the industrial CT device is set to 521.0 mm and the tomographic scanning slice thickness d is set to 1 mm according to the position of the target detection area. Then, a CT scan is performed at the target detection area of ​​the workpiece using the industrial CT device to obtain a CT scan image of the workpiece at the target detection area. Subsequently, the scanning height hc and the tomographic scanning slice thickness d of the industrial CT device can be adjusted to scan multiple CT scan images.

[0059] Step S4: Obtain the starting height P of the scan according to the mechanical information of the industrial CT equipment start is 400mm and the end height P end It is 560mm.

[0060] Step S5: Calculate the pixel size S×S=0.1×0.1 of the digital radiographic image I according to the scanning start height and scanning end height in step 4. Perform coordinate transformation of the CT scan image, and the corresponding height of the target detection area position in the digital radiographic image I is h′=1210, and the slice thickness is d′=10.

[0061] Step S6: Calculate the cumulative distribution curve of the structural characteristics based on the digital radiographic image. The calculation principle is as follows: Figure 4 As shown: For each column in the target hole area R = {(x, y) | 0 ≤ x ≤ 1500, 1205 ≤ y ≤ 1215} in the digital radiographic image I, the number of pixels in the hole area identified by the first semantic segmentation model Unet is fx, and the obtained structural feature cumulative distribution curve is as follows Figure 5 shown.

[0062] Step S7, first, establish a workpiece defect image dataset, including CT scan images and their corresponding category labels, the category labels of the workpiece defect image dataset include the structural feature cumulative distribution curve G(x, fx) and the real defects of the workpiece; then build an improved semantic segmentation model Unet; finally, input the workpiece defect image dataset into the constructed improved semantic segmentation model Unet for training, and obtain the trained improved semantic segmentation model Unet.

[0063] The improved semantic segmentation model Unet is constructed as follows: a convolutional layer, a Transformer layer, and a feature fusion layer are added to a new semantic segmentation model Unet, and a fully connected layer is added to process the cumulative distribution curve of the structural features. The specific location of the Transformer layer is after the encoding layer of the semantic segmentation model Unet. The output of the Transformer layer and the processed cumulative distribution curve of the structural features are spliced ​​and input into the feature fusion layer. The overall structure of the improved semantic segmentation model Unet is as follows: Figure 6 As shown, Figure 6 The numbers inside represent the shapes of input and output data.

[0064] For single-category semantic segmentation tasks, binary cross entropy loss can be used to calculate the difference between the predicted value and the true label of each pixel, and the binary cross entropy loss can be improved to obtain the loss function of the improved semantic segmentation model:

[0065] Loss = αL 1 +β(L 2 +L 3 )

[0066]

[0067] L 2 =ω 1 y″(1-y′)

[0068] L 3 =ω 2 y′(1-y″)

[0069] Among them, Loss represents the improved binary cross entropy function; α and β represent the weights of local loss and global loss respectively; L 1 represents the binary cross entropy function before improvement; L 2 Indicates missed detection rate; L 3 represents the false detection rate; N represents the total number of pixels in the image; y i Indicates the true probability that pixel i is a defect; represents the predicted probability that pixel i is a defect; ω 1 Represents the weight of missed detection rate; ω 2Indicates the weight of the false positive rate; y″ represents the global actual value. When y″=1, it means that the image has defects, and when y″=0, it means that the image does not have defects; y′ represents the global predicted value. When y′=1, it means that the predicted image has defects, and when y′=0, it means that the predicted image does not have defects.

[0070] Step S8: Use the trained improved semantic segmentation model Unet to predict the workpiece CT image. Sample 1 is 205 defect-free pistons, and sample 2 is 330 defective pistons. And compare with the conventional unimproved semantic segmentation model Unet, as shown in Table 1. Among them, Unet represents the conventional unimproved semantic segmentation model Unet, Unet+Transformer layer represents the addition of convolution layer and Transformer layer to the conventional semantic segmentation model Unet, and Unet+Transformer layer+feature fusion layer represents the improved semantic segmentation model Unet provided by the present invention. The comparison results of typical CT images are shown in Table 1. Figure 7 shown.

[0071] Table 1 Comparison of prediction results

[0072]

[0073] The results in Table 1 show that the improved semantic segmentation model Unet used in the present invention has a good identification effect on structural artifacts and defects.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying workpiece defects based on digital radiographic image structural features and CT images, characterized in that: The following steps are involved: Step S1: firstly place a workpiece with defects to be detected on an industrial CT device, and use the industrial CT device to perform DR scanning to obtain a digital radiographic image I of the workpiece; Step S2: acquiring a hole area L of the digital radiographic image I based on the first semantic segmentation model; Step S3: Next, an industrial CT device is used to scan and obtain a CT scan image of the workpiece to be inspected at the position of the target inspection area; Step S4, obtaining a cumulative distribution curve of structural features corresponding to each CT scan image according to the digital radiographic image I; Step S5, constructing an improved semantic segmentation model Unet, and training the improved semantic segmentation model using CT scan images and cumulative distribution curves of structural features to obtain a trained improved semantic segmentation model; Step S6: Finally, the CT scan image of the workpiece with defects to be detected is input into the trained improved semantic segmentation model Unet, and the defect detection result of the workpiece is output.

2. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 1, characterized in that: The step S3 is specifically as follows: First, the target detection area of ​​the workpiece is determined according to the digital radiographic image I of the workpiece. Then, the scanning height hc and the tomographic scanning slice thickness d of the industrial CT equipment are set according to the position of the target detection area. Then, a CT scan is performed at the position of the target detection area of ​​the workpiece using the industrial CT equipment to obtain a CT scan image of the workpiece at the position of the target detection area.

3. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 1, characterized in that: The step S4 is specifically as follows: Step S4.1: coordinate transformation is performed on each CT scan image according to the following formula to obtain the position of the target detection area in the CT scan image in the digital radiographic image I: Wherein, h′ represents the height corresponding to the scanning height hc of the CT scan image in the digital radiographic image I; d′ represents the slice thickness corresponding to the tomographic scanning slice thickness d of the CT scan image in the digital radiographic image I; P start Indicates the starting scanning height of the industrial CT equipment coordinate system during DR scanning; P end It represents the end scanning height of the industrial CT equipment coordinate system during DR scanning; H is the height of the digital radiographic image I; S represents the pixel size of the radiographic image I; Step S4.2: Based on the position of the target detection area in the digital radiographic image I, obtain the cumulative distribution curve G(x, fx) of the structural features corresponding to each CT scan image.

4. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 3 is characterized in that: In step S4.2, the structure feature cumulative distribution curve G(x,fx) is obtained as follows: Step S4.2.1, firstly, obtain a number of structural feature data points (x, fx) according to the radiographic image I, wherein fx represents the number of pixel points of the hole area L identified at the position of the horizontal coordinate x of the target hole area R in the target hole area R of the digital radiographic image I; The expression of the target hole area R in the digital radiographic image I is as follows: Wherein, x and y represent the abscissa and ordinate of the target hole area R, respectively, and W represents the width of the digital radiographic image I; Step S4.2.2, then, with the abscissa x of the target hole area R as the abscissa axis and the number of pixel points fx as the ordinate axis, draw a cumulative distribution curve G(x, fx) of the structural characteristics.

5. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 1, characterized in that: The step S5 is specifically as follows: Step S5.1, establishing a workpiece defect image data set, including CT scan images and their corresponding category labels, wherein the category labels of the workpiece defect image data set include a structural feature cumulative distribution curve G(x, fx) and real defects of the workpiece; Step S5.2, constructing an improved semantic segmentation model Unet; Step S5.3: input the workpiece defect image dataset into the constructed improved semantic segmentation model Unet for training to obtain the trained improved semantic segmentation model Unet.

6. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 5, characterized in that: In step S5.2, the improved semantic segmentation model Unet is obtained by adding a convolutional layer, a feature extractor Transformer, a feature fusion layer and a fully connected layer to the conventional semantic segmentation model Unet. The specific adding method is as follows: In the conventional semantic segmentation model Unet, the convolutional layer, feature extractor Transformer and feature fusion layer are connected in sequence between the last encoder and the first decoder. The fully connected layer is used to process the input structural feature cumulative distribution curve G(x, fx). The output of the feature extractor Transformer and the structural feature cumulative distribution curve processed by the fully connected layer are spliced ​​and then input into the feature fusion layer.

7. The method for identifying workpiece defects based on digital radiographic image structural features and CT images according to claim 5, characterized in that: In step S5.3, when the improved semantic segmentation model Unet is trained, the loss function is used to calculate the segmentation loss. The loss function adopts the improved binary cross entropy function. The loss calculation is specifically obtained by the following formula: Loss = αL1 + β(L2 + L3) L2=ω1·y″(1-y′) L3=ω2·y′(1-y″) Among them, Loss represents the improved binary cross entropy function; α and β represent the weights of local loss and global loss respectively; L1 represents the binary cross entropy function before improvement; L2 represents the missed detection rate; L3 represents the false detection rate; N represents the total number of pixels in the image; y i Indicates the true probability that pixel i is a defect; represents the predicted probability that pixel i is a defect; ω1 represents the weight of the missed detection rate; ω2 represents the weight of the false detection rate; y″ represents the global actual value; y′ represents the global predicted value.

Citation Information

Patent Citations

  • X-ray defect detection image data enhancement method for deep learning

    CN113989126A

  • Artificial intelligence segmentation and classification algorithm for industrial appearance defect detection

    CN116206104A

  • Transform-based industrial CT image defect detection method and system

    CN117726572A

  • X-ray-based nondestructive testing method and system for internal defects of power supply equipment

    CN118566266A

  • Ceramic matrix composite real-time damage degree prediction method based on deep learning

    CN119005024A

Cited By

  • Piston detection method

    CN119887628A

  • A piston detection method

    CN119887628B