Medical image generation method, model training method, device, equipment and medium

By obtaining the label and structural information of medical images and using pre-trained models to automatically generate images, it solves the problem of high annotation costs in the existing technology and improves the performance of medical image generation and recognition models.

CN116402913BActive Publication Date: 2024-09-20BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310341777.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2024-09-20
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

Existing medical image recognition model training requires a large amount of annotated data, resulting in high data collection and annotation costs, which limits model performance.

Method used

By obtaining the label information and structural information of medical images, and using pre-trained medical image generation models, medical images carrying label information and structural information are automatically generated, reducing manual collection and labeling of data, and improving generation efficiency.

Benefits of technology

It reduces the cost of medical image generation, improves generation efficiency and accuracy, supports the generation of large amounts of data, and improves the performance of medical image recognition models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402913B
    Figure CN116402913B
Patent Text Reader

Abstract

The present disclosure provides a method for generating a medical image, a model training method, an apparatus, a device and a medium, which relate to technical fields such as machine learning, smart medical care, and image processing. The specific implementation scheme includes: obtaining at least one label information of the medical image to be generated; obtaining the structural information of at least one dimension of the medical image to be generated; based on the at least one label information of the medical image to be generated, the structural information of at least one dimension and a pre-trained medical image generation model, generating the medical image, wherein the medical image carries the at least one label information and adopts the structural information of each dimension. The technology disclosed in the present disclosure can effectively improve the efficiency of medical image generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, specifically to the technical fields of machine learning, smart medicine, and image processing, and in particular to a medical image generation method, model training method, device, equipment and medium. Background Art

[0002] With the continuous development and progress of medical imaging technology and computer technology, medical image recognition has become an indispensable tool and technical means in medical research, clinical disease diagnosis and treatment. Many patients have been diagnosed and treated in the early stages of the disease thanks to medical image recognition and screening technology.

[0003] In recent years, deep learning (DL) and convolutional neural networks (CNN) have rapidly developed into a research hotspot for automated medical image analysis. Usually, relevant annotated data can be collected to train the medical image recognition model so that the medical image recognition model can learn relevant capabilities. Summary of the invention

[0004] The present disclosure provides a medical image generation method, model training method, device, equipment and medium.

[0005] According to one aspect of the present disclosure, a method for generating a medical image is provided, comprising:

[0006] Acquire at least one label information of the medical image to be generated;

[0007] Acquiring structural information of at least one dimension of the medical image to be generated;

[0008] Based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension and a pre-trained medical image generation model, the medical image is generated, wherein the medical image carries the at least one label information and adopts the structural information of each dimension.

[0009] According to another aspect of the present disclosure, a method for training a medical image generation model is provided, comprising:

[0010] Extracting a sample image from an image data set, and obtaining at least one label information of the sample image and structural information of at least one dimension of the sample image;

[0011] Based on the sample image and the randomly selected time step t, obtaining a noise image at the tth moment and a noise image at the t+1th moment after adding noise to the sample image;

[0012] The medical image generation model is trained using at least one label information of the sample image, structural information of at least one dimension of the sample image, a noise image at time t, and a noise image at time t+1.

[0013] According to another aspect of the present disclosure, there is provided a device for generating a medical image, comprising:

[0014] A label acquisition module, used to acquire at least one label information of the medical image to be generated;

[0015] A structure acquisition module, used to acquire structural information of at least one dimension of the medical image to be generated;

[0016] A generation module is used to generate the medical image based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension and a pre-trained medical image generation model, wherein the medical image carries the at least one label information and adopts the structural information of each dimension.

[0017] According to another aspect of the present disclosure, a training device for a medical image generation model is provided, comprising:

[0018] A sample information acquisition module, used to extract a sample image from the image data set, and obtain at least one label information of the sample image and at least one dimension of structural information of the sample image;

[0019] A noise image acquisition module, used for acquiring, based on the sample image and a randomly selected time step t, a noise image at the tth moment and a noise image at the t+1th moment after the sample image is subjected to noise processing;

[0020] A training module is used to train the medical image generation model by using at least one label information of the sample image, structural information of at least one dimension of the sample image, the noise image at the tth moment and the noise image at the t+1th moment.

[0021] According to yet another aspect of the present disclosure, there is provided an electronic device, including:

[0022] at least one processor; and

[0023] a memory communicatively connected to the at least one processor; wherein,

[0024] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any possible implementation manner and the aspects described above.

[0025] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method of the above-mentioned aspect and any possible implementation manner.

[0026] According to yet another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements the above-mentioned aspects and the method of any possible implementation manner.

[0027] According to the technology disclosed in the present invention, the efficiency of generating medical images can be effectively improved. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0029] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0030] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;

[0031] Figure 3 is a working principle diagram of a medical image generation model provided in this embodiment;

[0032] Figure 4 is a schematic diagram according to a third embodiment of the present disclosure;

[0033] Figure 5 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0034] Figure 6 is a schematic diagram according to a fifth embodiment of the present disclosure;

[0035] Figure 7 is a schematic diagram according to a sixth embodiment of the present disclosure;

[0036] Figure 8 is a schematic diagram according to a seventh embodiment of the present disclosure;

[0037] Fig. 9 is a schematic diagram according to an eighth embodiment of the present disclosure;

[0038] Fig.10 The block diagram is a block diagram of an electronic device for implementing the method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0040] Obviously, the described embodiments are only part of the embodiments of the present disclosure, but not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.

[0041] It should be noted that the terminal devices involved in the embodiments of the present disclosure may include but are not limited to mobile phones, personal digital assistants (PDAs), wireless handheld devices, tablet computers and other smart devices; display devices may include but are not limited to personal computers, televisions and other devices with display functions.

[0042] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0043] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure; Figure 1 As shown, this embodiment provides a method for generating a medical image, which may specifically include the following steps:

