Enhanced CT image generation method and device based on mixed loss function diffusion model
By introducing a hybrid loss function into the diffusion model and combining multiple loss functions to optimize parameters, the limitations of the diffusion model caused by a single loss function are solved, and more accurate and stable medical imaging generation is achieved, especially in the transition from plain CT to contrast imaging. Agent-enhanced CT images are being converted.
Patent Information
- Application Number
- CN202410816691.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Existing diffusion models have limitations in medical imaging generation tasks, especially due to the inductive bias problem caused by a single loss function, which makes it difficult to effectively complete the image generation task, often causing mode collapse and training dynamic instability.
A diffusion model based on a hybrid loss function is adopted. By combining the pixel-level contrast loss function, structural similarity index loss function and perceptual loss function, a hybrid loss function is constructed to optimize the diffusion model parameters and achieve the generation of contrast agent-enhanced CT images.
It improves the diffusion model's ability to perceive different features, stabilizes training dynamics, improves the accuracy and quality of image generation, reduces the problem of poor generalization ability, and achieves high-definition from plain CT imaging to contrast agent-enhanced CT imaging. Image generation.
Smart Images

Figure CN118379208B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CT image generation, and in particular to a method and device for generating enhanced CT images based on a mixed loss function diffusion model. Background Art
[0002] With the continuous development of medical imaging technology, the application of computed tomography (CT) in the medical field is becoming more and more extensive, covering important areas of life and health such as medical clinical diagnosis, surgical auxiliary examination and health monitoring. Although CT medical images have made significant progress and applications, there are still some challenges in the actual diagnosis process, especially the small difference in the development of some lesions and normal tissues in the image, which makes it difficult to accurately diagnose some diseases in time. In order to improve the diagnostic accuracy of images, enhanced contrast agents have been widely used in medical CT imaging, which can make the signal contrast between normal tissues and local lesions more obvious, helping doctors to diagnose patients' conditions more accurately. However, the high price and potential side effects of enhanced contrast agents have also become an issue that cannot be ignored, which has imposed a heavy burden on patients' bodies and finances.
[0003] At present, the contrast agents on the market are mainly divided into ionic contrast agents and non-ionic contrast agents. Ionic contrast agents will dissociate into a large number of anions and cations in aqueous solution, and have the characteristics of high permeability, high ionicity and weak hydrophilicity, so they may cause some side effects in patients, such as increased pulmonary artery pressure, decreased pulmonary blood volume, kidney damage, etc. Although non-ionic contrast agents have removed carboxyl groups and cations in their structure and have strong hydrophilicity, they may still cause serious side effects such as electrolyte disorders and osmotic water loss due to their low osmotic pressure. Therefore, how to remove the side effects of contrast agents during their application has become an urgent problem to be solved. In addition, whether it is ionic contrast agents or non-ionic contrast agents, they have high costs in preparation, research and development, and production, and their high prices will bring heavy economic burdens to patients.
[0004] Based on conventional CT medical imaging, realizing the image generation between conventional CT medical imaging and contrast-enhanced CT medical imaging can not only completely avoid the adverse effects of contrast-enhanced contrast agents on patients and the heavy economic burden, but also significantly improve the image signal contrast of conventional CT medical imaging, thereby more clearly highlighting the patient's lesion area. Therefore, proposing a reliable contrast-enhanced CT medical imaging generation method is of great significance for reducing the morbidity and mortality of contrast-enhanced CT medical imaging related side effects and diseases in my country.
[0005] The research and application of deep learning in the field of medical image synthesis is an important direction that has attracted much attention in the field of artificial intelligence (AI). Deep learning methods, especially variational autoencoders (VAE), generative adversarial networks (GAN), and diffusion models are used to generate high-quality medical images. The generative model of deep learning can learn and generate medical images with realistic structures, expand medical image datasets, and improve model performance. In addition, deep learning can be applied to the enhancement of medical images to improve blurred, noisy, or low-contrast images. The application of deep learning in medical imaging data enhancement has brought innovation to the medical field by generating synthetic images to expand datasets and improve the generalization performance of deep learning models.
[0006] Among them, the diffusion model is a hidden variable generative model based on Markov chains, which has attracted widespread attention in the field of medical imaging. The model is trained by predicting the noise added to each time slice. Compared with traditional variational autoencoders and generative adversarial models, the diffusion model shows significant advantages in generating high-quality images, thanks to its algorithm design inspired by non-equilibrium thermodynamics, which allows the quality of image generation to be improved by setting conditional Gaussians. Compared with other deep learning methods, the diffusion model is computationally scalable, can flexibly adapt to different hardware resources and scales, and has the ability of parallel processing. Therefore, the generation of contrast-enhanced CT medical imaging based on the diffusion model has become a research hotspot in the current field. However, the existing diffusion models have some limitations. They can only find the target features of the image synthesis task in a restricted hidden feature space. This is mainly because the existing diffusion models usually rely on only a single loss function, and the single loss function itself has the problem of inductive bias, which limits the hidden feature space observed and learned by the model. In particular, in the image generation task, especially in the synthesis task from plain CT images to contrast-enhanced CT images, there is an extremely complex solution space. This makes it difficult for existing diffusion model methods based on a single loss function to effectively complete image generation tasks, and often leads to problems such as mode collapse and training dynamic instability. Therefore, there is an urgent need for a diffusion model method that integrates multiple loss functions to effectively address the limitations of existing diffusion models in medical imaging generation tasks, and to help achieve more accurate and stable medical imaging generation tasks.
[0007] This application proposes for the first time an innovative method and device for a diffusion model based on a mixed loss function, aiming to generate enhanced CT images. Summary of the invention
[0008] The purpose of the present invention is to provide a method and device for generating enhanced CT images based on a mixed loss function diffusion model in view of the deficiencies in the prior art.
[0009] The objective of the present invention is achieved through the following technical solutions: In a first aspect, an embodiment of the present invention provides a method for generating an enhanced CT image based on a mixed loss function diffusion model, comprising the following steps:
[0010] (1) Collect CT image data and its paired contrast-enhanced CT image data, and preprocess them using data enhancement methods and data-oriented regularization methods;
[0011] (2) Dividing the preprocessed CT image data and its paired contrast-enhanced CT image data into a training set, a test set, and a validation set in proportion;
[0012] (3) Constructing a diffusion model for generating contrast-enhanced CT images;
[0013] (4) Iteratively train the diffusion model using the training set. During the training process, adjust the parameters of the diffusion model based on the mixed loss function to obtain a trained diffusion model.
[0014] (5) The CT image data in the test set is input into the trained diffusion model to obtain the corresponding contrast agent enhanced CT image data.
[0015] Furthermore, the data enhancement method and the data-oriented regularization method are used to pre-process the data, specifically including:
[0016] Firstly, the geometric transformation method is used to randomly flip, rotate, translate, crop and scale the collected CT image data and its paired contrast-enhanced CT image data. Then, the color perturbation method is used to change the channel order, hue and contrast of the CT image data and its paired contrast-enhanced CT image data to obtain the data-enhanced CT image data and its paired contrast-enhanced CT image data. Finally, the data-oriented regularization method is used to add random noise, perform random occlusion and sample batch regularization to the data-enhanced CT image data and its paired contrast-enhanced CT image data to complete the preprocessing of the CT image data and its paired contrast-enhanced CT image data.
[0017] Furthermore, the diffusion model used to generate contrast agent enhanced CT images is a linear diffusion model or a nonlinear diffusion model.
[0018] Furthermore, the diffusion model used to generate contrast-enhanced CT images is a nonlinear diffusion model; the nonlinear diffusion model is used to model the feature mapping relationship between a CT image and a contrast-enhanced CT image paired therewith, so as to capture the mapping relationship between the CT image and the contrast-enhanced CT image, thereby realizing the generation of contrast-enhanced CT images.
[0019] Further, the nonlinear diffusion model includes an encoder, a hidden layer and a decoder;
[0020] The nonlinear diffusion model includes a diffusion process and a reverse diffusion process;
[0021] In the diffusion process, the original CT image data is input into the nonlinear diffusion model, and after passing through the encoder and hidden layer in sequence, a Gaussian noise sample is generated at time point t. After passing through the decoder, the Gaussian noise sample is added to the original CT image to obtain a CT image with Gaussian noise. This process is completed by iteratively repeating the noise image sequence, and each iteration superimposes part of the Gaussian noise on the original CT image.
[0022] The inverse diffusion process is completely opposite to the diffusion process. In the inverse diffusion process, the CT image data with Gaussian noise obtained in the last iteration of the diffusion process is input into the nonlinear diffusion model, and the denoising operation is gradually performed through the decoder, hidden layer and encoder in sequence to restore the CT image at each time point. After multiple iterations, the contrast agent enhanced CT image data is output.
[0023] Furthermore, the use of the training set to iteratively train the diffusion model, during which the parameters of the diffusion model are adjusted based on the mixed loss function to obtain a trained diffusion model, specifically includes:
[0024] The CT image data in the training set is input into the linear / nonlinear diffusion model, and the generated contrast-enhanced CT image data is output; the mixed loss function value is calculated according to the contrast-enhanced CT image data paired with the CT image data in the training set and the generated contrast-enhanced CT image data; the parameters of the linear / nonlinear diffusion model are optimized and adjusted by using the back propagation method and the gradient descent method with the minimization of the mixed loss function value as the optimization goal; the above iterative training process is continuously repeated until the preset number of iterative training times is reached or the mixed loss function value converges, thereby obtaining a trained linear / nonlinear diffusion model.
[0025] Furthermore, the hybrid loss function specifically includes:
[0026] The pixel-level contrast loss function, structural similarity index loss function and perceptual loss function are used as components of the hybrid loss function. By weighted combination of different types of loss functions, the hybrid loss function of the linear / nonlinear diffusion model is obtained, and its expression is:
[0027]
[0028] In the formula, represents the hybrid loss function of the linear / nonlinear diffusion model, represents the pixel-level contrast loss function, represents the structural similarity index loss function, represents the perceptual loss function, , and They represent the weights of the pixel-level contrast loss function, the structural similarity index loss function, and the perceptual loss function, respectively.
[0029] Furthermore, the expression of the pixel-level contrast loss function is:
[0030]
[0031] Where N is the total number of pixels in the image, is the value of the i-th pixel in the generated image, is the value of the target image at the i-th pixel;
[0032] The expression of the structural similarity index loss function is:
[0033]
[0034] In the formula, and They are x and The average value of and They are x and The variance of is x and The covariance of and is a constant used for stability;
[0035] The expression of the perceptual loss function is:
[0036]
[0037] In the formula, is the first l The feature map of the layer, It is l Dimensions of the layer feature map.
[0038] A second aspect of an embodiment of the present invention provides an enhanced CT image generation device based on a mixed loss function diffusion model, comprising one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned enhanced CT image generation method based on the mixed loss function diffusion model.
[0039] A third aspect of an embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, is used to implement the above-mentioned method for generating enhanced CT images based on a mixed loss function diffusion model.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] (1) The present invention uses the image synthesis technology of the deep learning diffusion model to convert plain scan CT imaging into contrast-enhanced CT imaging, which can reduce the risk of iatrogenic injury that patients may face due to contrast agents, further reduce the economic burden of patients, improve their quality of life, and help reduce or even avoid the burden of contrast agents on patients' bodies and finances;
[0042] (2) The present invention can successfully realize the generation of high-definition images from plain scan CT imaging to contrast-enhanced CT imaging, and clearly display the lesions that cannot be specifically displayed in plain scan CT imaging, providing doctors with data and imaging support, which helps to make more accurate diagnosis and formulate treatment plans, and improve accuracy;
[0043] (3) Based on the multi-loss function integrated diffusion model, the present invention can realize the image generation task from plain scan CT imaging to contrast-enhanced CT imaging, and can stably migrate and synthesize images from the plain scan CT imaging domain to the contrast-enhanced CT imaging domain to generate clear and reliable contrast-enhanced CT imaging samples;
[0044] (4) The present invention first replaces the original single loss function with a hybrid function form of multiple loss functions. Specifically, by constructing an integrated framework, the features of multiple loss functions can be organically integrated, which can better capture the characteristics of data distribution and improve the diffusion model's perception of different features. Then, an adaptive feature balancing matrix is introduced to quantify the impact of different loss functions on the diffusion model training, so as to more effectively balance these impacts during the training process. This innovative method helps to improve the diffusion model's attention to different features, thereby enhancing the quality of the synthesized image and better balancing the features of different loss functions. Finally, it not only stabilizes the training dynamics of the diffusion model and improves the training efficiency, but also prompts the diffusion model to capture data features more comprehensively, significantly reducing the possibility of the inherent poor generalization problem of the diffusion model, and providing strong support for the further development of contrast agent enhanced CT imaging. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of the enhanced CT image generation method based on the mixed loss function diffusion model of the present invention;
[0046] Figure 2 It is a framework diagram of the nonlinear diffusion model in the present invention;
[0047] Figure 3 is a structural diagram of a mixed loss function for optimizing a nonlinear diffusion model in the present invention;
[0048] Figure 4 It is the liver contrast agent enhanced CT imaging result image generated in the present invention;
[0049] Figure 5 It is a structural schematic diagram of the enhanced CT image generation device based on the mixed loss function diffusion model of the present invention. DETAILED DESCRIPTION
[0050] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. Obviously, the drawings used in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings without paying creative labor. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present invention.
[0051] The enhanced CT image generation method based on the mixed loss function diffusion model of the present invention specifically comprises the following steps:
[0052] (1) CT image data and its paired contrast-enhanced CT image data are collected and preprocessed using data augmentation methods and data-oriented regularization methods.
[0053] It should be understood that data augmentation (DA) and regularization methods are key methods in deep learning. Using supervised data augmentation methods and data-oriented regularization methods to pre-train the collected image data can improve the generalization ability and performance of the diffusion model. By improving the trainability of the diffusion model and effectively constraining the diffusion model during the diffusion model training process, the diffusion model can be better adapted to different data distributions and scenarios, thereby improving the effect and reliability of the diffusion model in practical applications. Among them, the data augmentation method can transform, distort or add noise to the original data, which helps to expand the scale and diversity of the data set. When the diffusion model is subsequently trained based on the data set, it is beneficial to improve the robustness and generalization ability of the diffusion model. Regularization methods can constrain the diffusion model structure, parameters or loss function, control the complexity of the diffusion model, avoid overfitting of the diffusion model, and help improve the generalization ability of the diffusion model; commonly used regularization methods include L1 regularization, L2 regularization and Dropout, which restrict the learning and training process of the diffusion model to make it more concise and effective.
[0054] For example, more than 3,000 conventional liver CT images and their paired contrast-enhanced CT images from a hospital were collected, specifically including seven types of liver CT images: hepatocellular carcinoma (HCC), intrahepatic cholangiocarcinoma (ICC), hepatic metastasis (MET), focal nodular hyperplasia (FNH), hemangioma (HEM), liver cyst (Liver Cyst), and normal. Among them, hepatocellular carcinoma, intrahepatic cholangiocarcinoma, and liver metastasis are considered malignant tumors, while focal nodular hyperplasia, hemangioma, and liver cyst are considered benign tumors. When collecting image data, more than 1,800 malignant tumor CT image data samples and more than 900 benign tumor CT image data samples were obtained from two centers, including 950 samples of hepatocellular carcinoma patients, about 600 samples of intrahepatic cholangiocarcinoma, about 250 samples of liver metastases, about 300 samples of focal nodular hyperplasia, hepatic hemangioma and liver cyst. At the same time, about 400 healthy and normal liver CT image data samples were also collected.
[0055] In this embodiment, a data enhancement method and a data-oriented regularization method are used to pre-process the data, specifically including: first, a geometric transformation method is used to randomly flip, rotate, translate, crop, and scale the collected CT image data and its paired contrast agent enhanced CT image data, so that image changes at different angles and positions can be simulated, and deformations and distortions of different degrees are introduced. When used to train the diffusion model later, the diffusion model can better adapt to the diverse data in the real world. This comprehensive geometric transformation method can more comprehensively capture the characteristics of liver disease in different postures, provide more abundant learning samples for the diffusion model, and thus improve its generalization ability. Then, a color perturbation method is used to change the channel order, hue, and contrast of the CT image data and its paired contrast agent enhanced CT image data to obtain data-enhanced CT image data and its paired contrast agent enhanced CT image data, so that the color information of the image can be enriched, and the lighting and imaging conditions under different environments can be simulated. This color perturbation method not only helps to improve the robustness of the diffusion model, but also enables the diffusion model to have better adaptability to lighting and color changes, and further enhances the generalization ability of the diffusion model. Finally, a data-oriented regularization method is used to add random noise, perform random occlusion and sample batch regularization to the data-enhanced CT image data and its paired contrast-enhanced CT image data. Random noise can simulate the uncertainty of the real world and enhance the robustness and generalization ability of the diffusion model. Random occlusion can force the diffusion model to learn more local features, reduce the dependence of the diffusion model on certain local information, and promote a comprehensive understanding of the overall image. Sample batch regularization can effectively solve the gradient problem, stabilize the training process of the diffusion model, and improve the convergence speed and generalization performance of the diffusion model.
[0056] It should be understood that data enhancement methods include geometric transformation methods and color perturbation methods. By using geometric transformation methods and color perturbation methods in combination, the diversity of image sample data can be significantly improved, and the quality of image sample data can be improved to enhance the training effect of the diffusion model, so that the diffusion model can better learn the characteristics of liver disease, thereby providing more accurate support for disease diagnosis and treatment. Data-oriented regularization methods can lay a solid foundation for the development of diffusion models and provide reliable guarantees for future applications.
[0057] It should be noted that in this embodiment, the data enhancement method and the data-oriented regularization method are simultaneously applied to the conventional CT image of the liver and the contrast-enhanced CT image paired with it, which can maintain the mapping relationship between the paired images and ensure the consistency and relativity of the two types of images during the image generation process. This preprocessing method is also crucial for the diagnosis and analysis of liver diseases, because conventional CT images and contrast-enhanced CT images provide different information perspectives and reflections of lesions, and can provide more comprehensive and accurate information when combined. Conventional CT images provide basic anatomical structure and tissue density information of the liver, while contrast-enhanced CT images can display more detailed vascular information such as blood flow, tumor perfusion and enhancement. Therefore, the simultaneous application of data enhancement methods and data-oriented regularization methods can ensure the consistency between the two different image modalities, which helps the diffusion model to better understand and utilize these different sources of information. Applying the same data enhancement on paired images simultaneously not only maintains the consistency of paired image data, but also enhances the adaptability of the nonlinear diffusion model to different image modalities. This approach helps improve the clinical application of nonlinear diffusion models, enabling them to produce clearer and more accurate contrast-enhanced CT images, thereby providing more accurate diagnosis of liver diseases and more reliable support for clinical decision-making. Therefore, maintaining the consistency of paired images during data enhancement is one of the key strategies of the present invention and an important means to improve the performance and generalization ability of diffusion models.
[0058] (2) The preprocessed CT image data and its paired contrast-enhanced CT image data are divided into a training set, a test set, and a validation set in proportion.
[0059] Specifically, the preprocessed CT image data and its paired contrast-enhanced CT image data were divided into training set, test set and validation set in a ratio of 6:2:2, which can ensure the verification and evaluation of the diffusion model on different data sets and avoid the overfitting problem. At the same time, all prospective data sets were used as external validation sets to further verify the reliability and generalization ability of the diffusion model. This design simulates the application scenarios of the real world, ensures the robustness and accuracy of the diffusion model when facing new data, reduces the bias introduced by different data sources, and improves the credibility and repeatability of the generated enhanced CT images. Such grouping and design schemes fully consider the diversity and representativeness of image data, and provide a solid foundation for the reliability and generalizability of the generated enhanced CT images. The rigorous training, testing and validation process of the diffusion model based on the training set, test set and validation set can ensure the robustness and effectiveness of the developed diffusion model in different data sets and scenarios, and provide reliable support for further clinical applications.
[0060] It should be understood that the preprocessed CT image data and its paired contrast-enhanced CT image data may also be divided into a training set, a test set, and a validation set in other ratios, such as 7:1:2.
[0061] (3) Construct a diffusion model for generating contrast-enhanced CT images.
[0062] In this embodiment, the diffusion model used to generate a contrast-enhanced CT image is a linear diffusion model or a nonlinear diffusion model. The diffusion model used to generate a contrast-enhanced CT image is preferably a nonlinear diffusion model. The nonlinear diffusion model is used to model the feature mapping relationship between a CT image and a contrast-enhanced CT image paired therewith, so as to capture the mapping relationship between the CT image and the contrast-enhanced CT image, thereby realizing the generation of a contrast-enhanced CT image.
[0063] It should be noted that the diffusion model is a hidden variable generation model based on Markov chains. It generates new data samples by simulating the random evolution process in the data. Based on its diffusion process, the diffusion model can regard data points as random wandering particles. Under the action of random drift and diffusion, they gradually move and diffuse to the entire data space, which enables the diffusion model to capture high-order statistical features and structures in the data and better simulate the dynamic evolution process of the data. The diffusion model shows significant advantages in generating high-quality images. Thanks to the algorithm design inspired by non-equilibrium thermodynamics, the image generation quality can be improved by setting conditional Gaussians; in addition, the diffusion model has scalability and parallel processing capabilities, which can improve the quality and accuracy of generated images and provide more reliable support for medical diagnosis and treatment.
[0064] In addition, compared with the linear diffusion model, the nonlinear diffusion model has several advantages in capturing data distribution characteristics and solving practical problems. First, the nonlinear diffusion model can better adapt to the nonlinear relationships and complex structures in the data, more accurately model the complex relationships between data, and thus better capture the true distribution characteristics of the data. Second, by using nonlinear functions to model complex relationships between data, the nonlinear diffusion model improves the prediction performance, especially when dealing with highly nonlinear data. Third, the nonlinear diffusion model usually has better generalization ability, performs well on new data, is more adaptable to real-world applications, and can better adapt to changes in unknown data. Fourth, the nonlinear diffusion model is applicable to various data types, including structured data, images, text, etc., and has a wide range of applicability. Fifth, due to the ability to better capture the intrinsic structure of the data, the nonlinear diffusion model has a certain robustness to outliers and noise, which improves the robustness and reliability of the nonlinear diffusion model. In summary, the nonlinear diffusion model has better data modeling ability, generalization ability and applicability than the linear model, and is particularly suitable for solving various practical problems and application scenarios, including conventional CT imaging of the liver and contrast-enhanced CT imaging image generation.
[0065] This embodiment aims to use an optimized nonlinear diffusion model to achieve the generation of contrast-enhanced CT images, which can more accurately capture the feature mapping relationship between conventional liver CT images and contrast-enhanced CT images. Compared with traditional diffusion models, the nonlinear diffusion model used to generate contrast-enhanced CT images can more effectively identify and capture complex nonlinear feature mappings between images, achieving more accurate medical image generation. Through this nonlinear diffusion model, conventional CT imaging can be more accurately converted to contrast-enhanced CT imaging, improving the accuracy and reliability of medical imaging diagnosis, and providing more powerful auxiliary diagnostic tools for clinicians in hepatobiliary surgery and gastroenterology. This innovation is expected to improve patients' treatment plans and contribute an important part to the advancement of the field of medical imaging.
[0066] See also Figure 2 The nonlinear diffusion model used to generate contrast-enhanced CT images includes an encoder, a hidden layer, and a decoder. The nonlinear diffusion model includes two key processes: diffusion process and inverse diffusion process, corresponding to Figure 2 The forward process and the reverse process in the nonlinear diffusion model play a vital role in simulating the evolution and recovery of data to achieve data generation and restoration.
[0067] It should be noted that the nonlinear diffusion model has brought new technological breakthroughs in the field of medical image processing by more comprehensively understanding the correlation characteristics between conventional CT images and contrast-enhanced CT images. Figure 2In the architecture shown, the nonlinear diffusion model is the core component responsible for modeling the feature mapping relationship between the two CT images. By learning the nonlinear relationship and complex structure in the data, the nonlinear diffusion model can more accurately capture the mapping relationship between images and achieve more accurate medical image generation. Compared with the traditional linear diffusion model, the nonlinear diffusion model can better adapt to the nonlinear relationship in the data and improve the expression and fitting ability of the nonlinear diffusion model. The application of the nonlinear diffusion model will improve the efficiency and accuracy of medical image processing and provide a more reliable auxiliary means for medical diagnosis and treatment. By more accurately capturing the feature mapping relationship between conventional CT imaging and contrast-enhanced CT imaging of the liver, the model can better synthesize contrast-enhanced CT imaging, help doctors diagnose the disease more accurately, guide the formulation of treatment plans, and improve the quality and efficiency of medical services.
[0068] Furthermore, in the diffusion process, the original CT image data is input into the nonlinear diffusion model, and after passing through the encoder and hidden layer in sequence, a Gaussian noise sample is generated at a specific time point t. After passing through the decoder, the Gaussian noise sample is added to the original CT image to obtain a CT image with Gaussian noise. This process is completed by iteratively repeating the noise image sequence, and each iteration will superimpose a certain degree of Gaussian noise on the original CT image. Specifically, Figure 2 As shown, the original CT image data Input into the nonlinear diffusion model, pass through the encoder, hidden layer and decoder in sequence, and obtain a CT image with Gaussian noise , iterate and transform the CT image with Gaussian noise Input into the nonlinear diffusion model, pass through the encoder, hidden layer and decoder in sequence, and obtain a new CT image with Gaussian noise ... and so on, after multiple iterations, the final CT image with Gaussian noise is obtained. , where T can be set according to actual needs. Therefore, over time, the noise image sequence will continue to evolve, reflecting the diffusion process of data in high-dimensional space, which can be formally expressed as:
[0069]
[0070] Where t is the index of a time step, indicating a specific moment in the diffusion process, and T is the total time deployment of the entire diffusion process. is the noise intensity parameter at time step t, and I is the identity matrix. Indicates that given the initial data In the case of arrive The joint probability distribution of all intermediate states of Represents the state at a given previous time step When the current state The conditional probability distribution of , which is usually parameterized by a neural network.
[0071] It should be noted that one of the advantages of the diffusion process is that it allows sampling from any time t with an analytical solution, which means that the conditional probability that depends on the previous time point can be converted into a conditional probability that depends on the initial value. In other words, through the diffusion process, the image of any time point in the time series can be generated based on the initial image without relying on the specific value of the previous time point. The advantage of this is that the analytical solution can be used to sample from any time t, and the conditional probability can be converted from a conditional probability that depends on the previous time point to a conditional probability that depends on the initial value, thereby simplifying the training and inference process of the nonlinear diffusion model. Therefore, during the training process, the diffusion process is usually fixed and does not require learning parameters, which makes the training of the nonlinear diffusion model more efficient and stable. This means that the diffusion process plays an important role in the nonlinear diffusion model. By simulating the diffusion process of data, it enables the nonlinear diffusion model to generate data with highly complex structures and nonlinear characteristics. At the same time, the advantage of the diffusion process is that it can sample from any time t with an analytical solution, thereby improving the training efficiency and stability of the nonlinear diffusion model and providing stronger support for data generation.
[0072] Furthermore, the inverse diffusion process is completely opposite to the diffusion process. In the inverse diffusion process, the CT image data with Gaussian noise obtained in the last iteration of the diffusion process is input into the nonlinear diffusion model, and the denoising operation is gradually performed through the decoder, hidden layer and encoder in sequence to restore the CT image at each time point. After multiple iterations, the contrast agent enhanced CT image data is output.
[0073] Specifically, the goal of the inverse diffusion process is to restore the CT image at each time point through a step-by-step denoising operation, and after multiple iterations, the original image is restored. The inverse diffusion process is completely opposite to the diffusion process. It gradually improves the clarity and accuracy of the CT image by removing noise. Specifically, the nonlinear diffusion model will gradually remove the noise at each time point through a series of denoising operations, thereby gradually restoring the clarity and accuracy of the image. However, the inverse diffusion process faces a challenge, namely: the conditional probability cannot be directly estimated, because this requires the forward process to be performed on the entire data set; to overcome this problem, a trainable parameter is constructed to approximate the above conditional probability, so that the reverse process can be effectively run. The purpose of the inverse diffusion process is to approximate the conditional probability so that the CT image at the previous time point can be effectively inferred given the CT image at the current time point. The nonlinear diffusion model can learn the statistical characteristics and structure of the data through the inverse diffusion process, gradually remove the noise, and thus achieve the reverse restoration of the CT image. Such an inverse process can effectively restore the noisy image sequence to a clear image sequence step by step, and finally restore the original image, and finally obtain the paired contrast agent enhanced CT image data. In the nonlinear diffusion model, the inverse diffusion process can be formally expressed as:
[0074]
[0075] Where t is the index of a time step, indicating a specific moment in the diffusion process, and T is the total time deployment of the entire diffusion process. is the noise intensity parameter at time step t, and I is the identity matrix. Indicates the model parameters From the noise state, the whole generation process To generate data The joint probability distribution of the entire process is Indicates that given the current state When , the previous state is generated The conditional probability distribution is usually parameterized by a neural network. and are the mean and variance parameterized by the neural network.
[0076] In summary, the nonlinear diffusion model simulates the evolution and recovery of CT image data through the diffusion process and the inverse diffusion process, and realizes the generation and restoration of CT image data. In the field of image processing and generation, this nonlinear diffusion model is widely used, can effectively process complex features and structures, and provides a powerful tool for various application scenarios. In the diffusion process, an image sequence with a complex structure is generated by adding Gaussian noise; the inverse diffusion process restores the clarity of the original image through a noise reduction operation. These two processes complement each other and constitute the core mechanism of the nonlinear diffusion model, which promotes the development of the field of image processing and generation. Therefore, the nonlinear diffusion model has great application potential and is expected to promote the advancement of liver conventional CT and contrast-enhanced CT image generation technology.
[0077] (4) The diffusion model is iteratively trained using the training set. During the training process, the parameters of the diffusion model are adjusted based on the mixed loss function to obtain a trained diffusion model.
[0078] In this embodiment, the diffusion model is iteratively trained using a training set, and the parameters of the diffusion model are adjusted based on the mixed loss function during the training process to obtain a trained diffusion model, specifically including: inputting the CT image data in the training set into the linear / nonlinear diffusion model, and outputting the generated contrast agent enhanced CT image data; calculating the mixed loss function value according to the contrast agent enhanced CT image data paired with the CT image data in the training set and the generated contrast agent enhanced CT image data; taking minimizing the mixed loss function value as the optimization goal, optimizing and adjusting the parameters of the linear / nonlinear diffusion model by using the back propagation method and the gradient descent method; and continuously repeating the above iterative training process until a preset number of iterative training times (such as 1 million times) is reached or the mixed loss function value converges (such as the mixed loss function value no longer decreases in N=100 consecutive iterative trainings), thereby obtaining a trained linear / nonlinear diffusion model.
[0079] It should be understood that the hybrid loss function integrates multiple different types of loss functions, comprehensively considers the performance of the diffusion model in multiple aspects, and has four advantages: first, the hybrid loss function can comprehensively consider performance indicators in different aspects, such as accuracy, recall rate, precision, etc., avoid the limitations of a single indicator, and make the diffusion model training more comprehensive and accurate; second, the hybrid loss function can balance the trade-offs between different loss functions, and by flexibly adjusting the weights of each loss function, the diffusion model can be effectively optimized in multiple aspects; third, the hybrid loss function can improve the robustness and generalization ability of the diffusion model, and by learning more robust and generalized feature representations, the diffusion model can understand the data more comprehensively and have better generalization ability; fourth, the hybrid loss function can cope with the imbalance or special circumstances of data distribution, so that the diffusion model can better adapt to different data situations. Therefore, the present invention adopts a hybrid loss function to optimize the training process of a linear diffusion model or a nonlinear diffusion model, aiming to improve the stability of its training dynamics and improve the performance in the image generation tasks of conventional CT imaging and contrast-enhanced CT imaging of the liver.
[0080] It should be noted that the use of mixed loss functions in linear / nonlinear diffusion models involves a series of key steps: first, multiple loss functions suitable for the current task need to be carefully selected. These loss functions should cover multiple performance indicators, such as pixel-level contrast loss, structural similarity index loss, perceptual loss, etc., to ensure that the linear / nonlinear diffusion model takes into account all aspects of image generation during training; second, the construction of mixed loss functions requires a weighted combination of these different types of loss functions. Specifically, the weights can be adjusted according to the importance of different types of loss functions to the training of the linear / nonlinear diffusion model to balance the influence of each loss function; finally, in the training of the linear / nonlinear diffusion model, the mixed loss function is optimized by the back propagation method, including calculating the gradient of each loss function to the parameters of the linear / nonlinear diffusion model, and combining the weights of each loss function to update the gradient to guide the learning process of the linear / nonlinear diffusion model. Such optimization can more effectively utilize the information of each loss function and improve the performance of the linear / nonlinear diffusion model; the reasonable design of the mixed loss function can help the linear / nonlinear diffusion model better understand the data and achieve better performance.
[0081] Therefore, in this embodiment, the hybrid loss function specifically includes: using a pixel-level contrast loss function, a structural similarity index loss function, and a perceptual loss function as components of the hybrid loss function, and performing a weighted combination of different types of loss functions to obtain a hybrid loss function of a linear / nonlinear diffusion model, and its expression is:
[0082]
[0083] In the formula, represents the hybrid loss function of the linear / nonlinear diffusion model, represents the pixel-level contrast loss function, represents the structural similarity index loss function, represents the perceptual loss function, , and They represent the weights of the pixel-level contrast loss function, the structural similarity index loss function, and the perceptual loss function, respectively. This hybrid loss function takes into account multiple performance indicators and provides comprehensive guidance and optimization for the training of linear / nonlinear diffusion models.
[0084] It should be understood that the weights of the pixel-level contrast loss function, the structural similarity index loss function, and the perceptual loss function can be adjusted according to task requirements and experimental results to balance the impact of each loss function in the training of the linear / nonlinear diffusion model. Through such a hybrid loss function, multiple performance indicators can be comprehensively considered, thereby guiding the nonlinear diffusion model to learn and optimize more comprehensively.
[0085] Furthermore, the expression of the pixel-level contrast loss function is:
[0086]
[0087] Where N is the total number of pixels in the image, is the value of the i-th pixel in the generated image, is the value of the target image at the i-th pixel.
[0088] Furthermore, the expression of the structural similarity index loss function is:
[0089]
[0090] In the formula, and They are x and The average value of and They are x and The variance of is x and The covariance of and is a constant used for stability.
[0091] Furthermore, the expression of the perceptual loss function is:
[0092]
[0093] In the formula, is the firstl The feature map of the layer, It is l Dimensions of the layer feature map.
[0094] like Figure 3 As shown, the structure of the hybrid loss function optimization method in this embodiment is shown. This method constructs a hybrid loss function that comprehensively considers multiple performance indicators by weighted combination of pixel-level contrast loss, structural similarity index loss and perceptual loss. This structure provides effective guidance and optimization path for training linear / nonlinear diffusion models, which helps linear / nonlinear diffusion models to better understand data and achieve better performance. In this structure, each loss function is fully considered and balanced to ensure that the linear / nonlinear diffusion model can be comprehensively learned and optimized during the training process. Through such an optimization method, more satisfactory results can be achieved in the task of generating liver contrast agent-enhanced CT images, providing strong support for further research and application.
[0095] (5) The CT image data in the test set is input into the trained diffusion model to obtain the corresponding contrast agent enhanced CT image data.
[0096] Exemplarily, a conventional CT image is input into the nonlinear diffusion model to obtain the generation result of a contrast agent enhanced CT image as shown in FIG. Figure 4 As shown, the first row is the original abdominal conventional CT image, the second row is the virtual contrast agent enhanced CT image, and the third row is the paired contrast agent enhanced CT image. Figure 3 The results shown show that the contrast-enhanced CT image generation method based on the nonlinear diffusion model and the mixed loss function can synthesize clear contrast-enhanced CT images using conventional CT images of patients with liver diseases. The method of the present invention achieved a peak signal-to-noise ratio (PSNR) of 36.4 and a structural similarity (SSIM) of 0.90. At the same time, after verification by professional imaging physicians, the clinical conclusions obtained from all virtual contrast-enhanced CT images were consistent with the original contrast-enhanced CT images, which fully verified the effectiveness, reliability and robustness of the method of the present invention. The achievement of this result fully demonstrates the feasibility and clinical potential of the method of the present invention: first, the contrast-enhanced CT generation method based on the nonlinear diffusion model and the mixed loss function provides doctors with a new method that can more accurately diagnose and evaluate liver diseases in clinical practice and provide more precise guidance for the treatment and management of patients; second, the successful application of this method has expanded the research and application of medical imaging and promoted technological innovation and development.
[0097] In summary, the nonlinear diffusion model is an image processing method based on partial differential equations. It simulates the information transfer and diffusion process between pixels in the image through partial differential equations, thereby achieving tasks such as image denoising, enhancement and segmentation. The nonlinear diffusion model pays more attention to the local information transfer and changes of the image, including the mathematical modeling and iterative solution of the diffusion process. In practice, the nonlinear diffusion model usually adopts a multi-scale strategy to capture the multi-scale features of the image by performing diffusion operations at different scales to improve the performance and robustness of the nonlinear diffusion model. In addition, the nonlinear diffusion model can also comprehensively consider multiple performance indicators through a mixed loss function to optimize the nonlinear diffusion model training process. In general, the nonlinear diffusion model pays more attention to the transfer and changes of local information in image processing, and realizes image processing tasks through mathematical modeling and iterative solution. It has high flexibility and interpretability, and is suitable for application scenarios in fields such as medical imaging that require high image details and structure preservation.
[0098] The nonlinear diffusion model has shown significant advantages in image generation tasks. First, it can maintain image details, capture image features and structures, generate more realistic and clearer generation results, and help doctors diagnose and treat more accurately. Secondly, the nonlinear diffusion model can handle complex image relationships, understand the relationship between pixels through small perturbations, and achieve accurate image conversion, which is especially suitable for the complex structure and multi-level information of medical images. In addition, it improves image quality and generates clear and realistic generation results, which has a positive impact on the visualization and interpretation of medical images. Finally, the nonlinear diffusion model is flexible and has strong generalization ability. It can adapt to image generation tasks of different types and styles and is widely used in various scenarios, including different types of medical image generation tasks such as conventional liver CT and contrast-enhanced CT.
[0099] The present invention adopts a hybrid loss function as the loss function of the linear / nonlinear diffusion model, and introduces multiple different types of loss functions, and fuses them together in a weighted combination to comprehensively consider multiple aspects of performance indicators. First, the hybrid loss function ensures that the linear / nonlinear diffusion model can guide optimization more comprehensively during the training process by including multiple loss functions such as pixel-level contrast loss, structural similarity index loss, and perceptual loss, thereby avoiding the limitations of a single indicator. Secondly, by weighted combination of each loss function, the trade-off between them can be balanced, and the weights can be flexibly adjusted to enable each loss function to play the best effect in training. This weight adjustment makes the linear / nonlinear diffusion model more adaptable to different task requirements and data features, thereby improving the flexibility and effect of training. In addition, the hybrid loss function can also improve the robustness and generalization ability of the linear / nonlinear diffusion model, and by learning a more robust and generalized feature representation, the linear / nonlinear diffusion model can understand the data more comprehensively and have better generalization ability. In general, the hybrid loss function comprehensively considers multiple performance indicators and optimizes the training of linear / nonlinear diffusion models through flexible weight combinations, so that the linear / nonlinear diffusion models can be more comprehensive and effectively adapted to various tasks and data situations.
[0100] See also Figure 5 An embodiment of the present invention provides an enhanced CT image generation device based on a mixed loss function diffusion model, comprising one or more processors and a memory, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the enhanced CT image generation method based on the mixed loss function diffusion model in the above embodiment.
[0101] The embodiment of the device for generating enhanced CT images based on the mixed loss function diffusion model of the present invention can be applied to any device with data processing capability, and the device with data processing capability can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capability in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From the hardware level, if Figure 5 As shown, it is a hardware structure diagram of any device with data processing capability where the enhanced CT image generation device based on the mixed loss function diffusion model of the present invention is located, except Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0102] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0103] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0104] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the enhanced CT image generation method based on the mixed loss function diffusion model in the above embodiment is implemented.
[0105] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of any device with data processing capability and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0106] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating enhanced CT images based on a mixed loss function diffusion model, characterized in that: The following steps are involved: (1) collecting CT image data and its paired contrast-enhanced CT image data, and preprocessing them using data enhancement methods and data-oriented regularization methods; (2) dividing the preprocessed CT image data and its paired contrast-enhanced CT image data into a training set, a test set, and a validation set in proportion; (3) constructing a diffusion model for generating contrast-enhanced CT images; the diffusion model for generating contrast-enhanced CT images is a linear diffusion model or a nonlinear diffusion model; The diffusion model used to generate contrast-enhanced CT images is a nonlinear diffusion model; the nonlinear diffusion model is used to model the feature mapping relationship between a CT image and a contrast-enhanced CT image paired therewith, so as to capture the mapping relationship between the CT image and the contrast-enhanced CT image, and realize the generation of contrast-enhanced CT images; The nonlinear diffusion model includes an encoder, a hidden layer and a decoder; The nonlinear diffusion model includes a diffusion process and a reverse diffusion process; In the diffusion process, the original CT image data is input into the nonlinear diffusion model, and after passing through the encoder and hidden layer in sequence, a Gaussian noise sample is generated at time point t. After passing through the decoder, the Gaussian noise sample is added to the original CT image to obtain a CT image with Gaussian noise. This process is completed by iteratively repeating the noise image sequence, and each iteration superimposes part of the Gaussian noise on the original CT image. The inverse diffusion process is completely opposite to the diffusion process. In the inverse diffusion process, the CT image data with Gaussian noise obtained in the last iteration of the diffusion process is input into the nonlinear diffusion model, and the denoising operation is performed step by step through the decoder, hidden layer and encoder in sequence to restore the CT image at each time point. After multiple iterations, the contrast agent enhanced CT image data is output; (4) Iteratively training the diffusion model using the training set, adjusting the parameters of the diffusion model based on the mixed loss function during the training process to obtain a trained diffusion model; wherein the mixed loss function specifically includes: using a pixel-level contrast loss function, a structural similarity index loss function and a perceptual loss function as components of the mixed loss function, and obtaining a mixed loss function of a linear / nonlinear diffusion model by weighted combination of different types of loss functions, and its expression is: L mixed =α·L pixel +β·L ssim +γ·L perceptual Where, L mixed represents the mixed loss function of the linear / nonlinear diffusion model, L pixel represents the pixel-level contrast loss function, L ssim represents the structural similarity index loss function, L perceptual represents the perceptual loss function, α, β, and γ represent the weights of the pixel-level contrast loss function, the structural similarity index loss function, and the perceptual loss function, respectively; (5) The CT image data in the test set is input into the trained diffusion model to obtain the corresponding contrast agent enhanced CT image data.
2. The method for generating enhanced CT images based on a mixed loss function diffusion model according to claim 1, characterized in that: The data enhancement method and the data-oriented regularization method are used to pre-process the data, specifically including: Firstly, the geometric transformation method is used to randomly flip, rotate, translate, crop and scale the collected CT image data and its paired contrast-enhanced CT image data. Then, the color perturbation method is used to change the channel order, hue and contrast of the CT image data and its paired contrast-enhanced CT image data to obtain the data-enhanced CT image data and its paired contrast-enhanced CT image data. Finally, the data-oriented regularization method is used to add random noise, perform random occlusion and sample batch regularization to the data-enhanced CT image data and its paired contrast-enhanced CT image data to complete the preprocessing of the CT image data and its paired contrast-enhanced CT image data.
3. The method for generating enhanced CT images based on a mixed loss function diffusion model according to claim 1, characterized in that: The diffusion model is iteratively trained using the training set, and the parameters of the diffusion model are adjusted based on the mixed loss function during the training process to obtain a trained diffusion model, which specifically includes: The CT image data in the training set is input into the linear / nonlinear diffusion model, and the generated contrast-enhanced CT image data is output; the mixed loss function value is calculated according to the contrast-enhanced CT image data paired with the CT image data in the training set and the generated contrast-enhanced CT image data; the parameters of the linear / nonlinear diffusion model are optimized and adjusted by using the back propagation method and the gradient descent method with the minimization of the mixed loss function value as the optimization goal; the above iterative training process is continuously repeated until the preset number of iterative training times is reached or the mixed loss function value converges, thereby obtaining a trained linear / nonlinear diffusion model.
4. The method for generating enhanced CT images based on a mixed loss function diffusion model according to claim 1, characterized in that: The expression of the pixel-level contrast loss function is: Where N is the total number of pixels in the image, is the value of the generated image at the i-th pixel, x i is the value of the target image at the i-th pixel; The expression of the structural similarity index loss function is: In the formula, μ x and They are x and The average value of and They are x and The variance of is x and The covariance of , C1 and C2 are constants used for stability; The expression of the perceptual loss function is: In the formula, is the feature map of the lth layer of the pre-trained network, N l is the dimension of the feature map of layer l.
5. An enhanced CT image generation device based on a mixed loss function diffusion model, comprising one or more processors and a memory, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the enhanced CT image generation method based on the mixed loss function diffusion model described in any one of claims 1-4.
6. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by a processor, it is used to implement the enhanced CT image generation method based on a mixed loss function diffusion model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
CBCT image reconstruction method and system, computer device and storage medium
CN116993848A
