Enhanced ct image generation method and apparatus based on dual spatial constraints
By providing supervision information in the latent space and image space, and combining enhanced region segmentation binary images, an enhanced CT image generation model based on dual spatial constraints is constructed, which solves the problem of inaccurate generation in the existing technology and achieves effective enhancement of small structures such as skull base blood vessels.
Patent Information
- Application Number
- CN202511375914.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-09-25
AI Technical Summary
Existing technologies struggle to generate accurate enhanced CT images, especially when vascular structures in areas such as the base of the skull are delicate and complex.
By providing supervision information simultaneously in the latent space and image space, and combining enhanced region segmentation binary images, an enhanced CT image generation model based on dual spatial constraints is constructed. An improved transformation encoder and channel-space attention module are used to optimize the model parameters to improve attention to fine structures.
It effectively improves the enhancement effect on small structures such as blood vessels at the base of the skull, resulting in more accurate enhanced CT images.
Smart Images

Figure CN120876659B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image processing, and particularly relates to a method for generating a contrast-enhanced CT image based on double spatial constraints, and also relates to a computer device. BACKGROUND
[0002] In medical image processing, computed tomography (CT) has the advantages of fast imaging speed and high spatial resolution. Among them, contrast-enhanced CT (Contrast-Enhanced CT) can clearly show the vascular structure, lesion blood supply and boundary features by intravenous injection of iodine-containing contrast agents at different time windows.
[0003] Image generation refers to the creation of new images from scratch using computer algorithms and techniques, or the modification or synthesis of images based on certain input conditions such as text descriptions, attribute labels, and conditional images. It is widely used in artistic creation and scientific research. With the development of image generation technology and its application in the field of medical imaging, more and more research has focused on the task of generating contrast-enhanced CT images.
[0004] The following are common technical methods in the field of image generation:
[0005] An autoencoder (AE) consists of an encoder and a decoder. The encoder compresses the image to obtain a lower-dimensional latent variable z, and the decoder restores the original image according to the latent variable z to learn the low-dimensional feature representation of the image. However, since the latent space of the latent variable is unknown, it is difficult to sample the latent variable from the latent space to generate new images, which limits the direct application of AE in the field of image generation. A variational autoencoder (VAE) also consists of an encoder and a decoder, but the VAE encoder obtains the distribution parameters in the latent space according to the input data, i.e., for each input sample, the encoder outputs a distribution parameterization of the latent variable z corresponding to the input image, usually the mean and log variance , and uses KL divergence to constrain it to approximate the standard normal distribution; the decoder receives the latent variable z randomly sampled from the distribution as input to reconstruct the original image. After the VAE is trained, the decoder can generate new images according to the latent variables sampled from the learned latent space distribution. Subsequently, conditional variational autoencoders (CVAE) and other variants have been developed to generate images of specified types according to conditional inputs.
[0006] The generative adversarial network (GAN) is composed of a generator and a discriminator. The generator usually generates images of the same type as the training data (such as human face images, landscape images, etc.) based on Gaussian noise, realizing the mapping from the Gaussian noise distribution to the target image distribution. The discriminator is responsible for distinguishing between generated images and real images, and generating gradient updates for its own and the generator's parameters. Specifically, the training goal of the generator is to deceive the discriminator, achieving the purpose of "faking the real"; the training goal of the discriminator is to distinguish between real images and generated images, i.e., to judge real images as true and images generated by the generator as false. As the training process continues, the generated images by the generator become more and more realistic, and the discrimination ability of the discriminator becomes stronger and stronger, and finally the two reach a Nash equilibrium. However, when the model capabilities of the generator and the discriminator are disparate, it will lead to unstable training process or even divergence, so the model network structure and other training-related hyperparameters need to be carefully adjusted. Cycle GAN is a variant of GAN, which aims to achieve style transfer while keeping the image content unchanged, such as converting real pictures into oil painting style. It contains two generators and two discriminators, which respectively complete the generation of target domain images from source domain images, the generation of source domain images from target domain images, the discrimination of source domain images, and the discrimination of target domain images. However, the increase in structural complexity also brings additional challenges to the model training process.
[0007] At present, there are related deep learning methods for generating corresponding enhanced CT images from plain CT images, but most of them are for large blood vessel regions such as abdomen and neck, and the blood vessel structure of the skull base and other parts is fine and complex, so it is difficult for existing methods to generate accurate enhanced CT images. SUMMARY
[0008] The purpose of the present application is to solve the above-mentioned problems existing in the prior art, and to provide a dual-space-constrained enhanced CT image generation method, and a computer device for obtaining corresponding enhanced CT images from plain CT images. The present application provides supervision information in the latent space and image space to better optimize the model parameters, and combines the enhanced region segmentation binary image to improve the attention degree of the model to the region that needs to be enhanced, which can effectively improve the enhancement effect of small structures such as skull base blood vessels.
[0009] The above-mentioned purposes of the present application are realized by the following technical means:
[0010] The dual-space-constrained enhanced CT image generation method comprises the following steps:
[0011] Step S1, paired plain CT images and real enhanced CT images are obtained, the real enhanced CT images are segmented to obtain real segmentation binary images of enhanced regions, each pair of plain CT images and real enhanced CT images and the corresponding real segmentation binary images of enhanced regions are taken as a sample, all samples constitute a sample set, and the sample set is divided into a training set and a test set in proportion;
[0012] Step S2, an enhanced CT image generation model and a corresponding total loss function are constructed;
[0013] The enhanced CT image generation model includes a compression encoder, a conversion encoder, a decoder, and a discriminator. The real enhanced CT image in the sample is input into the compression encoder to obtain the distribution parameters of the real enhanced CT image in the latent space, including a first mean and a first logarithmic variance , , and a first standard deviation
[0014] The plain CT image in the sample is input into the conversion encoder to obtain the distribution parameters of the plain CT image encoding in the latent space of the corresponding real enhanced CT image, including a second mean and a second logarithmic variance , , and a second standard deviation
[0015] The decoder decodes the second mean and the second logarithmic variance to obtain a predicted enhanced CT image;
[0016] The predicted enhanced CT image and the real segmentation binary image of the enhanced region are input into the discriminator to calculate an adversarial loss;
[0017] Step S3, the training set is used to train the enhanced CT image generation model. During the training process, the compression encoder and the decoder parameters are frozen and not updated, only the conversion encoder and the discriminator parameters are updated until convergence. After training, the model parameters are saved to obtain the trained enhanced CT image generation model;
[0018] Step S4, obtaining a plain CT image to be converted, generating a corresponding enhanced CT image based on the conversion encoder and the decoder of the trained enhanced CT image generation model.
[0019] As described above, the conversion encoder respectively inserts a channel-space attention module between the residual module and the convolution layer of the second level of the encoder of the VAE model, inserts a channel-space attention module between the residual module and the convolution layer of the third level, and finally inserts a channel-space attention module at the fourth level;
[0020] In the second and third levels, the output feature map of the previous residual module adjacent to the convolutional layer is input into the channel-spatial attention module, and the output feature map of the channel-spatial attention module is input into the convolutional layer.
[0021] The channel-spatial attention module includes a channel attention module and a spatial attention module, the input feature map of the channel-spatial attention module is input into the channel attention module, the channel attention module outputs the attention weight of each channel of the input feature map of the channel-spatial attention module, and then the attention weight of each channel is multiplied with the input feature map of the channel attention module to obtain a channel enhanced feature map, the channel enhanced feature map is input into the spatial attention module, the spatial attention module outputs a spatial attention weight, and finally the spatial attention weight is multiplied with the channel enhanced feature map to obtain a final enhanced feature map, which is also the output of the channel-spatial attention module.
[0022] The channel attention module includes a channel attention module and a spatial attention module, the input feature map of the channel-spatial attention module is input into the channel attention module, the channel attention module outputs the attention weight of each channel of the input feature map of the channel-spatial attention module, and then the attention weight of each channel is multiplied with the input feature map of the channel attention module to obtain a channel enhanced feature map, the channel enhanced feature map is input into the spatial attention module, the spatial attention module outputs a spatial attention weight, and finally the spatial attention weight is multiplied with the channel enhanced feature map to obtain a final enhanced feature map, which is also the output of the channel-spatial attention module.
[0023] The channel attention module includes a channel attention module and a spatial attention module, the input feature map of the channel-spatial attention module is input into the channel attention module, the channel attention module outputs the attention weight of each channel of the input feature map of the channel-spatial attention module, and then the attention weight of each channel is multiplied with the input feature map of the channel attention module to obtain a channel enhanced feature map, the channel enhanced feature map is input into the spatial attention module, the spatial attention module outputs a spatial attention weight, and finally the spatial attention weight is multiplied with the channel enhanced feature map to obtain a final enhanced feature map, which is also the output of the channel-spatial attention module.
[0024] The total loss function of the enhanced CT image generation model is calculated based on the following formula:
[0025] ;
[0026] In the formula, is the total loss function of the enhanced CT image generation model, is the latent space distribution difference, is the image reconstruction loss, is the adversarial loss, is the perceptual loss, , , is the latent space distribution difference , the adversarial loss and perceived loss The weighting coefficients, To create realistic enhanced CT images, To predict enhanced CT images;
[0027] The difference in the distribution of the hidden space The KL divergence is used, calculated based on the following formula;
[0028] .
[0029] Reconstruction loss as described above Calculated based on the following formula:
[0030] ;
[0031] In the formula, To invert the true segmentation binary image of the enhanced region, For the summation function, For matrix Hadema product, Let L1 norm be the matrix. To enhance the real segmentation of the region in the binary image.
[0032] As described above, combating losses Calculated based on the following formula:
[0033] ;
[0034] In the formula, For the expectation, It is a discriminator.
[0035] As described above, perceived loss The loss is calculated using a pre-trained neural network, based on the following formula:
[0036] ;
[0037] In the formula, The first output of the pre-trained neural network Each feature map This represents the total number of feature maps output by the pre-trained neural network.
[0038] A computer device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the enhanced CT image generation method based on dual spatial constraints as described above.
[0039] Compared with the prior art, the present invention has the following advantages:
[0040] (1), the improved conversion encoder based on the encoder of the VAE model can encode the real enhanced CT image to obtain the parameterized distribution thereof in the latent space, and additional training supervision information is provided as a label in the latent space to optimize the model parameters.
[0041] (2), the real segmentation binary image of the enhanced region is combined to explicitly guide the region which the model should focus on, the weight of the real segmentation binary image region in the reconstruction loss is improved, the attention degree of the model to the fine anatomical structure in the plain CT image is improved, and the model of the application can complete the enhancement of the fine anatomical structure, such as the enhancement of the skull base vascular structure.
[0042] (3), the channel-space attention module CBAM is added to the encoder of the VAE model as a conversion encoder to realize the mapping from the image space of the plain CT image to the latent space of the real enhanced CT image, wherein the spatial attention module helps the conversion encoder to pay attention to and capture the subtle vascular features on the plain CT image, the channel attention module can dynamically adjust the weight coefficient of each channel in the feature map, and the response intensity of the feature channel with key role is enhanced, so that the feature extraction capability of the conversion encoder is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 It is the overall structure schematic diagram of the enhanced CT image generation model of the application;
[0044] Figure 2 It is the network structure schematic diagram of the conversion encoder of embodiment 1 of the application (each dashed box in the figure represents a level);
[0045] Figure 3 It is the structure schematic diagram of the channel-space attention module of embodiment 1 of the application;
[0046] Figure 4 It is the structure schematic diagram of the channel attention module of embodiment 1 of the application;
[0047] Figure 5 It is the structure schematic diagram of the spatial attention module of embodiment 1 of the application;
[0048] Figure 6 It is the flowchart of the method of embodiment 1 of the application;
[0049] Figure 7 It is the first plain CT image;
[0050] Figure 8 It is Figure 7 The enlarged view at the middle square;
[0051] Figure 9The real enhanced CT image corresponding to the first plain scan CT image;
[0052] Figure 10 The real enhanced CT image corresponding to the first plain scan CT image; Figure 9 An enlarged view of the middle box;
[0053] Figure 11 The real enhanced CT image corresponding to the first plain scan CT image;
[0054] Figure 12 The real enhanced CT image corresponding to the first plain scan CT image; Figure 11 An enlarged view of the middle box;
[0055] Figure 13 The real enhanced CT image corresponding to the first plain scan CT image;
[0056] Figure 14 The real enhanced CT image corresponding to the first plain scan CT image; Figure 13 An enlarged view of the middle box;
[0057] Figure 15 The real enhanced CT image corresponding to the first plain scan CT image;
[0058] Figure 16 The real enhanced CT image corresponding to the first plain scan CT image; Figure 15 An enlarged view of the middle box;
[0059] Figure 17 The real enhanced CT image corresponding to the first plain scan CT image;
[0060] Figure 18 The real enhanced CT image corresponding to the first plain scan CT image; Figure 17 An enlarged view of the middle box. DETAILED DESCRIPTION
[0061] In order to facilitate those skilled in the art to understand and implement the present application, the present application will be further described in detail below in conjunction with embodiments, and the embodiments described herein are only used to illustrate and explain the present application, and are not a limitation on the present application.
[0062] As shown in the figure, the enhanced CT image generation method based on double space constraints includes the following steps: Figure 6 Step S1, paired plain scan CT images and real enhanced CT images are obtained, the real enhanced CT images are segmented to obtain real segmentation binary images of enhanced regions, each pair of plain scan CT images and real enhanced CT images and the corresponding real segmentation binary images of enhanced regions are taken as a sample, all samples constitute a sample set, and the sample set is divided into a training set and a test set in proportion.
[0063]
[0064] The obtained plain CT image and the real enhanced CT image are paired, that is, the patient maintains the same pose in the two scans to ensure that each anatomical structure in the images is spatially aligned. The real segmentation binary image of the enhanced region can be obtained by using an existing enhanced CT segmentation model or other image segmentation methods. In practice, the real segmentation binary image of the enhanced region is obtained by using the Otsu method based on the result of subtracting the plain CT image from the real enhanced CT image.
[0065] The specific parts of the obtained plain CT image and the real enhanced CT image include, but are not limited to, the head, the neck, the chest, the abdomen, and the pelvic cavity.
[0066] Step S2, constructing an enhanced CT image generation model and a corresponding total loss function , specifically comprising the following steps:
[0067] Step S2.1, constructing an enhanced CT image generation model, as shown in Figure 1 The enhanced CT image generation model includes a compression encoder, a conversion encoder, a decoder, and a discriminator.
[0068] The real enhanced CT image is input into the compression encoder for encoding to obtain the distribution parameters of the real enhanced CT image in the latent space, including the first mean and the first logarithmic variance , which provide the required supervision information for training of the conversion encoder, based on the following formula:
[0069] (1)
[0070] In the formula, is the real enhanced CT image, is the first standard deviation, is the compression encoder.
[0071] The role of the conversion encoder is to establish the mapping relationship of the plain CT image to the latent space distribution of the real enhanced CT image. The plain CT image is input into the conversion encoder for encoding to obtain the distribution parameters of the plain CT image in the latent space of the corresponding real enhanced CT image, including the second mean and the second logarithmic variance , thereby establishing the mapping relationship of the plain CT image to the latent space distribution of the real enhanced CT image, based on the following formula:
[0072] (2)
[0073] In the formula, to obtain a first standard deviation, to obtain a second standard deviation, to obtain a conversion encoder.
[0074] In the field of image generation, "latent variables" refer to those variables that cannot be directly observed but play a key role in the learning and generation process of the model, which usually exist in the internal representation of the generative model to capture the potential structure or features in the data, while the compression encoder and the conversion encoder output the parameters of the distribution that the latent variables follow, rather than directly outputting a determined latent vector.
[0075] The decoder decodes the latent space distribution parameter output by the conversion encoder, i.e., the second mean and the second log variance to obtain a predicted enhanced CT image based on the following formula:
[0076] (3)
[0077] wherein, is the predicted enhanced CT image, is the decoder.
[0078] As shown in Figure 2 , as a specific embodiment, the present embodiment selects the encoder and decoder of the VAE (Variational Autoencoder) model trained on a large-scale natural image dataset as the compression encoder and decoder in the enhanced CT image generation model.
[0079] The conversion encoder is improved based on the encoder of the VAE model, and the encoder of the VAE model improves the feature extraction ability of the conversion encoder for complex blood vessel structures through adaptive feature weight learning and double attention mechanism. The conversion encoder of the present application inserts a channel-spatial attention module (Convolutional Block Attention Model, CBAM) between the residual module and the convolutional layer of the second stage of the encoder of the VAE model, inserts a channel-spatial attention module between the residual module and the convolutional layer of the third stage, and additionally adds a channel-spatial attention module at the last stage of the fourth stage of the VAE encoder.
[0080] Among them, in the second stage and the third stage, the output feature map of the previous residual module adjacent to the convolutional layer is input into the channel-spatial attention module, and the output feature map of the channel-spatial attention module is input into the convolutional layer.
[0081] The conversion encoder of the embodiment comprises five levels stacked in sequence, wherein the first level comprises a convolutional layer, a residual module, a residual module and a convolutional layer stacked in sequence, the second level comprises a residual module, a residual module, a channel-spatial attention module and a convolutional layer stacked in sequence, the third level comprises a residual module, a residual module, a channel-spatial attention module and a convolutional layer stacked in sequence, the fourth level comprises a residual module, a residual module and a channel-spatial attention module stacked in sequence, the fifth level comprises a residual module, a self-attention module and a residual module stacked in sequence, and the sixth level comprises a group normalization, a residual module and a residual module stacked in sequence.
[0082] As shown in Figure 3 , the channel-spatial attention module comprises a channel attention module and a spatial attention module, the input feature map of the channel-spatial attention module is input into the channel attention module, the channel attention module outputs the attention weight of each channel of the input feature map of the channel-spatial attention module, the attention weight of each channel is multiplied with the input feature map of the channel attention module to obtain a channel enhanced feature map, the channel enhanced feature map is input into the spatial attention module, the spatial attention module outputs a spatial attention weight, and finally the spatial attention weight is multiplied with the channel enhanced feature map to obtain a final enhanced feature map, which is the output of the channel-spatial attention module.
[0083] As shown in Figure 4 , the channel attention module specifically comprises the following processing process for the input feature map of the channel-spatial attention module: the input feature map of the channel-spatial attention module is compressed in the spatial dimension to 1x1 size and the channel number is kept unchanged through an average pooling layer and a maximum pooling layer respectively, the output feature maps of the average pooling layer and the maximum pooling layer are processed through convolution-ReLU activation function-convolution respectively and then added to obtain an addition result, and the addition result is processed through a Sigmoid activation function to obtain the attention weight of each channel.
[0084] As shown in Figure 5 , the spatial attention module specifically comprises the following processing process for the input channel enhanced feature map: the channel enhanced feature map is first taken along the channel dimension to obtain the mean value and the maximum value, i.e. the spatial dimension of the feature map is kept unchanged and the channel number is changed to 1, then the two are spliced along the channel dimension, and finally the spatial attention weight of a single channel is obtained through convolution and Sigmoid activation function in sequence, and the final enhanced feature map is obtained by multiplying the channel enhanced feature map.
[0085] Step S2.2, constructing the total loss of the enhanced CT image generation model , the total loss of the enhanced CT image generation model is calculated based on the following formula:
[0086] (4)
[0087] wherein, represents the latent space distribution difference, represents the image reconstruction loss, represents the adversarial loss, represents the perceptual loss, , , are weight coefficients of the latent space distribution difference , the adversarial loss , and the perceptual loss , respectively.
[0088] In some embodiments, the latent space distribution difference is calculated based on the following formula using the KL divergence;
[0089] (5).
[0090] The reconstruction loss is calculated based on the following formula using the real augmented CT image , the predicted augmented CT image , and the real segmentation binary image of the augmented region :
[0091] (6)
[0092] wherein, represents the NOT operation on the real segmentation binary image of the augmented region, represents the summation function, represents the matrix Hadamard product (corresponding element multiplication), represents the L1 norm of the matrix.
[0093] The adversarial loss is calculated based on the following formula:
[0094] (7)
[0095] wherein, represents the expectation, represents the discriminator.
[0096] The perceptual loss is calculated based on the following formula using a pre-trained neural network:
[0097] (8)
[0098] The perceptual loss is usually a distance metric in the feature space using a pre-trained neural network (such as AlexNet and VGGNet) as a feature extractor, which has been proved to be closer to human eye perception, and the quality of the predicted enhanced CT image is improved by constraining in the feature space through the perceptual loss, wherein is the number of feature maps output by the pre-trained neural network, is the total number of feature maps output by the pre-trained neural network.
[0099] Step S3, the enhanced CT image generation model is trained using the training set, and in the training process, the parameters of the compression encoder and the decoder are frozen and not updated, only the parameters of the conversion encoder and the discriminator are updated until convergence; after the training is completed, the model parameters are saved, and the trained enhanced CT image generation model is obtained.
[0100] Step S4, obtaining the plain CT image to be converted, and generating a corresponding predicted enhanced CT image based on the conversion encoder and the decoder of the trained enhanced CT image generation model.
[0101] The head is an extremely complex anatomical region, containing the carotid artery, the Willis circle and multiple important structures, the manifestations of which in the plain CT image and the enhanced CT image are very different; in addition, the head enhanced CT image is mainly used for evaluating the vascular structure, and these structures are usually not obvious in the plain CT image, so the enhanced CT image generation model must be able to accurately capture the vascular features in the plain CT image and accurately reproduce them in the generated predicted enhanced CT image.
[0102] In order to illustrate the effect of the present application, the generation results of the enhanced CT image generation model of the present application on the head CT data set are shown; as shown in Figures 7-12 and Figures 13-18 , the generation results of the predicted enhanced CT images of two randomly selected plain CT images are shown, and it can be seen from the figures that the enhanced CT image generation model proposed in the present application can enhance small blood vessels while ensuring the accuracy of the enhanced region.
[0103] In some embodiments, other compression encoders that can compress the real enhanced CT image can also be used, and the decoder that can successfully recover the enhanced CT image after compression can also be used, such as using the encoder and the decoder of the AE model as the compression encoder and the decoder in the enhanced CT image generation model.
[0104] In some embodiments, the latent space distribution difference Other indicators for measuring the distance between two distribution parameters (such as JS divergence, Wasserstein distance, etc.) can also be used, and if the real enhanced CT image is directly obtained by the specific latent variable through the compression encoder, indicators for measuring the difference between vectors (such as L1 distance, cosine similarity, etc.) can also be used to measure the difference between the latent space distributions The discriminator can also be a neural network for discriminating in the latent space.
[0105] In one embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0106] In one embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0107] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by a processor to implement the steps in the above method embodiments.
[0108] It should be noted that the embodiments described in the present application are only examples illustrating the spirit of the present application. Those skilled in the art of the present application can make various modifications or supplements to the described embodiments or use similar ways to replace them, without deviating from the spirit of the present application or exceeding the scope defined by the appended claims.
Claims
1. A method for generating enhanced CT images based on dual spatial constraints, characterized in that, Includes the following steps: Step S1: Obtain paired plain CT images and real enhanced CT images. Segment the real enhanced CT images to obtain real segmentation binary images of the enhanced regions. Each pair of plain CT images and real enhanced CT images, as well as the corresponding real segmentation binary images of the enhanced regions, is considered as a sample. All samples constitute a sample set. The sample set is divided into a training set and a test set according to the proportion. Step S2: Construct the enhanced CT image generation model and the corresponding total loss function; The enhanced CT image generation model includes a compression encoder, a transformation encoder, a decoder, and a discriminator. Real enhanced CT images from the sample are input into the compression encoder to obtain the distribution parameters of the real enhanced CT images in the latent space, including the first mean. and the first logarithmic variance , The first standard deviation; The plain CT images from the sample are input into the conversion encoder to obtain the distribution parameters of the plain CT image encoding in the latent space of the corresponding real enhanced CT image, including the second mean. Second log variance , The second standard deviation; Decoder for the second mean Second log variance Decode to obtain the predicted enhanced CT image; The predicted enhanced CT image and the true segmented binary image of the enhanced region are input into the discriminator to calculate the adversarial loss; Step S3: Train the enhanced CT image generation model using the training set. During the training process, the parameters of the compression encoder and decoder are frozen and not updated. Only the parameters of the transformation encoder and discriminator are updated until convergence. After training, save the model parameters to obtain the trained enhanced CT image generation model; Step S4: Obtain the plain CT image to be converted, and generate the corresponding predicted enhanced CT image based on the conversion encoder and decoder of the trained enhanced CT image generation model.
2. The enhanced CT image generation method based on dual spatial constraints according to claim 1, characterized in that, The transformation encoder inserts channel-spatial attention modules between the residual module and the convolutional layer of the second level of the encoder in the VAE model, between the residual module and the convolutional layer of the third level, and at the end of the fourth level. In the second and third layers, the output feature map of the previous residual module adjacent to the convolutional layer is input into the channel-spatial attention module, and the output feature map of the channel-spatial attention module is input into the convolutional layer.
3. The enhanced CT image generation method based on dual spatial constraints according to claim 2, characterized in that, The channel-spatial attention module includes a channel attention module and a spatial attention module. The input feature map of the channel-spatial attention module is input into the channel attention module, and the channel attention module outputs the attention weights of each channel of the input feature map of the channel-spatial attention module. The attention weights of each channel are then multiplied with the input feature map of the channel attention module to obtain the channel enhancement feature map. The channel enhancement feature map is input into the spatial attention module, and the spatial attention module outputs the spatial attention weights. Finally, the spatial attention weights are multiplied with the channel enhancement feature map to obtain the final enhancement feature map, which is also the output of the channel-spatial attention module.
4. The enhanced CT image generation method based on dual spatial constraints according to claim 3, characterized in that, The channel attention module specifically processes the input feature map of the channel-spatial attention module as follows: the input feature map of the channel-spatial attention module is compressed to a spatial dimension of 1×1 by average pooling layer and max pooling layer respectively while keeping the number of channels unchanged. The output feature maps of average pooling layer and max pooling layer are processed by convolution-ReLU activation function-convolution and then added together to obtain the sum. The sum is then processed by Sigmoid activation function to obtain the attention weight of each channel.
5. The enhanced CT image generation method based on dual spatial constraints according to claim 4, characterized in that, The spatial attention module specifically processes the input channel enhancement feature map as follows: First, the mean and maximum values of the channel enhancement feature map are taken along the channel dimension, keeping the spatial dimension of the channel enhancement feature map unchanged and the number of channels becomes 1. Then, it is concatenated along the channel dimension. Finally, the spatial attention weights of a single channel are obtained by sequentially passing convolution and sigmoid activation functions, and multiplied with the channel enhancement feature map to obtain the final enhancement feature map.
6. The enhanced CT image generation method based on dual spatial constraints according to claim 1, characterized in that, The total loss function of the enhanced CT image generation model is calculated based on the following formula: ; In the formula, To enhance the overall loss function of the CT image generation model, For differences in the distribution of latent space, For image reconstruction loss, To combat the losses, In order to perceive loss, , , The differences in latent space distribution are respectively Combating losses and perceived loss The weighting coefficients, To create realistic enhanced CT images, To predict enhanced CT images; The difference in the distribution of the hidden space The KL divergence is used, calculated based on the following formula; 。 7. The enhanced CT image generation method based on dual spatial constraints according to claim 6, characterized in that, The reconstruction loss Calculated based on the following formula: ; In the formula, To invert the true segmentation binary image of the enhanced region, For the summation function, For matrix Hadema product, Let L1 norm be the matrix. To enhance the real segmentation of the region in the binary image.
8. The enhanced CT image generation method based on dual spatial constraints according to claim 7, characterized in that, The resistance loss Calculated based on the following formula: ; In the formula, For the expectation, It is a discriminator.
9. The enhanced CT image generation method based on dual spatial constraints according to claim 7, characterized in that, The perceived loss The loss is calculated using a pre-trained neural network, based on the following formula: ; In the formula, The first output of the pre-trained neural network Each feature map This represents the total number of feature maps output by the pre-trained neural network.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the enhanced CT image generation method based on dual spatial constraints as described in any one of claims 1 to 9.
Citation Information
Patent Citations
SP-CTA image coronary artery segmentation method and device based on feature alignment domain
CN115063384A
Training method for enhancing CT image generation model and storage medium
CN116977466A