[0044] S101, obtaining at least one label information of a medical image to be generated;

[0045] S102, obtaining structural information of at least one dimension of the medical image to be generated;

[0046] S103: Generate a medical image based on at least one label information of the medical image to be generated, at least one dimension of structural information, and a pre-trained medical image generation model. The medical image carries at least one label information and uses structural information of each dimension.

[0047] Each label information of the medical image of this embodiment is used to identify the attribute information of one dimension of the medical image. A medical image can have one or more than two label information; and multiple label information are not mutually exclusive. Each label information can have categories, but multiple categories are mutually exclusive. For example, taking the medical image as a fundus image, the fundus image can include multiple label information, such as one of the label information is used to identify whether there is macular lesion; the label information can have two categories, 0 can be used to indicate no macular lesion, and 1 can be used to indicate macular lesion. There is also a label information that can be used to identify the level of diabetic retinopathy; the label information can have 5 categories, which are identified by 0, 1, 2, 3, and 4 respectively, 0 indicates the lowest level of the lesion, and as the value increases, the higher the level, 4 indicates the highest level of the lesion. In practical applications, the fundus image also includes other label information, and each other label information can have at least two categories, which will not be repeated here.

[0048] In practical applications, the condition set C = {c1, c2, ..., c N} represents a set of label information, c1, c2, ..., c N Each tag information represents a tag information, and each tag information can have at least two categories.

[0049] The structural information of at least one dimension of the medical image of this embodiment can describe the structure of the medical image from different dimensions. For example, still taking the fundus image as an example, the structural information of one dimension can be the structural information of the fundus blood vessels; the structural information of another dimension can be the structural information of the fundus macula position; in actual applications, the structural information of other dimensions can also be included, which will not be repeated here.

[0050] In this embodiment, a medical image generation model can be pre-trained, and when generating a medical image, at least one label information and at least one dimension of structural information required for the medical image to be generated are input into the medical image generation model. The medical image generation model can generate a medical image carrying at least one label information and using structural information of each dimension based on the input information, and output it.

[0051] It should be noted that the above-mentioned medical images are fundus images as an example. In actual applications, the medical images can be images of any other parts in the existing medical field, such as the abdomen, head, etc., which are not limited here.

[0052] In the existing technology, the training of medical image recognition models requires relying on a large amount of labeled data. However, in practical applications, the acquisition of labeled data requires high data collection and labeling costs, which limits the amount of labeled data and, in turn, limits the performance of the medical image recognition model.

[0053] By adopting the method for generating medical images of this embodiment, only based on at least one label information and at least one dimension of structural information of the medical image to be generated, a pre-trained medical image generation model can be used to generate the corresponding medical image. In this way, manual collection and labeling of medical image data can be avoided, effectively reducing the cost of generating medical images.

[0054] The method for generating medical images of this embodiment, by adopting the above-mentioned technical solution, can automatically generate corresponding medical images based on at least one label information of the medical image to be generated and the structural information of at least one dimension, using a pre-trained medical image generation model. The way of generating medical images is very intelligent and efficient, and can support the generation of a large amount of medical image data. Compared with the manual collection and annotation of medical image data in the prior art, it can effectively reduce labor costs, improve the efficiency of generating medical image data, and effectively ensure the accuracy of the generated medical images. Moreover, by adopting the method of this embodiment, a large amount of medical image data can be generated very conveniently, quickly and efficiently, and further, the medical image recognition model can be trained based on the generated medical image data, thereby effectively improving the performance of the trained medical image recognition model.

[0055] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure; this embodiment provides a method for generating a medical image, in the above Figure 1 Based on the technical solutions of the embodiments shown in the figure, the technical solutions of the present disclosure are further described in more detail. Figure 2 As shown, the method for generating a medical image in this embodiment may specifically include the following steps:

[0056] S201, obtaining at least one label information of a medical image to be generated;

[0057] At least one label information of the medical image can be configured according to the training data required by the medical image recognition model. For example, when it is necessary to train a medical image recognition model that recognizes multiple categories of preset labels, the medical image to be generated can be configured to carry the information of the corresponding preset label. Specifically, a medical image can only carry information of one category of the preset label. For example, still taking the medical image as a fundus image as an example, the preset label is a label that identifies the grade of diabetic retinopathy, and the specific label information needs to specifically identify the level of diabetic retinopathy, such as 0, 1, 2, 3, or 4. In actual applications, when generating medical image data for training a medical image recognition model that recognizes preset labels, medical images of each level of the preset label can be generated separately.

[0058] In order to improve the efficiency of medical image generation, in this embodiment, the same medical image can carry one or more than two label information. And when at least two label information are included, each label information describes the attributes of the medical image from different dimensions. In actual application scenarios, the same patient does have different symptoms. For example, the same fundus image may not only have macular lesions, but also diabetic retinopathy level 3. Therefore, in this embodiment, the medical image to be generated is configured with more than two label information, which is very consistent with actual medical scenarios.

[0059] S202, obtaining structural information of at least one dimension of the medical image to be generated;

[0060] The medical image to be generated in this embodiment may include structural information of one dimension, or may include structural information of two or more dimensions. For example, still taking the medical image as a fundus image as an example, the structural information of at least one dimension may include fundus vascular information, may also include macula position information, and of course may also include various information of other dimensions. In this embodiment, structural information of at least one dimension may be configured for the medical image to be generated. For information of other dimensions not specified in the medical image, the default information may be used.

[0061] S203, acquiring label features of the medical image based on at least one label information of the medical image and a label expression module in the medical image generation model;

[0062] S204, acquiring structural features of each dimension based on structural information of at least one dimension of the medical image and a structural expression module in the medical image generation model;

[0063] S205 , generating a medical image based on the label features of the medical image, the structural features of each dimension, and the image generation module in the medical image generation model.

