An X-ray defect detection image data augmentation method for deep learning

By constructing a data augmentation method based on X-ray imaging physical model, the problem of insufficient data in X-ray defect detection is solved, and a high-quality data set is generated, which improves the generalization ability and defect recognition accuracy of deep learning models.

CN113989126BActive Publication Date: 2025-07-22NINGBO INSTITUTE OF TECHNOLOGY BEIHANG UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111284225.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-01
Publication Date
2025-07-22
Estimated Expiration
2041-11-01

AI Technical Summary

Technical Problem

In the detection of X-ray defects, due to insufficient data samples, the deep learning model is overfitted, and the generalization ability and robustness are poor, making it difficult to achieve efficient and intelligent recognition.

Method used

By collecting the X-ray projection image sequence of the workpiece, the three-dimensional CT image is reconstructed, the voxel model of the defect part is extracted and the three-dimensional image transformation is performed, the defect library is constructed, the defect is randomly added to the defect-free image, and the X-ray imaging physical model is used for forward projection to generate simulated DR images, simulating the imaging characteristics under different transillumination conditions.

Benefits of technology

The generated data set is closer to the actual detection image, providing high-quality data support, and improving the generalization ability and defect recognition accuracy of deep learning models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989126B_ABST
    Figure CN113989126B_ABST
Patent Text Reader

Abstract

The present invention discloses an X-ray defect detection image data enhancement method for deep learning. The method includes the following steps: collecting an X-ray projection image sequence of a workpiece, and obtaining a three-dimensional CT image through a reconstruction algorithm; selecting a defective three-dimensional CT image, extracting a voxel model of the defective part and performing three-dimensional image transformation on it to form a defect library; randomly selecting a defect from the defect library and adding it to a defect-free three-dimensional CT image to generate a defective three-dimensional CT image; generating a simulated DR image through forward projection operation to achieve the purpose of data enhancement. The embodiment of the present invention performs data enhancement by constructing an X-ray imaging mathematical-physical model. Compared with the traditional method of directly transforming the DR image, the generated simulated DR image set is closer to the actual ray detection image, can provide a large amount of high-quality data sets for X-ray defect detection based on deep learning, and provides an important guarantee for improving the defect recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of X-ray digital imaging and artificial intelligence, and particularly to a defect data enhancement method based on an X-ray imaging physical model. Background Art

[0002] As an advanced non-destructive testing technology, X-ray digital imaging technology can precisely detect internal defects of workpieces without damaging them, and is currently widely used in fields such as aerospace. At present, defect detection based on X-rays still mainly relies on manual film evaluation, which has prominent problems such as strong subjectivity and low detection efficiency.

[0003] In recent years, artificial intelligence technologies represented by deep learning have made breakthroughs in fields such as image segmentation and object detection, providing the possibility for intelligent defect interpretation of X-ray images. However, in industrial X-ray detection, due to the great differences in workpiece materials, structures, shapes, etc., the characteristics of the generated X-ray images vary greatly, and the positive and negative samples are extremely uneven, making it difficult to form a large dataset like a face database. Insufficient datasets often lead to overfitting of deep learning models, greatly reducing the generalization ability and robustness of the models, and becoming a bottleneck restricting the large-scale application of deep learning technology in the field of intelligent X-ray defect recognition.

[0004] For defect detection of small-sample data, existing methods mainly perform two-dimensional image transformation operations on ray detection images, such as rotation, flipping, scaling, etc. to expand the dataset. However, such methods are difficult to simulate the diversity of detection images brought about by factors such as workpiece structure and irradiation conditions in actual X-ray detection, resulting in low recognition accuracy of network models trained with such datasets in actual detection. Summary of the Invention

[0005] In order to overcome the problem of insufficient data samples in the above-mentioned intelligent X-ray defect detection, an embodiment of the present invention provides an X-ray defect detection image data enhancement method for deep learning, which is characterized by including the following steps:

[0006] Step 1: Collect a sequence of X-ray projection images of a workpiece, and obtain a three-dimensional CT image through a reconstruction algorithm;

[0007] Step 2: Select a defective three-dimensional CT image, extract the voxel model of the defective part and perform three-dimensional image transformation on it to form a defect library;

