Sparse CT reconstruction method and system in assembly anomaly detection
Through the combination of pre-trained prior network and multi-layer perceptron network, the problems of long time and poor imaging effect of sparse samples of traditional CT reconstruction methods are solved, and real-time detection and efficient reconstruction of the internal assembly structure of the workpiece are achieved.
Patent Information
- Application Number
- CN202410594155.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
The traditional CT reconstruction method takes too long in data acquisition and reconstruction, cannot achieve real-time detection, and the imaging effect is not ideal when using sparse samples, making it impossible to accurately monitor the internal assembly structure of the workpiece.
The network parameters of the pre-trained prior network are used to initialize the reconstruction network, and Fourier feature mapping and multi-layer perceptron networks are used to obtain a sparse CT reconstruction model through L2 loss optimization training, which quickly converges to output the reconstructed image.
It achieves better reconstruction of the detailed features of the workpiece, significantly reduces the time of data collection and three-dimensional reconstruction, achieves the purpose of real-time detection, and is suitable for industrial products with fast production pace and huge output.
Smart Images

Figure CN118537486A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer tomography reconstruction, and in particular to a sparse CT reconstruction method and system in assembly anomaly detection. Background Art
[0002] Using X-rays to inspect industrial products is an important technology in the field of nondestructive testing, and its origin can be traced back to the early 20th century. At that time, X-ray technology was widely used to detect internal defects in metal pipes and railway axles. With the development of science and technology, X-ray technology has been continuously improved and perfected, and its application field has gradually expanded to the inspection and quality control of various industrial products. In addition to X-ray projection technology, there are other common technologies in the field of nondestructive testing, such as ultrasonic testing, magnetic particle testing, eddy current testing, etc. These technologies each have different characteristics and application ranges, and can be used to detect different types of materials and defects. However, using X-ray sparse projection technology to perform three-dimensional reconstruction of the internal structure of industrial products is the best method for internal assembly inspection of workpieces. However, the traditional CT reconstruction assembly inspection method takes too long to collect and reconstruct data, and there is a problem that real-time detection cannot be achieved, and the efficiency of traditional inspection methods is also relatively low.
[0003] In order to improve the detection efficiency and realize real-time online detection, researchers have conducted a lot of research. For example, the Chinese patent "Single-view CT reconstruction method integrating FDK and deep learning" (CN113052936A) uses the FDK algorithm to complete accurate 2D to 3D mapping, and at the same time builds a CT fine-tuning network to fine-tune the CT volume obtained by back-projection, thereby improving the quality of the tomographic image. This invention uses the FDK algorithm and deep learning to achieve low-dose CT reconstruction. The Chinese patent "Single-view CT reconstruction method combining global and local in defect detection" (CN114897785A) reconstructs the three-dimensional (3D) CT global structure and internal local micro-defects of the target from a single two-dimensional (2D) X-ray image of the workpiece, thereby improving the efficiency and accuracy of defect detection. At the same time, a new focusing function is designed so that the network can focus on the reconstruction of the micro-structure inside the workpiece. However, these two methods require a large number of CT scan images. When sparse samples are input, the imaging effect is not ideal, and accurate monitoring of the internal assembly structure of the workpiece cannot be achieved. Summary of the invention
[0004] To solve the above problems, an object of the embodiments of the present invention is to provide a sparse CT reconstruction method and system for assembly anomaly detection.
[0005] Sparse CT reconstruction methods for assembly anomaly detection, including:
[0006] Step 1: Perform CT scanning on the assembly structure of the target workpiece to obtain a data set; the data set includes a prior image and a target image; the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions;
[0007] Step 2: Encode the coordinates of the prior image to obtain encoded coordinates;
[0008] Step 3: Using the encoded coordinates as input and the grayscale values corresponding to the encoded coordinates as output to train the prior network to obtain a pre-trained prior network;
[0009] Step 4: Initialize the reconstruction network using the network parameters of the pre-trained prior network, and use the target image as a constraint to train the reconstruction network, and obtain a sparse CT reconstruction model after the network converges quickly; wherein both the prior network and the reconstruction network are MLP network models;
[0010] Step 5: Use the sparse CT reconstruction model to output a reconstructed image.
[0011] Preferably, the step 2: encoding the coordinates of the prior image to obtain encoded coordinates comprises:
[0012] The coordinates of the prior image are encoded using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is:
[0013] γ(c)=[cos(2πBc),sin(2πBc)] T
[0014] Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
[0015] Preferably, in step 3, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is:
[0016]
[0017] Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to the coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
[0018] Preferably, step 4 comprises:
[0019] Step 4.1: Initialize the reconstruction network using the network parameters of the pre-trained prior network to obtain the initialized reconstruction network;
[0020] Step 4.2: Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image;
[0021] Step 4.3: Calculate the L2 loss between the predicted reconstructed image and the target image after Radon transformation, and optimize and train the reconstruction network based on the L2 loss to obtain a sparse CT reconstruction model; wherein the L2 loss is:
[0022]
[0023] Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
[0024] The present invention also provides a sparse CT reconstruction system for assembly anomaly detection, comprising:
[0025] A data set acquisition module is used to perform CT scanning on the assembly structure of the target workpiece to acquire a data set; the data set includes a prior image and a target image; wherein the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions;
[0026] A coordinate encoding module, used for encoding the coordinates of the prior image to obtain encoded coordinates;
[0027] A pre-training module, used for taking the coded coordinates as input and the grayscale values corresponding to the coded coordinates as output to train a priori network to obtain a pre-trained priori network;
[0028] A reconstruction network training module is used to initialize the reconstruction network using the network parameters of the pre-trained prior network, and to train the reconstruction network using the target image as a constraint, and to obtain a sparse CT reconstruction model after the network converges quickly; wherein both the prior network and the reconstruction network are MLP network models;
[0029] A reconstruction module is used to output a reconstructed image using the sparse CT reconstruction model.
[0030] Preferably, the coordinate encoding module includes:
[0031] A coordinate encoding unit, used to encode the coordinates of the prior image using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is:
[0032] γ(c)=[cos(2πBc),sin(2πBc)]T
[0033] Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
[0034] Preferably, in the pre-training module, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is:
[0035]
[0036] Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to the coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
[0037] Preferably, the reconstruction network training module includes:
[0038] Initialize the reconstruction network using the network parameters of the pre-trained priori network to obtain an initialized reconstruction network;
[0039] Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image;
[0040] The predicted reconstructed image is subjected to Radon transformation and the L2 loss between the predicted image and the target image is calculated. The reconstruction network is optimized and trained based on the L2 loss to obtain a sparse CT reconstruction model. The L2 loss is:
[0041]
[0042] Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
[0043] The present invention also provides an electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, and when the computer program is executed by the processor, the steps in the sparse CT reconstruction method in the above-mentioned assembly anomaly detection are implemented.
[0044] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the sparse CT reconstruction method in assembly anomaly detection are implemented.
[0045] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0046] The present invention relates to a sparse CT reconstruction method, system, electronic device and computer-readable storage medium in assembly anomaly detection. Compared with the prior art, the present invention obtains a sparse CT reconstruction model by initializing and training a reconstruction network using network parameters of a pre-trained priori network, and outputs a reconstructed image based on the model. On the one hand, the detailed features of the workpiece can be better reconstructed, and on the other hand, the time for data acquisition and three-dimensional reconstruction can be greatly reduced to achieve the purpose of real-time detection, which is of great significance for industrial products with fast production rhythm and huge output.
[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only 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.
[0049] Figure 1 A flow chart of the sparse CT reconstruction method for assembly anomaly detection provided by the present invention;
[0050] Figure 2 A schematic diagram of the sparse CT reconstruction method for assembly anomaly detection provided by the present invention;
[0051] Figure 3 A schematic diagram of equi-angle scanning provided by the present invention;
[0052] Figure 4 This is a diagram of the overall architecture of the network provided by the present invention. DETAILED DESCRIPTION
[0053] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0054] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0055] See also Figure 1-2 , sparse CT reconstruction methods for assembly anomaly detection, including:
[0056] Step 1: Perform CT scanning on the assembly structure of the target workpiece to obtain a data set; the data set includes a prior image and a target image; wherein the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions;
[0057] The dataset consists of CT projection images of abnormal assembly of workpieces scanned at sparse angles. In addition to the sparsely sampled measurement data, the dataset also has prior images of normal assembly scanned at complete angles. Since the prior images and reconstructed images are images of the same workpiece in different assembly conditions, the prior images can provide useful information about the assembly structure of the workpiece while still allowing for key structural and functional differences.
[0058] A set of fully angled CT projection images of normally assembled target workpieces and their 3D reconstruction results are used as prior images. The 3D reconstruction results are resized to 128 × 128 × 40 by cropping. The training goal is to reconstruct multiple sets of 3D abnormally assembled CT images with an image size of 128 × 128 × 40. The degree of abnormal assembly of workpieces increases from the first group to the last group, and the first and last groups have the greatest structural difference.
[0059] Step 2: Encode the coordinates of the prior image to obtain encoded coordinates;
[0060] Furthermore, step 2 includes:
[0061] The coordinates of the prior image are encoded using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is:
[0062] γ(c)=[cos(2πBc),sin(2πBc)] T
[0063] Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
[0064] The Fourier feature map enables the subsequently trained multi-layer perceptron network to better learn the high-frequency components in the image.
[0065] Step 3: Using the encoded coordinates as input and the grayscale values corresponding to the encoded coordinates as output to train the prior network to obtain a pre-trained prior network;
[0066] In step 3, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is:
[0067]
[0068] Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to the coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
[0069] Unlike traditional reconstruction algorithms that find the relationship between scanned images and reconstructed images, the purpose of pre-training the network is to learn the relationship between coordinates and the grayscale values of corresponding pixels, so pre-training is performed by constructing a multi-layer perceptron. The multi-layer perceptron is an implicit neural expression that can transform the learning task into an optimization task for network parameters. By continuously optimizing the parameters in the network, the mapping relationship between the coordinate information after Fourier feature mapping and the grayscale values of corresponding pixels can be finally found. In order to speed up the convergence of the network, a periodic activation function is further added at the end of each layer of the multi-layer perceptron.
[0070] Step 4: Initialize the reconstruction network using the network parameters of the pre-trained prior network, and use the target image as a constraint to train the reconstruction network to obtain a sparse CT reconstruction model; wherein both the prior network and the reconstruction network are MLP network models.
[0071] Furthermore, step 4 includes:
[0072] Step 4.1: Initialize the reconstruction network using the network parameters of the pre-trained prior network to obtain the initialized reconstruction network;
[0073] Step 4.2: Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image;
[0074] Step 4.3: Calculate the L2 loss between the predicted reconstructed image and the target image after Radon transformation, and optimize and train the reconstruction network based on the L2 loss to obtain a sparse CT reconstruction model; wherein the L2 loss is:
[0075]
[0076] Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
[0077] Since there is a difference between the prior image and the three-dimensional image corresponding to the sparse projection, the process of optimizing the loss is to let the multi-layer perceptron learn the above difference. Finally, in the continuous training process, the parameters of the network are continuously optimized, and the reconstruction result output by the multi-layer perceptron will gradually approach the real three-dimensional structure of the image, achieving the ultimate sparse CT reconstruction purpose;
[0078] Step 5: Use the sparse CT reconstruction model to output a reconstructed image.
[0079] The present invention further describes the sparse CT reconstruction method for assembly anomaly detection in the present invention in combination with specific embodiments below:
[0080] Step 1: Establishment and preprocessing of data set.
[0081] In this example, a data set is obtained by performing CT scanning on the assembly structure of the fuze workpiece. The normally assembled fuze is scanned with X-rays at equal angles to obtain CT projections at full angles and the corresponding three-dimensional reconstructed structures as the training set for the first stage. Six fuze workpieces with different degrees of abnormal assembly are selected for equal angle scanning to obtain six groups of 20 uniform CT projections (such as Figure 3 As shown in the figure), it is used as the training set for the subsequent second stage.
[0082] The 3D data in the dataset is resized to 128×128×40 by cropping, and the 2D image is resized to 128×128. The training goal is to reconstruct 6 sets of 3D abnormal assembly CT images with an image size of 128×128×40.
[0083] The samples in pre-training are processed by standardization (x-μ) / σ, where x represents the prior sample.
[0084] like Figure 4 As shown, since Fourier features have a good effect on the network learning high-frequency functions, the Fourier feature map γ is used to encode the sample input coordinates c, and then applied to the coordinate network, as shown in the following formula:
[0085] γ(c)=[cos(2πBc),sin(2πBc)] T
[0086] Among them, B represents the coefficient of Fourier characteristic transform, from Gaussian distribution The entries of the matrix B are sampled in , and σ is a hyperparameter that characterizes the standard deviation of the prior distribution. After Fourier feature embedding, the input of the network is the encoding coordinate γ(c).
[0087] Step 2: Train the prior network.
[0088] network The parameter of is Φ, which is implemented by a deep fully connected network MLP. The coordinate-based MLP parameterizes the continuous function to represent the entire image. An eight-layer MLP network with a width of 256 neural nodes was constructed for CT reconstruction, in which each fully connected layer except the last layer is followed by a periodic activation function. The standard deviation of the Gaussian distribution is a hyperparameter and is set to 4.
[0089] The model depth and width of the MLP are hyperparameters that characterize the representational ability of the MLP model. In addition, the periodic activation function used in the MLP model is after each fully connected layer, which has been shown to be effective in representing fine details in the signal.
[0090] The overall training goal is to give the corresponding sparse angular CT projection image y and the prior image x pr The training goal of the pre-trained network is to find the corresponding relationship between the coordinates and intensity inside the workpiece assembly structure, that is, where x pr It has a similar distribution to x and is a scan of different defect levels of the same assembly workpiece.
[0091] There are a total of N pixels in the image, i represents the coordinate index in the image space field, and the objective function is as follows:
[0092]
[0093] The above formula is optimized by Adam optimizer, with a learning rate of 0.0001 and 2000 iterations. The network is implemented using PyTorch. pr The internal information of is encoded into the MLP network with corresponding network parameters Φ* middle.
[0094] After learning the distribution of the prior image, we input the network coordinate information, calculate the corresponding grayscale value, and restore x based on the paired coordinate and grayscale information. pr For ease of understanding, the following writing
[0095] Step 3: Embed a priori network for sparse CT reconstruction
[0096] Through a coordinate-based MLP with parameter θ The unknown target image x is parameterized. Therefore, the data term is defined as The optimization in the image space is converted into the optimization of the MLP network parameters. Represents an MLP network model with parameter θ, which contains the mapping relationship between coordinates and pixel intensity values.
[0097] Where A represents the forward model Radon transform, and the pre-trained And the sparse angular CT projection map y, since all coordinate intensity pairs share the same underlying continuous function, they can be Based on the training of M θ , the corresponding expression is as follows:
[0098]
[0099] Learning pre-trained The prior knowledge in the correspondence between coordinates and intensity is Initialization is performed, and after initialization, the L2 loss is calculated. After the coordinates pass through the MLP, the predicted reconstructed image is output. The more similar the reconstructed image is to the sparse angle CT projection image after the Radon transform, the more accurate the predicted reconstructed image is. It means that a well-trained network can infer the three-dimensional reconstructed image through the coordinate information, so there is
[0100]
[0101] Specifically, given the previously embedded MLP as initialization, the reconstruction network is trained by optimizing the objective in the above function using the Adam optimizer with a learning rate of 0.00001 for 2000 iterations. For the differentiable forward model A, the Radon transform or forward projection operation of CT imaging is implemented by using the Operator Discretization Library (ODL).
[0102] The pre-trained network inputs coordinate information and outputs grayscale values, and then obtains the reconstructed result image. Since the 20 projections are evenly distributed on a semicircle, the direction information during scanning can be obtained, and the predicted sparse angle CT projection image is calculated in combination with the Radon transform. Finally, the L2 loss between the predicted image and the actual sparse angle CT projection image is calculated, and the MLP is optimized using this loss. Since the prior image and the training image have very similar distributions, only some of the defective positions are different, so the final MLP can be easily optimized, and the output image is the reconstructed result image corresponding to the sparse angle CT projection image.
[0103] The present invention uses a multi-layer perceptron to learn the implicit neural expression of coordinates and grayscale pairs of the reconstructed image and embeds it into the reconstruction network to perform CT reconstruction. On the one hand, it can better reconstruct the detailed features of the workpiece, and on the other hand, it can greatly reduce the time of data collection and three-dimensional reconstruction, thereby achieving the purpose of real-time detection. This is of great significance for industrial products with fast production pace and huge output.
[0104] The present invention also provides a sparse CT reconstruction system for assembly anomaly detection, comprising:
[0105] A data set acquisition module is used to perform CT scanning on the assembly structure of the target workpiece to acquire a data set; the data set includes a prior image and a target image; wherein the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions;
[0106] A coordinate encoding module, used for encoding the coordinates of the prior image to obtain encoded coordinates;
[0107] A pre-training module, used for taking the coded coordinates as input and the grayscale values corresponding to the coded coordinates as output to train a priori network to obtain a pre-trained priori network;
[0108] A reconstruction network training module is used to initialize the reconstruction network using the network parameters of the pre-trained prior network, and to train the reconstruction network using the target image as a constraint, and to obtain a sparse CT reconstruction model after the network converges quickly; wherein both the prior network and the reconstruction network are MLP network models;
[0109] A reconstruction module is used to output a reconstructed image using the sparse CT reconstruction model.
[0110] Preferably, the coordinate encoding module includes:
[0111] A coordinate encoding unit, used to encode the coordinates of the prior image using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is:
[0112] γ(c)=[cos(2πBc),sin(2πBc)] T
[0113] Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
[0114] Preferably, in the pre-training module, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is:
[0115]
[0116] Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to the coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
[0117] Preferably, the reconstruction network training module includes:
[0118] Initialize the reconstruction network using the network parameters of the pre-trained priori network to obtain an initialized reconstruction network;
[0119] Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image;
[0120] The predicted reconstructed image is subjected to Radon transformation and the L2 loss between the predicted image and the target image is calculated. The reconstruction network is optimized and trained based on the L2 loss to obtain a sparse CT reconstruction model. The L2 loss is:
[0121]
[0122] Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
[0123] An embodiment of the present invention further provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are respectively connected via the bus. When the computer program is executed by the processor, each process of the embodiment of the sparse CT reconstruction method in the above-mentioned assembly anomaly detection is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0124] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each process of the embodiment of the sparse CT reconstruction method in the above-mentioned assembly anomaly detection is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0125] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technical solution that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A sparse CT reconstruction method for assembly anomaly detection, characterized in that: include: Step 1: Perform CT scanning on the assembly structure of the target workpiece to obtain a data set; the data set includes a prior image and a target image; wherein the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions; Step 2: Encode the coordinates of the prior image to obtain encoded coordinates; Step 3: Using the encoded coordinates as input and the grayscale values corresponding to the encoded coordinates as output to train the prior network to obtain a pre-trained prior network; Step 4: Initialize the reconstruction network using the network parameters of the pre-trained prior network, and use the target image as a constraint to train the reconstruction network, and obtain a sparse CT reconstruction model after the network converges quickly; wherein both the prior network and the reconstruction network are MLP network models; Step 5: Use the sparse CT reconstruction model to output a reconstructed image.
2. The sparse CT reconstruction method in assembly anomaly detection according to claim 1, characterized in that: The step 2: encoding the coordinates of the prior image to obtain encoded coordinates, comprises: The coordinates of the prior image are encoded using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is: γ(c)=[cos(2πBc),sin(2πbc)] T Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
3. The sparse CT reconstruction method in assembly anomaly detection according to claim 2, characterized in that: In step 3, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is: Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
4. The sparse CT reconstruction method in assembly anomaly detection according to claim 3, characterized in that: The step 4 comprises: Step 4.1: Initialize the reconstruction network using the network parameters of the pre-trained prior network to obtain the initialized reconstruction network; Step 4.2: Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image; Step 4.3: Calculate the L2 loss between the predicted reconstructed image and the target image after Radon transformation, and optimize and train the reconstruction network based on the L2 loss to obtain a sparse CT reconstruction model; wherein the L2 loss is: Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
5. A sparse CT reconstruction system for assembly anomaly detection, characterized in that: include: A data set acquisition module is used to perform CT scanning on the assembly structure of the target workpiece to acquire a data set; the data set includes a prior image and a target image; wherein the prior image is a complete angle CT projection image under normal assembly conditions and its three-dimensional reconstruction result image; the target image is a sparse angle CT projection image under different degrees of abnormal assembly conditions; A coordinate encoding module, used for encoding the coordinates of the prior image to obtain encoded coordinates; A pre-training module, used for taking the coded coordinates as input and the grayscale values corresponding to the coded coordinates as output to train a priori network to obtain a pre-trained priori network; A reconstruction network training module is used to initialize the reconstruction network using the network parameters of the pre-trained prior network, and to train the reconstruction network using the target image as a constraint, and to obtain a sparse CT reconstruction model after the network converges quickly; wherein both the prior network and the reconstruction network are MLP network models; A reconstruction module is used to output a reconstructed image using the sparse CT reconstruction model.
6. The sparse CT reconstruction system for assembly anomaly detection according to claim 5, characterized in that: The coordinate encoding module comprises: A coordinate encoding unit, used to encode the coordinates of the prior image using Fourier feature mapping to obtain encoded coordinates; wherein the Fourier feature mapping is: γ(c)=[cos(2πBc),sin(2πBc)] T Among them, c represents the coordinates of the prior image, B represents the coefficients of Fourier feature transform, and γ(c) represents the encoding coordinates.
7. The sparse CT reconstruction system for assembly anomaly detection according to claim 6, characterized in that: In the pre-training module, the prior network is an eight-layer MLP network with a width of 256 neural nodes, and the objective function when training the prior network is: Where N represents the number of pixels in the prior image, i represents the index of coordinate i in the image space field, Represents the grayscale value corresponding to coordinate i predicted by the network, Represents the grayscale value corresponding to the prior image at coordinate i.
8. The sparse CT reconstruction system for assembly anomaly detection according to claim 7, characterized in that: In the reconstruction network training module, it includes: Initialize the reconstruction network using the network parameters of the pre-trained priori network to obtain an initialized reconstruction network; Input the coordinate information into the initialized reconstruction network and output the predicted reconstructed image; The predicted reconstructed image is subjected to Radon transformation and the L2 loss between the predicted image and the target image is calculated. The reconstruction network is optimized and trained based on the L2 loss to obtain a sparse CT reconstruction model. The L2 loss is: Among them, θ * represents the optimization parameters of the network, A represents the forward model Radon transform, and y represents the target image.
9. An electronic device, comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, wherein: When the computer program is executed by the processor, the steps of the sparse CT reconstruction method for assembly abnormality detection according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the sparse CT reconstruction method for assembly abnormality detection according to any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Three-dimensional CT imaging method and device, electronic equipment and storage medium
CN119784931A