[0064] In this embodiment, a medical image generation model including a label expression module, a structure expression module and an image generation module is taken as an example.

[0065] The label expression module in this embodiment can be represented by a two-dimensional matrix, and each row in the two-dimensional matrix corresponds to a feature of the label information. The number of rows in the two-dimensional matrix can be equal to the set of label information C = {c1, c2, ..., c N} in which c1, c2, …, c N The sum of all categories of M. The number of columns is a preset fixed value and is not limited here. The parameter value of each position in the two-dimensional matrix can be learned during pre-training.

[0066] If at least one label information includes more than two label information, then based on the label information of the medical image, the features corresponding to each label information can be obtained from the two-dimensional matrix of the label expression module; then the features corresponding to each label information of the medical image are accumulated by column as the label features of the medical image.

[0067] For example, Figure 3 is a working principle diagram of a medical image generation model provided in this embodiment. Figure 3 As shown, take the input label information including 3 as an example, the first label information is c1, where c1 can take the value 0 or 1. Figure 3 Take c1=0 as an example. The second tag information is c2, where c2 can take values ​​0, 1, 2, 3 or 4. Figure 3 Take c2=3 as an example. The third tag information is c3, where c3 can take the value 0, 1, or 2. Figure 3 Take c3=2 as an example. Figure 3 In the example, the set of label information is C = {c1, c2, c3}, and the sum of all categories of c1, c2, c3 is M = 2 + 5 + 3 = 10. That is, the two-dimensional matrix corresponding to the label expression module includes 10 rows. Each row corresponds to a feature of a category of label information. Figure 3 As shown in the figure, the first row is the feature of c1=0, the second row is the feature of c1=1, the third to seventh rows are the features of c2=0, c2=1, c2=2, c2=3, c2=4, and the eighth to tenth rows are the features of c3=0, c3=1, c3=2. Therefore, for c1=0, c2=3, and c3=2, the features of the first row, the sixth row, and the ninth row can be taken from the two-dimensional matrix respectively. Then the three features obtained are accumulated by column as the label features of the medical image.

[0068] Of course, optionally, in practical applications, the three features obtained can be combined together according to other mathematical calculation methods as label features of medical images, which is not limited here.

[0069] By adopting the above method, the features of each label information in at least one label information of the medical image can be accurately and efficiently obtained according to the pre-learned label expression module, and then the label features of the medical image can be accurately and efficiently obtained.

[0070] The structural expression module of this embodiment is implemented using a CNN model. In specific implementation, the structural information of each dimension of the medical image can be input into the structural expression module respectively, and the structural features of each dimension output by the structural expression module can be obtained respectively.

[0071] That is to say, the structural features of each dimension are obtained separately, and the structural information of the dimension is input into the structural expression model. The structural expression model can then predict and output the structural features of the dimension based on the input information.

[0072] For example, Figure 3 In the example, the structural information including two dimensions is taken as an example, and Figure 3 In the example, the generated medical image is a fundus image, in which the two dimensions of structural information are fundus vascular structure and macular position structure. When used, the fundus vascular structure and macular position structure are respectively input into the structure expression module, and the structure expression module can respectively predict and output the features of the fundus vascular structure and the features of the macular position structure.

[0073] By adopting the above method, the structural features of each dimension of the medical image can be accurately and efficiently acquired according to the pre-trained structural expression module.

[0074] Further, in an embodiment of the present disclosure, the specific implementation of step S205 may include the following steps:

[0075] (1) Obtain the category features of medical images based on the label features and structural features of each dimension of medical images;

[0076] For example, in this embodiment, the label features of the medical image and the structural features of each dimension are expressed in the form of vectors. Specifically, the label features of the medical image and the structural features of each dimension can be accumulated by column as the category features of the medical image. In this way, the category features of the medical image can be accurately and efficiently obtained.

[0077] Optionally, in practical applications, other mathematical operations may be performed based on the label features of the medical image and the structural features of each dimension to obtain the category features of the medical image, which is not limited here.

[0078] (2) Generate medical images based on the category characteristics of medical images and the image generation module in the medical image generation model.

[0079] For example, the image generation module in this embodiment is implemented using a conditional diffusion model. In specific implementation, step (2) may include: firstly, performing random sampling based on a standard Gaussian distribution of a preset noise intensity to obtain input data; and then, based on the input data, the category characteristics of the medical image, the time step corresponding to the preset noise intensity, and the pre-trained image generation module, obtaining the medical image predicted by the image generation module.

[0080] In practical applications, the conditional diffusion model needs to input not only the category features of the medical image to be generated, but also the data and the corresponding time step. The input data can be randomly sampled from a standard Gaussian distribution with a preset noise intensity. This preset noise intensity is related to the time step in the conditional diffusion model's de-noising process. The input data can be considered as a medical image with noise added. By iteratively denoising according to the time step, the medical image without noise can be restored.

[0081] For example, you can iterate step by step according to the following formula until you get x0:

[0082]

[0083] Where t is the time step, the value of t is between T and 1, T is the maximum time step in the noise adding process learned during training; when t>1, II represents random sampling from a standard Gaussian distribution; otherwise z t = 0. a t =1-β t , β t is a series of fixed values, t∈[1,T]. As an example, when T=1000, 1000 values ​​can be taken from the noise intensity between 0.0001 and 0.02 at equal intervals as β t For example, 0.0001 represents a smaller noise intensity, while 0.02 represents a larger noise intensity. In this embodiment, β is taken at equal intervals within the noise intensity interval between 0.0001 and 0.02. t For example, in actual applications, other reasonable noise intensity ranges can also be selected, which are not limited here.