[0008] Step 3: Randomly select several defects from the defect library and add them to appropriate positions of a defect-free three-dimensional CT image to generate a defective three-dimensional CT image;

[0009] Step 4: Set the projection geometric parameters in the ray imaging simulation. By performing a forward projection operation on the 3D CT image, a simulated DR image is generated to achieve the purpose of data enhancement.

[0010] Further, in step 1, for the projection sequences obtained by different X-ray 3D CT imaging systems (cone-beam circular trajectory scanning imaging, helical scanning imaging), the corresponding FDK reconstruction algorithm can be used. For example, the FDK reconstruction algorithm for the cone-beam circular trajectory scanning imaging system is as follows:

[0011]

[0012] where μ(x, y, z) represents the CT reconstruction result, (x, y, z) represents the three-dimensional rectangular coordinates; U is the weighting factor; p(x1, z1, β) represents the projection value at the viewing angle β, (x1, z1) represents the detector element coordinates; D represents the distance from the X-ray source to the workpiece rotation center; h(x) is the filter, and * represents the convolution operation.

[0013] Further, in step 2, formula (2) is used to extract the three-dimensional voxel model of the defect:

[0014]

[0015] where S(x, y, z) and D(x, y, z) are both three-dimensional matrices; S(x, y, z) represents the region containing the defect in the 3D CT image, and the matrix elements represent the gray levels at the corresponding positions; D(x, y, z) represents the voxel model containing the defect, and the elements of the matrix represent the gray level difference between the defect and the background; b min 、b max 、b mean are respectively the minimum, maximum, and average values of the background gray level in the selected region; f mean represents the average value of the defect gray level.

[0016] Further, the three-dimensional image transformation in step 2 includes: three-dimensional geometric transformation (rotation, scaling, affine transformation); three-dimensional image morphological transformation (erosion, dilation); gray level transformation (gray level linear stretching, gamma transformation);

[0017] Further, in step 3, formula (3) is used to add the defect:

[0018] T′| (x,y,z)∈Ω =T| (x,y,z)∈Ω +D (3)

[0019] Among them, T′, T, and D are all three-dimensional matrices; T′ represents the image obtained after adding defects to the three-dimensional CT image of the defect-free workpiece; Ω represents the area where the defects are added; T represents the initial CT reconstruction image of the defect-free workpiece; D represents the three-dimensional voxel model of the defects.

[0020] Further, in step 4, the forward projection operator shown in formula (4) is used for the three-dimensional CT image with added defects to generate a simulated DR image:

[0021] p(x,z,β) = ∫ L T′(x,y,z)dl (4)

[0022] Among them, p(x,z,β) is the generated simulated DR image, which contains the structural information of the workpiece and the added defects, T′(x,y,z) is the three-dimensional CT image after adding defects, and L is the projection path. This method is based on the X-ray imaging physical model, and the generated simulated DR image can simulate the imaging characteristics of the workpiece under different geometric parameter irradiation conditions.

[0023] Further, the simulated projection geometric parameters in step 4 include: the distance between the X-ray source and the detector, i.e., the source-detector distance, the distance between the X-ray source and the workpiece, i.e., the source-object distance, and the placement angle of the workpiece. By changing the source-object distance and the source-detector distance, the projection magnification ratio is changed to obtain simulated DR images of different scales; by changing the placement angle of the workpiece, the ray irradiation path is changed to obtain simulated DR images under different irradiation angles.

[0024] The embodiment of the present invention utilizes the X-ray imaging physical model to generate simulated DR images with diverse defect characteristics by changing the internal features of the three-dimensional CT image of the workpiece and the irradiation geometric parameters, achieving the purpose of data enhancement. Compared with the traditional method of directly transforming the DR image, the generated image of the present invention is closer to the detection image collected by the actual imaging system, can provide a large number of high-quality data sets for X-ray defect detection based on deep learning, improve the generalization ability and robustness of the deep learning model, and further improve the defect recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flowchart of the defect data enhancement method based on the X-ray imaging physical model of the present invention;

[0026] Figure 2 is the projection sequence (left) of the defective workpiece processed by the present invention, the three-dimensional CT reconstruction image (upper right) of the defective workpiece, and its 398th layer slice image (lower right), and the air hole defect in the slice image is marked by a dotted square;

