Medical image generation based on label evolution and mask-like self-attention diffusion model

By introducing the label evolution module and mask-like attention module into the generative adversarial network, combined with the diffusion model, the problem of training instability and insufficient diversity of GANs in medical image generation is solved, and the generation diversity and accuracy are achieved. promote.

CN118537478AActive Publication Date: 2024-08-23TIANJIN UNIVERSITY OF TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410364380.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2024-08-23
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing generative adversarial networks (GANs) suffer from training instability, mode collapse, and insufficient diversity of generated samples in medical image generation, resulting in generated images that are too similar or lack creativity.

Method used

The label evolution module and mask-like attention module are introduced, combined with the diffusion model, to guide the generation of diverse medical images through the gradual update of point labels and the constraints of cell category information.

Benefits of technology

Effectively generates diverse medical images, improves the visual clarity and category difference extraction capabilities of images, and improves the accuracy and diversity of model generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537478A
    Figure CN118537478A
Patent Text Reader

Abstract

The invention discloses medical image generation based on a label evolution and mask-like self-attention diffusion model, and belongs to the field of computer vision and medical image generation. A diffusion model is used as a basic framework, an obtained Lizard data set is subjected to data preprocessing, and problems existing in the field of medical image generation are improved in a targeted mode. And replacing the self-attention module in the diffusion model with the designed mask-like self-attention module, wherein the module can capture the type information of the cells. Besides, in order to generate various medical images, a label evolution module is introduced, and the module integrates the process of gradually evolving point labels into complete Mask labels into the Unet in a conditional normalization form, so that the network can reasonably generate the various medical images. The method is suitable for all medical image data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to medical image generation based on a diffusion model of label evolution and class mask self-attention, and belongs to the field of computer vision and medical image generation. Background Art

[0002] Medical image generation is a research field that focuses on the generation, processing and analysis of medical image data. With the continuous advancement of medical image generation technology, the scale of medical image data has gradually increased, providing a wide range of development opportunities for the field of medical image generation. The goal of medical image generation is to assist doctors in more accurate diagnosis and treatment by generating virtual medical image data. Early medical image generation methods were mainly based on hand-designed rules and traditional graphics techniques, including physical model-based rendering and simple texture mapping. These methods are limited by computing resources and model expression capabilities. With the rise of deep learning, neural networks have shown great potential in the field of image generation. Early convolutional neural networks (CNNs) were used for tasks such as image classification, laying the foundation for image generation. The introduction of variational autoencoders enables image generation to learn distributions in latent space, thereby generating more diverse images. VAEs combine probabilistic graphical models and neural networks. Generative adversarial networks were proposed by Ian Goodfellow and others, which caused a revolution in the field of image generation. GANs can generate high-quality and realistic images by pitting the generator and discriminator against each other in the game process.

[0003] Although generative adversarial networks (GANs) have achieved remarkable success in image generation and other tasks, they also have some shortcomings: The training process of GANs can be unstable. The game between the generator and the discriminator can cause the model to oscillate or collapse, and sometimes the generator cannot generate high-quality samples. GANs can sometimes fall into mode collapse, and the diversity of generated samples is limited, resulting in generated images that are too similar or lack creativity.

[0004] To address these shortcomings, we introduced a label evolution module and a class mask mechanism on the original diffusion model. The first is the label evolution module, which is mainly a DNANet network structure that is used to extract the information of the cell's Mask label to generate the corresponding mapping diagram. Then, through label evolution, the original cell's point label is updated and then replaced with the initial point label, so that the point label is gradually updated. The new point label learned at each stage is used as a condition to guide the diffusion model to generate diverse medical images. Secondly, since the evolution of a single point label has infinite solutions for guiding the diffusion model, we added a class mask attention module to constrain the cell type corresponding to each point label. Through the above two modules, it can be ensured that the diffusion model generates multiple types and diverse cells. Summary of the invention

[0005] The purpose of the present invention is to provide a medical image generation network based on a diffusion model of label evolution and mask-like attention, so as to generate diverse medical images and solve the problems existing in the neighborhood of medical image generation.

[0006] In order to achieve the above purpose, the solution of the present invention is: based on the medical image generation network of the diffusion model, a more advanced network model is designed, which can make the generated images more diverse and accurate while improving the model performance. The current specific steps are as follows:

[0007] (1) A total of 384 images of the lizard dataset commonly used in medical image generation were obtained, and the training set, test set, and validation set were divided into training set, test set, and validation set according to the ratio of 7:2:1, and the training set, test set, and validation set were randomly divided five times;

[0008] (2) Perform data preprocessing and crop each image in the lizard dataset to split it into 10 small images;

[0009] (3) Select a suitable point label evolution network model that can update the point labels in the lizard dataset and pre-train a model that can achieve ideal results.