[0084] Among them, ε θ (x t ,t,c) represents the conditional diffusion model, θ is the parameter of the conditional diffusion model, x t ,t,c is the input of the conditional diffusion model. When selecting input data, a β t , determine the corresponding preset noise intensity, and then randomly sample from the corresponding Gaussian distribution to obtain the corresponding input data x t Assuming the time step is T, randomly sampling from the standard Gaussian distribution, we can get Then, the conditional diffusion model is used to iteratively remove noise step by step according to the above formula until x0 is obtained, that is, the medical image with noise removed is obtained.

[0085] The working principle of the conditional diffusion model adopted by the image generation module of this embodiment can also be referred to the working principle of the conditional diffusion model in the related art in detail, and will not be described in detail here.

[0086] By adopting the above method, a conditional diffusion model can be used to remove noise and accurately and efficiently generate corresponding medical images based on the obtained category features and randomly sampled input data of arbitrary noise intensity, and with reference to the corresponding time step, perform multi-step iterations.

[0087] The label expression module, structure expression module and image generation module in the medical image generation model of this embodiment are jointly trained together. The whole composed of the three modules can also be used as an end-to-end model. The parameters of each position in the two-dimensional matrix corresponding to the label expression module need to be learned during the training process.

[0088] The medical image generation method of this embodiment, by using the above-mentioned label expression module, structure expression module and image generation module, can generate medical images very intelligently, efficiently and accurately, and the entire process does not require manual collection or labeling, which can effectively improve the efficiency of medical image generation and effectively ensure the accuracy of the generated medical images. Furthermore, the performance of the medical image recognition model trained with medical image data can also be improved.

[0089] Figure 4 is a schematic diagram according to the third embodiment of the present disclosure; this embodiment provides a training method for a medical image generation model, which may specifically include the following steps:

[0090] S401, extracting a sample image from an image data set, and obtaining at least one label information of the sample image and at least one dimension of structural information of the sample image;

[0091] The training method of the medical image generation model in this embodiment is to Figure 1-Figure 3 Training of the medical image generation model of the illustrated embodiment.

[0092] The at least one piece of label information of the sample image in this embodiment may be label information carried in the sample image obtained by identifying the sample image.

[0093] Similarly, the structural information of at least one dimension of the sample image can also be obtained by identifying the sample image to obtain the structural information carried in the sample image.

[0094] S402, based on the sample image and the randomly selected time step t, obtaining a noise image at the tth moment and a noise image at the t+1th moment after adding noise to the sample image;

[0095] This process is the process of adding noise to the sample image. The process of adding noise is implemented in an iterative manner. For example, the original sample image is processed with noise to obtain a noise image at the first moment; then the noise image at the first moment is processed with noise to obtain a noise image at the second moment; then the noise image at the second moment is processed with noise to obtain a noise image at the third moment; and so on. In this way, any noise image at the tth moment and any noise image at the t+1th moment can be obtained.

[0096] S403: Train a medical image generation model using at least one label information of a sample image, structural information of at least one dimension of the sample image, a noise image at time t, and a noise image at time t+1.

[0097] Since the noise image at the t+1th moment and the noise image at the tth moment are obtained by adding noise to a sample image having at least one label information and at least one dimension of structural information, the noise image at the t+1th moment and the noise image at the tth moment also have at least one label information and at least one dimension of structural information.

[0098] The training of this step can enable the medical image generation model to learn to predict the denoising ability of restoring the noisy image at the t+1th moment with at least one label information and at least one dimension of structural information to the noisy image at the tth moment. In this embodiment, t can be set according to demand, for example, it can be any value between 1 and T. Wherein T is the maximum noise-added time step set in the training. For example, it can be 1000, 2000 or other values, which are not limited here.

[0099] The training of the medical image generation model in the above steps S401-S403 of this embodiment can be a round of training, or a cyclic training. In practical applications, according to the above steps of this embodiment, a large number of trainings can be performed, so that the medical image recognition model can learn the denoising ability of restoring the noise image at the t+1th moment of arbitrary label information and structural information to the noise image at the tth moment. Moreover, t can be a time step between 1 and T. Based on this, the medical image recognition model can learn the noise image at any tth moment of arbitrary label information and structural information, and after multiple rounds of step-by-step iterations, remove the noise to obtain a noise-free medical image.

[0100] The training method of the medical image generation model of this embodiment, by adopting the above scheme, can use at least one label information of the sample image, the structural information of at least one dimension of the sample image, the noise image at the tth moment and the noise image at the t+1th moment to train the medical image generation model, so that the medical image generation model can learn the denoising ability of restoring any noise image at the t+1th moment to the noise image at the tth moment, and then can learn the ability to restore noise-free medical images based on noisy noisy images. It can also support medical images with any at least one label information and any at least one dimension of structural information, which can effectively improve the performance of the trained medical image generation model. Therefore, the technical solution of this embodiment can train the medical image generation model very efficiently and accurately, so that the accuracy of the trained medical image generation model is also very high. Further, based on the accurate and efficient medical image generation model trained in this embodiment, the generation efficiency of medical images can be further improved.

[0101] Figure 5 is a schematic diagram according to the fourth embodiment of the present disclosure; the training method of the medical image generation model of this embodiment, in the above Figure 4 Based on the technical solutions of the embodiments shown in the figure, the technical solutions of the present disclosure are further described in more detail. Figure 5 As shown, the training method of the medical image generation model of this embodiment may specifically include the following steps:

[0102] S501, extracting a sample image from an image data set, and obtaining at least one label information of the sample image and at least one dimension of structural information of the sample image;

[0103] S502, based on the sample image and the randomly selected time step t, obtaining a noise image at the tth moment and a noise image at the t+1th moment after the sample image is subjected to noise processing;

[0104] For example, for a randomly selected time step t∈[1,T], T may be the maximum time step selected according to the actual scenario. In actual application scenarios, it may be 1000, 2000 or other values.

[0105] Specifically, the noise image after noise addition at time t can be calculated according to the following formula:

[0106]