[0027] Figure 3Projection sequence of defect-free workpieces processed by the present invention (left), three-dimensional CT reconstruction image of defect-free workpieces (upper right), and its 300th layer slice image (lower right);

[0028] Figure 4 Three-dimensional voxel model of defects extracted from the CT reconstruction image with defects by the present invention and its 11th layer slice image, three-dimensional voxel model after rotation transformation and its 11th layer slice image, three-dimensional voxel model after gray-scale stretching transformation and its 11th layer slice image, three-dimensional voxel model after morphological dilation transformation and its 11th layer slice image;

[0029] Figure 5 192nd, 250th, and 300th layer slice images in the result image after adding defects to the defect-free three-dimensional CT image by the present invention, and their DR images generated by forward projection at 0°, 45°, and 90° respectively. The dashed square marks the pore defects in the slice image and the projection image. Detailed implementation manners

[0030] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation manners.

[0031] As Figure 1 shown, in view of the problem that a large amount of data sets are required for intelligent X-ray defect detection based on deep learning, the embodiment of the present invention provides a data enhancement method based on the X-ray imaging physical model. The specific steps of this method are as follows:

[0032] Step S101: Collect the X-ray projection image sequence of the workpiece, and obtain the three-dimensional CT image through the FDK reconstruction algorithm;

[0033] Step S102: Select the three-dimensional CT image with defects, extract the voxel model of the defective part and perform three-dimensional image transformation on it to form a defect library;

[0034] Step S103: Randomly select several defects from the defect library and add them to the defect-free three-dimensional CT image to generate a large number of three-dimensional CT images with defects;

[0035] Step S104: Select appropriate projection parameters, and generate simulated DR images by performing forward projection operations on the three-dimensional CT images to achieve the purpose of data enhancement.

[0036] The embodiment of the present invention utilizes the X-ray imaging physical model to generate DR images with diverse defect features by changing the internal features of the workpiece three-dimensional CT image and the radiographic geometric parameters, so as to achieve the purpose of data enhancement.

[0037] In order to prove the effect of the above embodiment, the embodiment of the present invention has carried out the following experiment. The steps are as follows:

[0038] (1) Set the experimental conditions. Under the cone-beam circular trajectory scanning mode, the projection sequences of the defective workpiece and the defect-free workpiece are collected respectively, which are composed of the projections at 360 angles obtained by 360° circumferential scanning, as shown in Figure 2 、 3 the left figure.

[0039] (2) Using the FDK reconstruction algorithm shown in formula (1), reconstruct the projection sequences of the defective workpiece and the defect-free workpiece respectively to obtain the reconstructed CT images, as shown in Figure 2 、 3 the right figure.

[0040] (3) Select the defect area of the CT image of the defective workpiece, and use formula (2) to extract the three-dimensional voxel model of the defect.

[0041] (4) Perform three-dimensional image transformations such as rotation, gray stretching, and morphological dilation on the defect voxel model extracted in the previous step to obtain the transformed defect voxel model.

[0042] (5) Add the obtained defect to the three-dimensional CT image of the defect-free workpiece according to formula (3) to generate a new three-dimensional image with defects.

[0043] (6) According to the forward projection operator shown in formula (4), calculate the corresponding simulated DR images of the three-dimensional CT image obtained in the previous step at the projection angles of 0°, 45°, and 90°.

[0044] Figure 4 are the three-dimensional defect voxel model extracted from the three-dimensional CT reconstruction image with defects in the embodiment of the present invention and its 11th layer slice image, the three-dimensional voxel model after rotation transformation and its 11th layer slice image, the three-dimensional voxel model after gray stretching transformation and its 11th layer slice image, and the three-dimensional voxel model after morphological dilation transformation and its 11th layer slice image. From Figure 4 it can be seen that the present invention can effectively extract the voxel model of the defect from the three-dimensional CT image of the defective workpiece and retain the features such as the morphology of the defect.

[0045] Figure 5 are the 192nd, 250th, and 300th layer slice images in the result image after adding the defect to the defect-free CT image in the embodiment of the present invention, and their DR images generated by forward projection at 0°, 45°, and 90° respectively. The dashed square marks the pore defects in the slice image and the projection image. From Figure 5 it can be seen that the present invention can effectively add the extracted defect to the three-dimensional CT image of the defect-free workpiece to generate a simulated DR image with defects, and can effectively simulate the detection image generated by actual radiography.

