DDPM-based CT image metal artifact elimination method

By using a diffusion probability model based on DDPM to progressively reverse diffuse in the sinusoidal domain to repair metal artifacts, and combining this with metal mask information, the problem of generalization ability of metal artifacts in CT images is solved, achieving efficient and robust image reconstruction and quality improvement.

CN121639869APending Publication Date: 2026-03-10SHANGHAI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-21
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively improve image quality when dealing with metal artifacts in CT images, especially in cases of complex metal geometries or severe artifacts. Furthermore, deep learning methods have limited generalization ability for the distribution of metal objects.

Method used

The method based on diffusion probability model (DDPM) is adopted. In the sinusoidal domain, the unconditional diffusion model is trained to gradually backdiffusion repair the metal artifact region. The repair is combined with metal mask information to generate a high-fidelity sinusoidal graph. Finally, the CT image is reconstructed by filtering back projection algorithm.

Benefits of technology

It significantly improves the diagnostic quality and robustness of CT images, is applicable to various metal geometries and complex artifact scenarios, avoids dependence on prior information about specific metal morphologies, and provides an end-to-end artifact elimination solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121639869A_ABST
    Figure CN121639869A_ABST
Patent Text Reader

Abstract

The invention discloses a DDPM-based CT image metal artifact elimination method, and aims to solve the artifact problem caused by a metal object in an existing CT image and improve image quality and diagnosis reliability. A diffusion model of unconditional training is adopted, step-by-step back diffusion repair of an artifact area is carried out in a sinogram domain, an unrepaired area is dynamically adjusted by combining with a metal mask, accurate repair of the artifact area is achieved, and original data of the area which is not affected by artifacts are kept. In the training stage of the system, artifact-free data are gradually converted into standard Gaussian noise through forward diffusion; in the inference stage, data are gradually recovered by utilizing back diffusion, block repair is carried out on an artifact region by combining with a metal mask, and a complete sinogram is generated through region merging. And finally, reconstructing a CT image by using a filtered back projection algorithm, and optimizing boundary transition through a smoothing algorithm to ensure seamless connection between the metal object and surrounding tissues.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of industrial CT and artificial intelligence, and in particular to a method for eliminating metal artifacts in CT images based on DDPM. Background Technology

[0002] CT (Computed Tomography) is an essential tool in modern medical imaging, widely used in clinical diagnosis and treatment planning. However, when metallic objects (such as dental fillings, artificial joints, or surgical metal implants) are present in the scanned area, metal artifacts can severely affect the quality of CT images. Artifacts typically appear as bright or dark bands in the image, which not only reduces diagnostic reliability but can also affect accurate radiotherapy planning.

[0003] Traditional metal artifact removal (MAR) methods, such as interpolation correction, normalized metal artifact removal (NMAR), and iterative reconstruction techniques based on physical effects, while improving image quality to some extent, still have significant limitations in cases with severe artifacts or complex metal geometries. Furthermore, the rise of deep learning methods has opened up new possibilities for MAR, including artifact correction techniques based on convolutional neural networks (CNNs) and generative adversarial networks (GANs). However, these methods typically require large amounts of labeled data, and their generalization ability may be limited by the distribution of metal objects in the training set.

[0004] This system proposes a CT metal artifact removal method based on DDPM (Discrete Disk Masking). Artifact correction is achieved by filling in the missing data due to metal occlusion in the sinusoidal domain. This method does not rely on prior information about the metal object; it only uses metal masking information during the inference process, thereby improving its generalization ability to different metal shapes and locations. Summary of the Invention

[0005] This invention discloses a method for eliminating metal artifacts in CT images based on the Denoising Diffusion Probabilistic Model (DDPM), aiming to solve the problem that metal artifacts seriously affect the quality of CT images in the prior art, and to provide an efficient, robust and widely applicable artifact correction scheme.

[0006] The method for eliminating metal artifacts in CT images based on DDPM includes the following steps:

[0007] (1) Sine curve data generation and preprocessing: Input CT image, generate sine curve containing metal occlusion area through physical model, and generate preliminary repair sine curve through normalization and interpolation method. At the same time, generate metal mask to mark artifact area.

[0008] (2) Unconditional diffusion model training: DDPM is used to model the projection data without metal artifacts during the training process, and learn the underlying distribution characteristics of the sine curve. The model generates a high-fidelity sine curve through a multi-step diffusion process without relying on metal prior information.

[0009] (3) Stepwise reverse diffusion repair: During the inference stage, the artifact region is gradually repaired by reverse diffusion through metal mask restriction. In each diffusion step, the model prediction is updated by combining the data of the unaffected region to gradually generate a complete sine curve.

[0010] (4) Image reconstruction and metal embedding: The image reconstruction of the repaired sine wave is performed using a filtered back projection algorithm. At the same time, the metal object is re-embedded. The edge area is adjusted by a smoothing algorithm to ensure that the metal object and the surrounding tissue transition naturally, thereby further improving the image quality.

[0011] (5) Quality assessment and optimization: Provides performance assessment tools based on structural similarity (SSIM), peak signal-to-noise ratio (PSNR) and mean square error (RMSE), while supporting dataset expansion and model parameter optimization to adapt to different clinical application scenarios.

[0012] As a preferred embodiment, the diffusion model training in step (2) adopts an unconditional training method. During the training process, the model does not rely on metal mask information, but only models the sine wave data without artifacts, learns its underlying distribution characteristics, and combines metal mask constraints in the inference stage to repair artifact regions, thereby improving the generalization ability of the model. It is applicable to various metal geometries and complex artifact scenes, and specifically includes the following sub-steps:

[0013] (11) Forward diffusion process: During the training phase, noise is gradually injected into the sinusoidal data S0 without metal artifacts to simulate the forward diffusion process. Through multiple iterations, the input data is gradually transformed into standard Gaussian noise S. T ;

[0014] (12) Back diffusion process: The model learns the back diffusion distribution and gradually restores the noise to the original data S0;

[0015] (13) Noise Prediction and Model Optimization: Steps (11) to (12) are the diffusion model training and inference process. The goal of the model is to predict the noise value ∈ at each step. θ (S t ,t), is optimized by minimizing the following loss function;

[0016] (14) The training process is based on the enhanced U-Net architecture. Multi-scale features are extracted through multi-layer residual blocks of the encoder and decoder. A self-attention mechanism is introduced in the intermediate layer to improve the model’s ability to model long-distance dependencies. The Time Embedding module is used to capture diffusion time step information and control model behavior.

[0017] In a preferred embodiment, the forward diffusion process in step (11) involves progressively injecting noise into the sinusoidal data S0 without metal artifacts during the training phase to simulate the forward diffusion process. The data at each time step t is generated using the following formula:

[0018]

[0019] Where, β t The noise intensity at each step is represented by N, which represents a Gaussian distribution. Through multiple iterations, the input data is gradually transformed into standard Gaussian noise S. t ;

[0020] Furthermore, the following formula can be used to directly generate data at a specific time step t from the initial sine curve, avoiding iterative calculations:

[0021]

[0022] in,

[0023] In a preferred embodiment, in the back diffusion process of step (12), the model learns the back diffusion distribution to gradually restore the noise to the original data S0. The distribution formula for each back diffusion step is:

[0024]

[0025] Wherein, mean μ θ Predicted by the model and calculated according to the following formula:

[0026]

[0027] variance ∑ θ Controlled by learnable parameters.