[0107] Among them, x~q represents the sample x sampled from the probability distribution q t ; Due to x t After multiple steps of noise superposition, enough noise has been superimposed to make it look like a random noise sample drawn from a Gaussian distribution q, so this method is used to represent xt . The mean is μ and the variance is σ 2 Gaussian distribution; II represents random sampling from standard Gaussian distribution; a t =1-β t , β t is a series of fixed values, t∈[1,T], where β t represents the noise intensity, a t and As an example, when T=1000, 1000 values ​​can be taken from the noise intensity between 0.0001 and 0.02 at equal intervals as β t For example, 0.0001 represents a smaller noise intensity, while 0.02 represents a larger noise intensity. In this embodiment, β is taken at equal intervals within the noise intensity interval between 0.0001 and 0.02. t For example, in actual applications, other reasonable noise intensity ranges can also be selected, which are not limited here.

[0108] In this way, the noise image x at time t can be obtained t and the noise image x at time t+1 t+1 Specifically, it is also possible to refer to the training of the conditional diffusion model in the related prior art, based on the original image x0, gradually and iteratively add noise to generate the noise image x at the tth moment t The implementation principle.

[0109] S503, using a label expression module in a medical image generation model to obtain a label feature of the sample image based on at least one label information of the sample image;

[0110] When implementing this step, please refer to the above Figure 2 The process of obtaining the label features of the medical image in the illustrated embodiment will not be described in detail here.

[0111] In this embodiment, the medical image generation model adopts the above Figure 3 Taking the structure of the embodiment shown as an example, Figure 3 As shown, the medical image generation model includes a label expression module, a structure expression module and an image generation module. As described in the above embodiment, the label expression module is identified by a two-dimensional matrix, and the parameters of each position in the two-dimensional matrix are learnable during the training process. At the beginning of training, an initial value can be randomly assigned to each position in the two-dimensional matrix of the label expression module. During the training process, continuous learning and continuous adjustment are carried out to make the parameters of each position in the two-dimensional matrix more reasonable, that is, the features of each category corresponding to each label information in the two-dimensional matrix are more reasonable.

[0112] S504, using a structure expression module in a medical image generation model to obtain structural features of each dimension of the sample image based on structural information of at least one dimension of the sample image;

[0113] When implementing this step, please refer to the above Figure 2 The process of acquiring the structural features of each dimension of the medical image in the illustrated embodiment will not be described in detail here.

[0114] The structural expression model of this embodiment is implemented using the CNN model.

[0115] S505, using an image generation module in a medical image generation model, based on label features of the sample image, structural features of each dimension, and the noise image at the t+1th moment and the noise image at the tth moment, predicting the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment;

[0116] For example, the category features of the sample image can be obtained based on the label features of the sample image and the structural features of each dimension; for details, please refer to the above Figure 2 In the illustrated embodiment, the process of acquiring the category features of the medical image will not be described in detail here.

[0117] Furthermore, the image generation module in the medical image generation model is used to generate the image based on the category features of the sample image and the noise image x at the t+1th moment. t+1 and the noise image x at time t t , predict the noise image x at time t+1 t+1 Restore the noise image x at time t t The estimated noise that needs to be removed.

[0118] The image generation module of this embodiment is implemented using a conditional diffusion model.

[0119] S506, obtaining the noise image at time t+1 and restoring it to the noise image at time t, and the real noise to be removed;

[0120] The noise image x at the t+1th moment in this embodiment t+1 Restore the noise image x at time t t The real noise that needs to be removed can be obtained based on the real noise added during the noise adding process.

[0121] S507, constructing a loss function based on the estimated noise and the actual noise;

[0122] In this embodiment, the constructed loss function can be constructed based only on the estimated noise and the actual noise predicted by the conditional diffusion model.

[0123] Consider a diffusion model with parameters θ and output a guess of the estimated noise that can be expressed as ε θ (x t ,t,c), calculate the gradient of θ as the loss function according to the following formula:

[0124]

[0125] S508. Based on the loss function, adjust the parameters of the label expression module, the structure expression module and the image generation module in the medical image generation model so that the value of the loss function is reduced.

[0126] That is to say, during the training process, the parameters of the label expression module, the structure expression module and the image generation module in the medical image generation model are adjusted in the direction of the gradient decrease of the loss function. According to the above steps of this embodiment, the impact generation model is repeatedly trained until the gradient of the loss function no longer decreases, that is, the loss function converges, and the training can be terminated at this time.

[0127] Based on the above, it can be qualitatively said that the conditional diffusion model is to guess the noise image x at the t+1th moment based on the time step t and the category features. t+1 Relative to the noise image x at time t t The noise added is used to obtain the estimated noise. The mean square error is calculated based on the guessed estimated noise and the added real noise as the loss function. And in the direction of convergence of the loss function, the parameters of the label expression module, structure expression module and image generation module in the medical image generation model are adjusted. In the above manner, the medical image generation model is continuously trained until the loss function converges, and the parameters of the label expression module, structure expression module and image generation module can be determined, thereby determining the medical image generation model.

[0128] The training method of the medical image generation model of this embodiment, by adopting the above-mentioned scheme, can enable the label expression module in the medical image generation model to express the characteristics of the label very accurately; can enable the structural feature expression module in the medical image generation model to express the characteristics of the structure efficiently and accurately; can also enable the image generation module in the medical image generation model to generate medical images efficiently and accurately; thereby obtaining a medical image generation model with very high accuracy.

[0129] The image generation module in the medical image generation model of this embodiment can be implemented using a conditional diffusion model. Through the above training process, the conditional diffusion model can make the estimated noise of the noise image fit the real noise as much as possible, and then when applied, based on the learned ability, the noise image can be removed to efficiently and accurately generate a noise-free medical image. Therefore, through the training method of this embodiment, the accuracy of the medical image generation model obtained is very high, and the performance of generating medical images is very good. Furthermore, based on the accurate and efficient medical image generation model trained in this embodiment, the efficiency of generating medical images can be further improved.