[0046] Compared with the data augmentation method based on traditional image transformation, the embodiment of the present invention can utilize the X-ray imaging principle to generate DR images that are closer to the detection images at the actual production site, can provide a large number of high-quality data sets for X-ray defect detection based on deep learning, improve the generalization ability and robustness of the deep learning model, and thus improve the defect recognition accuracy.

[0047] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and 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. An X-ray defect detection image data enhancement method for deep learning, characterized in that It includes the following steps: Step 1: Collect the X-ray projection image sequence of the workpiece, and obtain the three-dimensional CT image through the reconstruction algorithm; Step 2: Select the three-dimensional CT image containing defects, extract the three-dimensional voxel model containing defects and perform three-dimensional image transformation on it to form a defect library; Step 3: Randomly select several three-dimensional voxel models containing defects from the defect library, add the defects to the defect-free three-dimensional CT image to generate a three-dimensional CT image containing defects; Step 4: Set the projection geometric parameters in the ray imaging simulation. By performing forward projection operation on the three-dimensional CT image containing defects, generate a simulated DR image for the purpose of data enhancement, and then use it for the training of the defect recognition deep learning network; In Step 1, the FDK algorithm shown in formula (1) is used for reconstruction to obtain the three-dimensional CT image: (1) Among them, represents the CT reconstruction result, represents three-dimensional rectangular coordinates; is the weighting factor; represents the viewing angle of the projection value, ) represents the pixel coordinates of the projection image; D represents the distance from the ray source focus of the CT system to the workpiece rotation center; is the filter, represents the convolution operation; In Step 2, the difference between the defect and the workpiece gray level in the three-dimensional CT image containing defects is used to extract the defect, and the three-dimensional voxel model containing defects is extracted using formula (2): (2) Among them, and are both three-dimensional matrices; represents the defective area in the three-dimensional CT image, and the matrix elements represent the gray levels at the corresponding positions; represents the three-dimensional voxel model containing defects, and the elements of the matrix represent the difference in gray levels between the defects and the workpiece; and and are respectively the minimum, maximum, and average of the background gray levels in the selected area; represents the average gray level of the defects; In Step 3, formula (3) is used to add defects to simulate the gray level and morphological characteristics in the three-dimensional CT image containing defects, so as to obtain the three-dimensional CT image containing defects in each part of the workpiece: (3) Among them, , and are all three-dimensional matrices; represents the image obtained by adding defects to the defect-free three-dimensional CT image, that is, the three-dimensional CT image with defects; represents the area where defects are added; represents the defect-free three-dimensional CT image, represents the three-dimensional voxel model with defects; In Step 4, the projection geometric parameters include: the distance between the X-ray source and the detector, i.e., the source-detector distance, the distance between the X-ray source and the workpiece, i.e., the source-object distance, and the placement angle of the workpiece; under the set projection geometric parameters, the forward projection operator shown in formula (4) is used on the three-dimensional CT image containing defects to generate a simulated DR image: (4) Among them, is the generated simulated DR image, which contains the structural information of the workpiece and the added defects. is the three-dimensional CT image with defects, and L is the projection path.

2. The X-ray defect detection image data enhancement method for deep learning according to claim 1, characterized in that: In Step 2, the three-dimensional image transformation includes: three-dimensional geometric transformation, three-dimensional image morphological transformation, and gray level transformation. Among them, the three-dimensional geometric transformation includes rotation, scaling, and affine transformation; the three-dimensional image morphological transformation includes erosion and dilation; the gray level transformation includes gray level linear stretching and gamma transformation.

3. The X-ray defect detection image data enhancement method for deep learning according to claim 1, characterized in that: Generate the simulated DR image based on the X-ray imaging physical model, rather than directly performing two-dimensional transformation on the DR image of the workpiece with defects.

Citation Information

Patent Citations

  • Method for determining a test object orientation for a 2D X-ray system

    DE102019201069A1

  • Cone-beam CT three-dimensional reconstruction method and system

    WO2018035905A1