[0010] (4) Design a medical image generation network based on the diffusion model of label evolution and class mask attention. The updated label output by each point label evolution module will be input into the Decoder part of Unet, so that the Unet network can generate diverse images based on the gradually updated label information. At the same time, in order to ensure the category of generated cells, we propose a class mask self-attention module to fuse the information of cell categories. The combination of the two modules is used to guide the generation of diverse cell images;

[0011] (5) Conduct multiple experiments to explore the optimal network parameters and use FID and IS evaluation indicators to evaluate the model;

[0012] (6) Design ablation experiments to explore the effectiveness of each module and the specific problems it solves;

[0013] (7) Prove the feasibility and superiority of this method, that is, this method can realize the generation of medical images.

[0014] The beneficial effect of the present invention is that the method can effectively generate diverse medical images. Based on the diffusion model, common data sets in medical images are selected and their formats and sizes are adjusted, further solving some challenging problems: the Unet network in the diffusion model may have some shortcomings when processing medical images. One of them is that the boundaries between the types of images generated by the generative network are not clear enough. This means that the generated images may not be visually clear enough to distinguish the subtle differences between different categories. Another problem is that the Unet network does not extract enough category information in medical images. In other words, the Unet network may fail to fully capture the feature differences between different categories in medical images, resulting in the generated images lacking corresponding category information, thereby affecting the accuracy and diversity of model generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is the whole algorithm flow chart of the present invention.

[0017] Figure 2 It is a diagram of a specific implementation method of the label evolution module of the present invention.

[0018] Figure 3 It is a network diagram of the encoding mask attention mechanism module of the present invention. DETAILED DESCRIPTION

[0019] The lizard dataset is obtained in JPG format, and the training set, test set and validation set are divided into 7:2:1 and randomly divided five times respectively. Then data preprocessing is performed on each image in the lizard dataset, including cropping each image, dividing it into 10 small images, converting each image into npy format image, and then looking for advanced generative network models, putting the pre-processed dataset into the network for training. After comparing the images generated by the network with the actual images, it is found that the generated images have fuzzy category division and poor quality.

[0020] To address the above issues, we constructed a medical image generation algorithm based on the diffusion model of label evolution. In our neural network, we first proposed to add the label evolution module to the diffusion model. Figure 2 As shown in the figure, we will send the Mask Label corresponding to the Point Label to a feature map extraction network (here we use the Unet network to extract features) to obtain the feature map corresponding to the Mask Label. According to the centroid in the Point Label, the local neighborhood candidate pixels are extracted through an adaptive threshold. As shown in the formula

[0021]

[0022] in represents candidate pixels, ⊙ represents element-wise multiplication, T adapt Indicates whether the adaptive threshold is consistent with the current prediction Related Tags The positive pixels in

[0023]

[0024] where h, w are the height and width of the input image and r is set to 0.15%. b is the minimum threshold, which is set to 0.5 here, and k is the control threshold growth rate. As increases, the threshold also increases, which can reduce the error accumulation of low-contrast targets and strong background clutter.

[0025] Each updated label obtained will replace the initial Point Label for subsequent label updates, and then be input into the Decoder in the Unet in the diffusion model to guide the generation of images.

[0026] For the class mask attention module such as Figure 3 As shown. We first input the class mask information into the shared multi-layer perceptron module (shared_conv). This shared multi-layer perceptron consists of a convolutional layer and a ReLU activation function. The role of the convolutional layer is to map the input class mask conditional information from the cell type dimension (label_nc) to the hidden layer dimension (nhidden). Here label_nc represents the dimension of the cell type, and nhidden represents the dimension of the hidden layer. Next, the output hidden representation will be passed to the Gconv and Bconv modules. These modules map the hidden representation to the dimension of the output space (norm_nc). Specifically, Gconv and Bconv generate gamma and beta parameters, respectively, which will be used for subsequent conditional normalization operations. Therefore, through this process, we can effectively use the input class mask information to generate gamma and beta parameters, thereby providing the necessary parameters for subsequent conditional normalization operations. Then the output X is obtained by the formula out :

[0027] X out =X in *(1+gamma)+beta (3)

[0028] X in It represents the extracted feature map.

[0029] Next, we input the hidden representations obtained from the shared multi-layer perceptron module into the linear layer to obtain the query (Q), key (K), and value (V) vectors for subsequent self-attention mechanism calculations. Finally, we compare the images generated by the diffusion model with the actual images. The network uses the mean squared error (MSE) as the loss function for network training.