[0130] Figure 6 is a schematic diagram according to the fifth embodiment of the present disclosure; Figure 5 As shown, this embodiment provides a medical image generation device 600, including:

[0131] The label acquisition module 601 is used to acquire at least one label information of the medical image to be generated;

[0132] A structure acquisition module 602 is used to acquire structural information of at least one dimension of the medical image to be generated;

[0133] The generation module 603 is used to generate the medical image based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension and the pre-trained medical image generation model, wherein the medical image carries the at least one label information and adopts the structural information of each dimension.

[0134] The medical image generation device 600 of this embodiment uses the above modules to achieve the realization principle and technical effect of medical image generation, which is the same as the realization of the above related method embodiments. For details, please refer to the records of the above related method embodiments, which will not be repeated here.

[0135] Figure 7 is a schematic diagram according to the sixth embodiment of the present disclosure; Figure 7 As shown, this embodiment provides a medical image generation device 700, including: Figure 6 The modules with the same name and function are shown as follows: a label acquisition module 701 , a structure acquisition module 702 , and a generation module 703 .

[0136] In one embodiment of the present disclosure, the generating module 703 includes:

[0137] A label feature acquisition unit 7031 is used to acquire the label feature of the medical image based on the at least one label information of the medical image and the label expression module in the medical image generation model;

[0138] A structural feature acquisition unit 7032, configured to acquire structural features of each dimension based on the structural information of the at least one dimension of the medical image and a structural expression module in the medical image generation model;

[0139] The image generation unit 7033 is used to generate the medical image based on the label features of the medical image, the structural features of each dimension and the image generation module in the medical image generation model.

[0140] Further optionally, in one embodiment of the present disclosure, the image generation unit 7033 is used to:

[0141] Based on the label features of the medical image and the structural features of each dimension, obtaining the category features of the medical image;

[0142] The medical image is generated based on the category features of the medical image and the image generation module in the medical image generation model.

[0143] Further optionally, in one embodiment of the present disclosure, the image generation module is implemented using a conditional diffusion model;

[0144] The image generation unit 7033 is used for:

[0145] Perform random sampling based on a standard Gaussian distribution with a preset noise intensity to obtain input data;

[0146] Based on the input data, the category characteristics of the medical image, the time step corresponding to the preset noise intensity, and the image generation module, the medical image predicted by the image generation module is obtained.

[0147] Further optionally, in an embodiment of the present disclosure, the label features of the medical image and the structural features of each dimension are expressed in the form of vectors; the image generation unit 7033 is used to:

[0148] The label features of the medical image and the structural features of each dimension are accumulated in columns as the category features of the medical image.

[0149] Further optionally, in an embodiment of the present disclosure, the label expression module is represented by a two-dimensional matrix, and each row corresponds to a feature of the label information; the label feature acquisition unit 7031 is used to:

[0150] If more than two label information are included, based on each label information of the medical image, a feature corresponding to each label information is obtained from the two-dimensional matrix of the label expression module;

[0151] The features corresponding to the label information of the medical image are accumulated in columns as label features of the medical image.

[0152] Further optionally, in one embodiment of the present disclosure, the structure expression module is implemented using a convolutional neural network model;

[0153] The structural feature acquisition unit 7032 is used to:

[0154] The structural information of each dimension of the medical image is respectively input into the structural expression module, and the structural features of each dimension output by the structural expression module are respectively obtained.

[0155] The medical image generation device 700 of this embodiment uses the above modules to achieve the realization principle and technical effect of medical image generation, which is the same as the realization of the above related method embodiments. For details, please refer to the records of the above related method embodiments, which will not be repeated here.

[0156] Figure 8 is a schematic diagram according to the seventh embodiment of the present disclosure; Figure 8 As shown, this embodiment provides a training device 800 for a medical image generation model, including:

[0157] The sample information acquisition module 801 is used to extract a sample image from the image data set, and obtain at least one label information of the sample image and at least one dimension of structural information of the sample image;

[0158] The noise image acquisition module 802 is used to acquire the noise image at the tth moment and the noise image at the t+1th moment after the sample image is subjected to noise processing based on the sample image and the randomly selected time step t;

[0159] The training module 803 is used to train the medical image generation model by using at least one label information of the sample image, the structural information of at least one dimension of the sample image, the noise image at the tth moment and the noise image at the t+1th moment.

[0160] The training device 800 of the medical image generation model of this embodiment realizes the implementation principle and technical effect of the training of the medical image generation model by adopting the above-mentioned modules, which is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0161] Fig. 9 is a schematic diagram according to an eighth embodiment of the present disclosure; Fig. 9 As shown, this embodiment provides a training device 900 for a medical image generation model, comprising: Figure 8The modules with the same name and function are shown as follows: a sample information acquisition module 901 , a noise image acquisition module 902 , and a training module 903 .

[0162] like Fig. 9 As shown, in one embodiment of the present disclosure, the training module 903 includes:

[0163] The label feature acquisition unit 9031 is used to acquire the label feature of the sample image based on the at least one label information of the sample image by using the label expression module in the medical image generation model;

[0164] A structural feature acquisition unit 9032 is used to acquire structural features of each dimension of the sample image based on the structural information of the at least one dimension of the sample image by using the structural expression module in the medical image generation model;

[0165] The prediction unit 9033 is used to use the image generation module in the medical image generation model to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the label features of the sample image, the structural features of each dimension, the noise image at the t+1th moment and the noise image at the tth moment;

[0166] An acquisition unit 9034 is used to acquire the real noise that needs to be removed by restoring the noise image at the time t+1 to the noise image at the time t;

[0167] A construction unit 9035, configured to construct a loss function based on the estimated noise and the actual noise;