[0028] In a preferred embodiment, the noise prediction and model optimization in step (13) aim to predict the noise value ∈ at each step. θ (S t The loss function (t) is optimized by minimizing the following loss function:

[0029]

[0030] Where ∈ represents Gaussian noise during the forward diffusion process. To further improve model performance, a hybrid loss function is defined by combining variational lower bound (VLB) loss and simple loss:

[0031] L hybrid =L simple +λL vlb

[0032] Among them, L vlb Optimize the KL divergence of the backdiffusion process, where λ is the weighting parameter.

[0033] In a preferred embodiment, the metal mask repair process in step (3) specifically includes the following sub-steps:

[0034] (31) Generation of metal mask: A metal mask MM is generated based on the sinusoidal domain to mark the areas where data is missing due to metal occlusion;

[0035] (32) Stepwise reverse diffusion repair: The repair process is completed by stepwise reverse diffusion through a diffusion model, and the sinusoidal region is divided into blocks by a metal mask.

[0036] (33) Region merging: Merge the repair results of unaffected regions and artifact regions to generate a complete sine curve S. t-1 This process is repeated in each diffusion step t until the final repaired sine curve S0 is generated.

[0037] (34) Stepwise sampling and remasking: In each back-diffusion step, the scaling parameter β is used. i By controlling the proportion of predicted tokens and repeatedly spreading the algorithm, all tokens in the artifact region are gradually repaired.

[0038] As a preferred embodiment, in step (31), the generation of the metal mask is carried out during the inference stage. The metal mask MM is generated based on the sinusoidal domain to mark the areas where data is missing due to metal occlusion. M=1: the area not affected by metal artifacts; M=0: the area affected by metal artifacts. This mask is used to guide the repair process of the diffusion model to ensure that only the artifact areas are inferred, while the unaffected areas retain the original data.

[0039] In a preferred embodiment, the step-by-step reverse diffusion repair in step (32) is completed by gradually reverse diffusion using a diffusion model, combined with a metal mask to segment the sine wave region.

[0040] For regions unaffected by artifacts (M=1), data is extracted directly from the initial sine wave data S0, and noise is added to match the state at diffusion step t:

[0041]

[0042] The artifact-affected area (M=0) is used to generate repair data from the model prediction using the backdiffusion formula:

[0043]

[0044] Where μ θ (S t ,t) is the mean predicted by the model, and its formula is as follows:

[0045]

[0046] In a preferred embodiment, the region merging in step (33) combines the repair results of the unaffected region and the artifact region to generate a complete sine curve S. t-1 :

[0047]

[0048] This process is repeated in each diffusion step t until the final repaired sine curve S0 is generated.

[0049] In a preferred embodiment, the stepwise sampling and remasking in step (34) uses a scaling parameter β in each backdiffusion step. i Control the proportion of predicted tokens, specifically as follows:

[0050] (341) The tokens from the prediction part are retained as input for the next step;

[0051] (342) After the unpredicted tokens are remasked, reverse diffusion is performed again. The above two steps are repeated to gradually repair all tokens in the artifact area.

[0052] Beneficial effects: The DDPM-based method for eliminating metal artifacts in CT images employs an unconditionally trained diffusion model to repair metal artifact regions in the sinusoidal domain. It generates true projection data through progressive back diffusion, avoiding reliance on prior information about specific metal morphologies. Then, during inference, it combines data from the metal mask and unaffected areas to accurately predict missing projection data in a progressive repair manner. Ultimately, it provides an end-to-end solution, from metal artifact detection and projection data repair to the final reconstruction and optimization of CT images, significantly improving the diagnostic quality and robustness of CT images. Attached Figure Description

[0053] Figure 1 This is a flowchart of the training process for the DDPM-based CT image metal artifact elimination diffusion model of the present invention.

[0054] Figure 2 This invention is a flowchart of CT image metal mask repair based on DDPM. Detailed Implementation

[0055] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings: These embodiments are implemented based on the technical solution of the present invention, and provide detailed implementation methods and specific operation processes, but the protection scope of the present invention is not limited to the following embodiments.

[0056] The DDPM-based method for eliminating metal artifacts in CT images employs an unconditionally trained diffusion model to repair metal artifact regions in the sinusoidal domain. It generates true projection data through progressive backdiffusion, avoiding reliance on prior information about specific metal morphologies. Then, during inference, it combines data from the metal mask and unaffected areas to accurately predict missing projection data in a progressive repair manner. Ultimately, it provides an end-to-end solution, from metal artifact detection and projection data repair to the final reconstruction and optimization of CT images, significantly improving the diagnostic quality and robustness of CT images.

[0057] The method for eliminating metal artifacts in CT images based on DDPM includes the following steps:

[0058] (1) Sine curve data generation and preprocessing: Input CT image, generate sine curve containing metal occlusion area through physical model, and generate preliminary repair sine curve through normalization and interpolation method. At the same time, generate metal mask to mark artifact area.

[0059] (2) Unconditional diffusion model training: DDPM is used to model the projection data without metal artifacts during the training process, and learn the underlying distribution characteristics of the sine curve. The model generates a high-fidelity sine curve through a multi-step diffusion process without relying on metal prior information.

[0060] (3) Stepwise reverse diffusion repair: During the inference stage, the artifact region is gradually repaired by reverse diffusion through metal mask restriction. In each diffusion step, the model prediction is updated by combining the data of the unaffected region to gradually generate a complete sine curve.

[0061] (4) Image reconstruction and metal embedding: The image is reconstructed by using a filtered back projection algorithm and the metal object is re-embedded. The edge area is adjusted by a smoothing algorithm to ensure that the metal object and the surrounding tissue transition naturally, thereby further improving the image quality.

[0062] (5) Quality assessment and optimization: Provides performance assessment tools based on structural similarity (SSIM), peak signal-to-noise ratio (PSNR) and mean square error (RMSE), while supporting dataset expansion and model parameter optimization to adapt to different clinical application scenarios.

[0063] like Figure 1 The image shown is a training diagram of a CT image metal artifact elimination diffusion model based on DDPM. Its key feature is the use of an unconditional training method. During training, the model does not rely on metal mask information, but only models the artifact-free sine wave data, learning its underlying distribution characteristics. In the inference phase, metal mask constraints are incorporated to repair artifact regions, thereby improving the model's generalization ability and making it suitable for various metal geometries and complex artifact scenarios.

[0064] Forward diffusion process: During the training phase, progressive noise injection is performed on the sinusoidal data S0 without metal artifacts to simulate the forward diffusion process. The data at each time step t is generated using the following formula:

[0065]

[0066] Where, β t Let S represent the noise intensity at each step, and N represent a Gaussian distribution. Through multiple iterations, the input data is gradually transformed into standard Gaussian noise S. t .

[0067] Furthermore, the following formula can be used to directly generate data at a specific time step t from the initial sine curve, avoiding iterative calculations:

[0068]

[0069] in,

[0070] Backdiffusion process: The model learns the backdiffusion distribution to gradually restore the noise to the original data S0. The distribution formula for each backdiffusion step is:

[0071]

[0072] Wherein, mean μ θ Predicted by the model and calculated according to the following formula:

[0073]

[0074] Variance Σ θ Controlled by learnable parameters.

[0075] Noise prediction and model optimization: The goal of the model is to predict the noise value at each step. θ (S t The loss function (t) is optimized by minimizing the following loss function:

[0076]

[0077] Where ∈ represents Gaussian noise during the forward diffusion process. To further improve model performance, a hybrid loss function is defined by combining the Variational Lower Bound (VLB) loss and the simple loss:

[0078] L hybrid =L simple +λL vlb

[0079] Among them, L vlb Optimize the KL divergence of the backdiffusion process, where λ is the weighting parameter.

[0080] Specifically, during training, simulated artifact-free sine wave data was used, with the parameters set as follows: diffusion steps T = 1000 and noise intensity β. t The learning rate increases linearly over time, and the optimizer used is the Adam optimizer with a learning rate of 0.0002.

[0081] The CT image metal mask restoration process based on DDPM is as follows: Figure 2 As shown, the main steps include the following:

[0082] Metal mask generation: During the inference phase, a metal mask MM is generated based on the sinusoidal domain to mark regions where data is missing due to metal occlusion. M=1: Regions unaffected by metal artifacts; M=0: Regions affected by metal artifacts. This mask guides the repair process of the diffusion model, ensuring that inference is performed only on artifact-affected regions, while unaffected regions retain their original data.

[0083] Stepwise reverse diffusion repair: The repair process is completed by gradually reverse diffusion through a diffusion model, combined with a metal mask to divide the sine wave region into blocks.

[0084] For regions unaffected by artifacts (M=1), data is extracted directly from the initial sine wave data S0, and noise is added to match the state at diffusion step t:

[0085]

[0086] The artifact-affected area (M=0) is used to generate repair data from the model prediction using the backdiffusion formula:

[0087]

[0088] Where μ θ (S t ,t) is the mean predicted by the model, and its formula is as follows:

[0089]

[0090] Region merging: Merges the restoration results of unaffected regions and artifact regions to generate a complete sine curve S. t-1 :

[0091]

[0092] This process is repeated in each diffusion step t until the final repaired sine curve S0 is generated.

[0093] Stepwise sampling and remasking: In each back-diffusion step, the scaling parameter β is used. i Controlling the proportion of predicted tokens:

[0094] 1. The tokens from the prediction portion are retained as input for the next step.

[0095] 2. After remasking the unpredicted tokens, reverse diffusion is performed again. Repeat the above two steps to gradually repair all tokens in the artifact area.

[0096] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A method for metal artifact reduction in CT images based on DDPM, characterized in that, Specifically comprising the following steps: (1) Sinogram data generation and preprocessing: input the CT image, generate the sinogram containing the metal occluded area through the physical model, and generate the preliminary repaired sinogram through the normalization and interpolation method, while generating the metal mask for marking the artifact area; (2) Unconditional diffusion model training: using DDPM to model the projection data without metal artifacts in the training process, learning the underlying distribution characteristics of the sinogram, and generating a sinogram with high fidelity through a multi-step diffusion process without relying on metal prior information; (3) Step-by-step reverse diffusion repair: in the inference stage, the metal mask is used to limit the step-by-step reverse diffusion repair of the artifact area, and in each diffusion step, the model prediction is updated combined with the data of the area not affected by the artifact, to gradually generate a complete sinogram; (4) Image reconstruction and metal embedding: using the filtered back-projection algorithm to reconstruct the repaired sinogram into an image, and re-embedding the metal object, adjusting the edge area through a smoothing algorithm to ensure a natural transition between the metal object and the surrounding tissue, and further improving the image quality; (5) Quality evaluation and optimization: providing performance evaluation tools based on structural similarity (SSIM), peak signal-to-noise ratio (PSNR), and mean square error (RMSE), while supporting dataset expansion and model parameter optimization to adapt to different clinical application scenarios.

2. The DDPM based CT image metal artifact removal method of claim 1, wherein, The diffusion model training in step (2) uses an unconditional training method, and the model does not rely on metal mask information during training, only models the sinogram data without artifacts, and learns its underlying distribution characteristics, In the inference stage, the metal mask is used to constrain the repair of the artifact area, thereby improving the generalization ability of the model, which is suitable for various metal geometries and complex artifact scenarios, and specifically comprising the following sub-steps: (11) Forward diffusion process: In the training stage, step noise injection is performed on the metal artifact free sinogram data S0 to simulate the forward diffusion process. Through multiple iterations, the input data is gradually transformed into standard Gaussian noise S T ; (12) Reverse diffusion process: the model learns the reverse diffusion distribution to gradually restore the noise to the original data S0; (13) Noise prediction and model optimization: The diffusion model training inference process from steps (11) - (12), the goal of the model is to predict the noise value ∈ for each step θ (S t , t), optimized by minimizing the following loss function; (14) The training process is based on an enhanced U-Net architecture, which uses multiple residual blocks in the encoder and decoder to extract multi-scale features, introduces a self-attention mechanism in the middle layer to improve the model's ability to model long-distance dependencies, and uses a Time Embedding module to capture diffusion time step information and control model behavior.

3. The DDPM based CT image metal artifact removal method of claim 2, wherein, The forward diffusion process in step (11) gradually injects noise into the sinogram data S0 without metal artifacts in the training stage, simulating the forward diffusion process, and the data at each time step t is generated by the following formula: where β t represents the noise strength of each step, N represents a Gaussian distribution, and through multiple iterations, the input data is gradually transformed into standard Gaussian noise S t ; In addition, the data at a certain time step t is directly generated from the initial sinogram by the following formula, avoiding step-by-step iterative calculation: wherein, 4. The DDPM based CT image metal artifact removal method of claim 2, wherein, The reverse diffusion process in step (12) uses the model to learn the reverse diffusion distribution to gradually restore the noise to the original data S, and the distribution formula for each reverse diffusion step is: where the mean μ θ Predicted by the model and calculated according to the following formula: variance θ controlled by learnable parameters.

5. The DDPM based CT image metal artifact removal method of claim 2, wherein, The noise prediction in the step (13) and the model optimization, the goal of the model is to predict the noise value ∈ of each step θ (S t , t) is optimized by minimizing the following loss function: Where ∈ is the Gaussian noise in the forward diffusion process, and to further improve the model performance, a hybrid loss function is defined by combining the Variational Lower Bound (VLB) loss and the simple loss: L hybrid = L simple + λL vlb where L vlb KL divergence of the reverse diffusion process is optimized, and λ is a weight parameter.

6. The DDPM based CT image metal artifact removal method of claim 1, wherein, The metal mask repair process in step (3) specifically includes the following sub-steps: (31) Metal mask generation: generate a metal mask MM based on the sinogram domain, marking the areas where data is missing due to metal obstruction; (32) Step-by-step back-diffusion repair: the repair process is completed through a diffusion model, and the sinogram area is processed in blocks combined with the metal mask; (33) Region merging: merging the un-affected region and the repair result of the artifact region to generate a complete sinogram S t-1 is repeated in each diffusion step t until a final repaired sinogram So is generated; (34) Stepwise sampling and re-masking: In each step of the back-propagation, a scaling parameter β is used i Controlling the predicted Token ratio, after multiple iterations of diffusion, all Tokens in the artifact region are gradually repaired.

7. The DDPM based CT image metal artifact removal method of claim 6, wherein, In step (31), the metal mask generation, in the reasoning phase, a metal mask MM is generated based on the sinogram domain, marking the areas where data is missing due to metal obstruction, M=1: areas not affected by metal artifacts; M=0: areas affected by metal artifacts, this mask is used to guide the repair process of the diffusion model, ensuring that only the artifact area is inferred, and the unaffected area remains the original data unchanged.

8. The DDPM based CT image metal artifact removal method of claim 6, wherein, In step (32), the step-by-step back-diffusion repair, the repair process is completed through a diffusion model, and the sinogram area is processed in blocks combined with the metal mask, For areas not affected by artifacts (M=1), directly extract from the initial sinogram data S0 and add noise to match the state of diffusion step t: Artifact-affected areas (M=0), generate repair data from model prediction through the back-diffusion formula: where μ θ (S t t) is the mean value predicted by the model, which is given by the formula:

9. The DDPM based CT image metal artifact removal method of claim 6, wherein, The region merging in the step (33) combines the repair results of the region not affected by the artifact and the artifact region to generate a complete sinogram S t-1 : This process is repeated at each diffusion step t until the final repaired sinogram S0 is generated.

10. The DDPM based CT image metal artifact removal method of claim 6, wherein, The step-by-step sampling in the step (34) and the re-mask, in each back diffusion step, adopts a proportion parameter β i Controlling the predicted Token proportion, specifically: (341) Token reservation of the prediction part as input for the next step; (342) Re-mask the unfinished predicted Token and perform back-diffusion again, repeat the above two steps to gradually repair all Tokens in the artifact area.

Citation Information

Cited By

  • A high-resolution limited-angle CT reconstruction method based on block-wise conditional diffusion and dynamic regularization correction

    CN122199743A