[0030] In order to fairly evaluate the generation effect of the model, we will use the two indicators FID (Frechet Inception Distance) and IS (Inception Score). FID is used to evaluate the similarity between the generated image and the real image. It calculates the Frechet distance between the feature distribution of the generated image and the feature distribution of the real image. IS is used to evaluate the diversity and quality of the generated images. It measures diversity and authenticity by calculating the entropy of the category distribution of the generated image and the KL divergence of the conditional distribution.

[0031] FID=||μ r -μ g || 2 +Tr(∑ r +∑ g -2(∑ r ∑ g ) 1 / 2 ) (4)

[0032] IS g =exp(E x~p D KL (p(y|x)||p(y))) (5)

[0033] The smaller the FID, the more similar the generated image is to the real image, while the larger the IS, the higher the diversity and authenticity of the generated image. Therefore, for the evaluation of the model, we hope that the FID is as small as possible and the IS is as large as possible to ensure that the generated images have both high similarity and rich diversity.

[0034] Based on the existing medical image generation model, we conducted experiments and found some problems. In response to these problems, we proposed corresponding improvement plans and conducted experimental verification. The results show that the improved modules we proposed can more effectively improve the performance of the network in generating medical images. It is worth noting that these improved modules can not only be directly applied to the current medical image generation network, but can also be easily embedded in other medical image generation networks to achieve a plug-and-play effect. These improvements not only help doctors treat diseases, but also provide beneficial support for research in the medical field.

[0035] It should be noted that the above is only an embodiment of the present invention, which is only to explain the present invention and does not limit the patent scope of the present invention. Any obvious changes that belong to the technical concept of the present invention are also within the protection scope of the present invention.

Claims

1. A medical image generation algorithm based on a diffusion model of label evolution and class mask self-attention, characterized in that: The steps include: (1) Obtain a total of 384 Lizard datasets commonly used in medical image generation, and divide them into training set, test set and validation set according to the ratio of 7:2:1 and randomly divide them five times; (2) Perform data preprocessing and crop each image in the lizard dataset to split it into 10 small images; (3) Select a suitable point label evolution network model that can update the point labels in the lizard dataset and pre-train a model that can achieve ideal results. (4) Design a medical image generation network based on a diffusion model of label evolution and class complement self-attention. Each time the updated label output by the point label evolution module is input into the Decoder part of the Unet, the Unet network is used to generate diverse images based on the gradually updated label information. At the same time, in order to ensure the category of generated cells, we propose a class mask self-attention module to fuse the information of cell classes. The combination of the two modules is used to guide the generation of diverse cell images; (5) Conduct multiple experiments to explore the optimal network parameters and use FID and IS evaluation indicators to evaluate the model; (6) Design ablation experiments to explore the effectiveness of each module and the specific problems it solves.

2. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: According to the step (1), the Lizard dataset commonly used in the field of medical images is selected. In order to verify the effectiveness of the model, we perform five cross-validations and calculate the average value.

3. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: According to step (2), we crop each image in the dataset into 10 small images.

4. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: According to step (3), we selected a suitable point label evolution network, performed label diffusion on the point labels in the Lizard dataset, and pre-trained a suitable model.

5. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: According to step (4), we will send the mask label corresponding to the point label to a feature map extraction network (here we use the Unet network to extract features) to obtain the feature map corresponding to the mask label. According to the centroid in the point label, the local neighborhood candidate pixels are extracted through an adaptive threshold. Each updated label will replace the initial point label for subsequent label updates, and then input into the decoder in the Unet in the diffusion model to guide the generation of images. In addition, we input the class mask information into the shared multi-layer perceptron module (shared_conv). This shared multi-layer perceptron consists of a convolutional layer and a ReLU activation function. The role of the convolutional layer is to map the input class mask conditional information from the cell type dimension (label_nc) to the hidden layer dimension (nhidden). Here label_nc represents the dimension of the cell type, and nhidden represents the dimension of the hidden layer. Next, the output hidden representation will be passed to the Gconv and Bconv modules. These modules map the hidden representation to the dimension of the output space (norm_nc). Specifically, Gconv and Bconv generate gamma and beta parameters, respectively, which will be used in subsequent conditional normalization operations. Therefore, through this process, we can effectively use the input class mask information to generate gamma and beta parameters, thereby providing the necessary parameters for subsequent conditional normalization operations.

6. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: In step (5), we use indicators such as FID and IS to evaluate the performance of the network.

7. The medical image generation algorithm based on the diffusion model of label evolution and class mask self-attention as claimed in claim 1, characterized in that: In step (6), we conducted ablation experiments on our proposed class mask and label evolution modules to evaluate the effectiveness of each module.

Citation Information

Patent Citations

  • Small sample image classification method based on feature adaptation

    CN114898136A

  • Breast medical image segmentation method based on improved U-net network

    CN116580202A

  • Medical image segmentation method based on u-net

    US20220309674A1