[0168] The adjustment unit 9036 is used to adjust the parameters of the label expression module, the structure expression module and the image generation module in the medical image generation model based on the loss function, so that the value of the loss function is reduced.

[0169] Further optionally, in one embodiment of the present disclosure, the prediction unit 9033 is used to:

[0170] Acquire category features of the sample image based on the label features of the sample image and the structural features of each dimension;

[0171] The image generation module in the medical image generation model is used to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the category characteristics of the sample image, the noise image at the t+1th moment, and the noise image at the tth moment.

[0172] The training device 900 of the medical image generation model of this embodiment realizes the implementation principle and technical effect of the training of the medical image generation model by adopting the above-mentioned modules, which is the same as the implementation of the above-mentioned related method embodiments. For details, please refer to the records of the above-mentioned related method embodiments, which will not be repeated here.

[0173] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0174] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0175] Fig.10 A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0176] like Fig.10 As shown, the device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0177] A number of components in the device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0178] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as the above-mentioned methods of the present disclosure. For example, in some embodiments, the above-mentioned methods of the present disclosure may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the above-mentioned methods of the present disclosure described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the above method of the present disclosure in any other appropriate manner (for example, by means of firmware).

[0179] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0180] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0181] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0182] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0183] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0184] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0185] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0186] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating a medical image, comprising: Acquire at least one label information of the medical image to be generated; Each of the label information is used to identify the attribute information of one dimension of the medical image; and when more than two label information are included, the more than two label information are not mutually exclusive, and each of the label information describes the attribute of the medical image to be generated from different dimensions; each of the label information has at least two categories, and the at least two categories are mutually exclusive; obtaining the structural information of at least one dimension of the medical image to be generated; when the structural information of at least one dimension includes more than two, the structure of the medical image can be described from different dimensions; Based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension, and a pre-trained medical image generation model, generate the medical image, wherein the medical image carries the at least one label information and adopts the structural information of each dimension; Based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension, and a pre-trained medical image generation model, the medical image is generated, wherein the medical image carries the at least one label information and adopts the structural information of each dimension, including: The at least one label information and the at least one dimensional structural information of the medical image to be generated are input into the medical image generation model. Based on the input information, the medical image generation model generates and outputs the medical image carrying the at least one label information and adopting the structural information of each dimension. The medical image generation model includes a label expression module, a structural expression module and an image generation module. The label expression module is used to obtain the label features of the medical image. The structural expression module is used to obtain the structural features of each dimension of the medical image.

2. The method according to claim 1, wherein: Generating the medical image based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension, and a pre-trained medical image generation model, comprising: Based on the at least one label information of the medical image and the label expression module in the medical image generation model, obtaining a label feature of the medical image; Based on the structural information of the at least one dimension of the medical image and the structural expression module in the medical image generation model, acquiring structural features of each dimension; The medical image is generated based on the label features of the medical image, the structural features of each of the dimensions, and the image generation module in the medical image generation model.

3. The method according to claim 2, wherein: Generating the medical image based on the label feature of the medical image, the structural features of each dimension, and the image generation module in the medical image generation model includes: Based on the label features of the medical image and the structural features of each dimension, obtaining the category features of the medical image; The medical image is generated based on the category features of the medical image and the image generation module in the medical image generation model.

4. The method according to claim 3, wherein: The image generation module is implemented using a conditional diffusion model; Generating the medical image based on the category features of the medical image and the image generation module in the medical image generation model includes: Perform random sampling based on a standard Gaussian distribution with a preset noise intensity to obtain input data; Based on the input data, the category characteristics of the medical image, the time step corresponding to the preset noise intensity, and the image generation module, the medical image predicted by the image generation module is obtained.

5. The method according to claim 3, wherein: The label features of the medical image and the structural features of each dimension are expressed in the form of a vector; based on the label features of the medical image and the structural features of each dimension, the category features of the medical image are obtained, including: The label features of the medical image and the structural features of each dimension are accumulated in columns as the category features of the medical image.

6. The method according to any one of claims 2 to 5, wherein: The label expression module is represented by a two-dimensional matrix, where each row corresponds to a feature of a label information; based on the at least one label information of the medical image and the label expression module in the medical image generation model, obtaining the label feature of the medical image includes: If more than two label information are included, based on each label information of the medical image, a feature corresponding to each label information is obtained from the two-dimensional matrix of the label expression module; The features corresponding to the label information of the medical image are accumulated in columns as label features of the medical image.

7. The method according to any one of claims 2 to 5, wherein: The structure expression module is implemented using a convolutional neural network model; Based on the structural information of the at least one dimension of the medical image and the structural expression module in the medical image generation model, the structural features of each dimension are obtained, including: The structural information of each dimension of the medical image is respectively input into the structural expression module, and the structural features of each dimension output by the structural expression module are respectively obtained.

8. A method for training a medical image generation model used in the method of any one of claims 1 to 7, comprising: Extracting a sample image from an image data set, and obtaining at least one label information of the sample image and structural information of at least one dimension of the sample image; Based on the sample image and the randomly selected time step t, obtaining a noise image at the tth moment and a noise image at the t+1th moment after adding noise to the sample image; The medical image generation model is trained using at least one label information of the sample image, structural information of at least one dimension of the sample image, a noise image at time t, and a noise image at time t+1.

9. The method according to claim 8, wherein: The medical image generation model is trained using at least one label information of the sample image, structural information of at least one dimension of the sample image, a noise image at time t, and a noise image at time t+1, including: Using the label expression module in the medical image generation model, based on the at least one label information of the sample image, obtain the label feature of the sample image; Using the structure expression module in the medical image generation model, based on the structure information of at least one dimension of the sample image, obtain the structure features of each dimension of the sample image; Using the image generation module in the medical image generation model, based on the label features of the sample image, the structural features of each dimension, the noise image at the t+1th moment and the noise image at the tth moment, predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment; Obtain the noise image at the time t+1 and restore it to the noise image at the time t, and the real noise that needs to be removed; Constructing a loss function based on the estimated noise and the actual noise; Based on the loss function, parameters of the label expression module, the structure expression module and the image generation module in the medical image generation model are adjusted so that the value of the loss function is reduced.

10. The method according to claim 9, wherein: The image generation module in the medical image generation model is used to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the label features of the sample image, the structural features of each dimension, the noise image at the t+1th moment, and the noise image at the tth moment, including: Acquire category features of the sample image based on the label features of the sample image and the structural features of each dimension; The image generation module in the medical image generation model is used to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the category characteristics of the sample image, the noise image at the t+1th moment, and the noise image at the tth moment.

11. A device for generating a medical image, comprising: A label acquisition module, used to acquire at least one label information of the medical image to be generated; Each of the label information is used to identify attribute information of one dimension of the medical image; and when more than two label information are included, the more than two label information are not mutually exclusive, and each of the label information describes the attribute of the medical image to be generated from different dimensions; each of the label information has at least two categories, and the at least two categories are mutually exclusive; A structure acquisition module, used to acquire structural information of at least one dimension of the medical image to be generated; when the structural information of at least one dimension includes two or more, the structure of the medical image can be described from different dimensions; A generating module, configured to generate the medical image based on the at least one label information of the medical image to be generated, the structural information of the at least one dimension, and a pre-trained medical image generation model, wherein the medical image carries the at least one label information and adopts the structural information of each dimension; The generation module is used to input the at least one label information and the structural information of the at least one dimension of the medical image to be generated into the medical image generation model. The medical image generation model generates the medical image carrying the at least one label information and adopting the structural information of each dimension based on the input information, and outputs it; the medical image generation model includes a label expression module, a structural expression module and an image generation module; the label expression module is used to obtain the label features of the medical image; the structural expression module is used to obtain the structural features of each dimension of the medical image.

12. The device according to claim 11, wherein The generating module comprises: A label feature acquisition unit, configured to acquire a label feature of the medical image based on the at least one label information of the medical image and a label expression module in the medical image generation model; A structural feature acquisition unit, configured to acquire structural features of each dimension based on the structural information of the at least one dimension of the medical image and a structural expression module in the medical image generation model; An image generation unit is used to generate the medical image based on the label features of the medical image, the structural features of each dimension, and the image generation module in the medical image generation model.

13. The device according to claim 12, wherein: The image generation unit is used to: Based on the label features of the medical image and the structural features of each dimension, obtaining the category features of the medical image; The medical image is generated based on the category features of the medical image and the image generation module in the medical image generation model.

14. The device according to claim 13, wherein: The image generation module is implemented using a conditional diffusion model; The image generation unit is used to: Perform random sampling based on a standard Gaussian distribution with a preset noise intensity to obtain input data; Based on the input data, the category characteristics of the medical image, the time step corresponding to the preset noise intensity, and the image generation module, the medical image predicted by the image generation module is obtained.

15. The device according to claim 13, wherein: The label features of the medical image and the structural features of each dimension are expressed in the form of vectors; the image generation unit is used to: The label features of the medical image and the structural features of each dimension are accumulated in columns as the category features of the medical image.

16. The device according to any one of claims 12 to 15, wherein: The label expression module is represented by a two-dimensional matrix, where each row corresponds to a feature of label information; the label feature acquisition unit is used to: If more than two label information are included, based on each label information of the medical image, a feature corresponding to each label information is obtained from the two-dimensional matrix of the label expression module; The features corresponding to the label information of the medical image are accumulated in columns as label features of the medical image.

17. The device according to any one of claims 12 to 15, wherein: The structure expression module is implemented using a convolutional neural network model; The structural feature acquisition unit is used to: The structural information of each dimension of the medical image is respectively input into the structural expression module, and the structural features of each dimension output by the structural expression module are respectively obtained.

18. A training device for a medical image generation model used in the device according to any one of claims 11 to 17, comprising: A sample information acquisition module, used to extract a sample image from the image data set, and obtain at least one label information of the sample image and at least one dimension of structural information of the sample image; A noise image acquisition module, used for acquiring, based on the sample image and a randomly selected time step t, a noise image at the tth moment and a noise image at the t+1th moment after the sample image is subjected to noise processing; A training module is used to train the medical image generation model by using at least one label information of the sample image, structural information of at least one dimension of the sample image, the noise image at the tth moment and the noise image at the t+1th moment.

19. The device according to claim 18, wherein: The training module comprises: A label feature acquisition unit, configured to acquire a label feature of the sample image based on the at least one label information of the sample image by using a label expression module in the medical image generation model; A structural feature acquisition unit, configured to acquire structural features of each dimension of the sample image based on structural information of at least one dimension of the sample image by using a structural expression module in the medical image generation model; A prediction unit, configured to use an image generation module in the medical image generation model to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the label features of the sample image, the structural features of each dimension, the noise image at the t+1th moment and the noise image at the tth moment; An acquisition unit, used for acquiring the real noise to be removed from the noise image at the time t+1 and restoring it to the noise image at the time t; A construction unit, configured to construct a loss function based on the estimated noise and the real noise; An adjustment unit is used to adjust parameters of the label expression module, the structure expression module and the image generation module in the medical image generation model based on the loss function so that the value of the loss function is reduced.

20. The device according to claim 19, wherein The prediction unit is used for: Acquire category features of the sample image based on the label features of the sample image and the structural features of each dimension; The image generation module in the medical image generation model is used to predict the estimated noise that needs to be removed to restore the noise image at the t+1th moment to the noise image at the tth moment based on the category characteristics of the sample image, the noise image at the t+1th moment, and the noise image at the tth moment.

21. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7 or 8-10.

22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7 or 8-10.

23. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1-7 or 8-10.