Denoising diffusion model-based sample image generation method and device
Through the sample image generation method based on the denoising diffusion model, the sample image is generated using outline labels and category labels, and the problem of difficult sample generation and lack of authenticity in the prior art is solved, and high-quality and efficient sample image generation is achieved.
Patent Information
- Application Number
- CN202411837473.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art has problems of difficulty and lack of authenticity when generating difficult samples, resulting in limited application accuracy of cell detection and classification models.
A sample image generation method based on the denoising diffusion model is adopted. By obtaining contour labels and category labels, a sample image generation model is constructed, and the noise image is decoded and classified using the model to generate sample images and classification results.
The quality and generation efficiency of sample images are improved, and the generated sample images are more diverse and authentic, which enhances feature representation ability and improves the application accuracy of cell detection and classification models.
Smart Images

Figure CN119888243A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing and digital pathology, and in particular to a method and device for generating a sample image based on a denoising diffusion model. Background Art
[0002] When processing images, various image processing models are usually used. In order to make the image processing models have good generalization ability and robustness, sample images are needed to train and evaluate the image processing models. For example, in digital pathology, cell detection and classification technology is one of the core technologies, which involves identifying and classifying cells on tissue sections, including determining whether the cells are malignant. In order to ensure the accuracy of cell detection and classification results, a large number of cell sample images are usually required to train the cell detection and classification models.
[0003] At present, when collecting cell sample images, cytopathologists usually observe, analyze and annotate pathological images manually. However, due to subjective factors, the accuracy and consistency of the annotation results of cytopathologists cannot be guaranteed. Especially in remote and underdeveloped areas, the increase in workload and the shortage of experienced pathologists have exacerbated this problem. In addition, in order to make the cell detection and classification model more adaptable to the complex real-life preparation and staining environment, it is necessary to use difficult samples to train the model. However, difficult samples are difficult to reproduce and annotate in large quantities, which limits the application accuracy of the cell detection and classification model.
[0004] To solve this problem, researchers have proposed using sample generation technology to transform, expand or combine existing samples to generate new difficult samples. Most existing sample generation technologies are based on traditional machine learning methods. However, this method relies on specific domain knowledge and manually designed rules. For example, in cancer cell detection and classification, human participation and expertise are required to adjust cell morphology, color, texture and other features to synthesize difficult samples. Even so, the generated samples are likely to lack diversity and authenticity. Summary of the invention
[0005] The object of the present invention is to provide a method and device for generating sample images based on a denoising diffusion model, so as to at least solve the problem that the existing difficult sample generation is difficult and lacks authenticity.
[0006] In order to solve the above technical problems, the present invention provides a sample image generation method based on a denoising diffusion model, comprising:
[0007] Get contour labels and category labels;
[0008] Based on the denoising diffusion model, a sample image generation model is constructed;
[0009] The contour label, the category label and the random noise are encoded by using the sample image generation model to obtain the noise image and the guidance condition;
[0010] The sample image generation model is used to decode and classify the noise image according to the guided conditions to obtain the sample image and classification results.
[0011] Optionally, in the sample image generation method based on the denoising diffusion model, the sample image generation model includes a denoising diffusion network, a U-type network, an automatic spatial search network and a conditional control guidance network; the denoising diffusion network is used to generate a sample image based on a noise image; the U-type network is used to sample the noise image and / or the sample image; the automatic spatial search network is used to find the optimal solution for the stride of the denoising diffusion network during sampling to guide the denoising diffusion network; the conditional control guidance network is used to generate guidance conditions based on contour labels and category labels to guide the U-type network.
[0012] Optionally, in the sample image generation method based on the denoising diffusion model, the reverse diffusion process of the denoising diffusion network is expressed as:
[0013]
[0014] The forward diffusion process of the denoising diffusion network is expressed as:
[0015]
[0016] Among them, x0 represents the original image data, x t represents the image data at time t; p θ (x t-1 ∣x t ,c) represents the denoising conditional probability; μ θ (x t ,c,t) represents the mean prediction obtained by the neural network parameterization; represents a learnable or fixed variance; c represents the conditional input, which is a contour label or a category label; β t Represents the noise variance coefficient, which increases monotonically throughout the process; N() represents Gaussian distribution.
[0017] Optionally, in the sample image generation method based on the denoising diffusion model, the U-shaped network includes a downsampling layer, an upsampling layer, a hidden layer and a channel attention unit; the downsampling layer, the upsampling layer and the hidden layer constitute a U-shaped network unit; the channel attention unit acts on the U-shaped network unit, and the hidden layer is used to receive the guidance conditions provided by the conditional control guidance network to guide the downsampling layer and the upsampling layer to sample the noise image and / or the sample image.
[0018] Optionally, in the sample image generation method based on the denoising diffusion model, the U-shaped network unit adopts large kernel convolution.
[0019] Optionally, in the sample image generation method based on the denoising diffusion model, the automatic spatial search network includes a time step unit and an architecture unit; the time step unit contains all possible time steps, and the architecture unit contains various types of architectures; the automatic spatial search network uses a two-stage evolutionary algorithm to find the optimal solution for the diffusion step in the search space based on all possible time steps and various types of architectures.
[0020] Optionally, in the sample image generation method based on the denoising diffusion model, the conditionally controlled guided network includes a contour encoder, a classification encoder, a guided encoder and a gradient calculator; the contour encoder is used to encode the contour label to obtain the contour code; the classification encoder is used to encode the category label to obtain the category code; the guided encoder is used to encode the contour code and the category code to obtain the guided code; the gradient calculator is used to perform gradient calculation on the guided code with preset weights to obtain guided gradient information.
[0021] Optionally, in the sample image generation method based on the denoising diffusion model, the guided gradient information is expressed as:
[0022]
[0023] Among them, x represents the image input at the current moment, y represents the current condition information; p t (x) represents the unconditional data distribution at time t, p t (x|y) represents the data distribution under the given condition y at time t; c represents the category label, s represents the contour label, e(c) represents the embedding vector of the category code, and e(s) represents the embedding vector of the contour code; λ c represents the conditional strength coefficient of category encoding, λ s Represents the conditional strength coefficient of the contour encoding.
[0024] Optionally, in the sample image generation method based on the denoising diffusion model, the contour encoder uses a feature map size of 20×20 obtained after U-type network pre-training as contour encoding; the classification encoder uses a one-hot method for category encoding.
[0025] Optionally, in the sample image generation method based on the denoising diffusion model, the sample image generation method based on the denoising diffusion model further includes:
[0026] The original image is compared with the generated sample image to evaluate the performance of the sample image generation model.
[0027] In order to solve the above technical problems, the present invention further provides a sample image generation device based on a denoising diffusion model, which is used to implement the sample image generation method based on a denoising diffusion model as described in any one of the above items, and the sample image generation device based on a denoising diffusion model includes:
[0028] An acquisition module is used to obtain the original image and its contour label and category label;
[0029] A sample image generation model is used to encode the original image, the contour label, the category label and the random noise to obtain the noise image and the guidance condition, and is also used to decode and classify the noise image according to the guidance condition to obtain the sample image and the classification result;
[0030] Output module, used to output sample images and classification results.
[0031] The sample image generation method and device based on the denoising diffusion model provided by the present invention include: obtaining contour labels and category labels; constructing a sample image generation model based on the denoising diffusion model; encoding the contour labels, category labels and random noise using the sample image generation model to obtain a noise image and a guiding condition; decoding and classifying the noise image according to the guiding condition using the sample image generation model to obtain a sample image and a classification result. By constructing a sample image generation model based on the denoising diffusion model, and adding contour labels and category labels when generating sample images using the sample image generation model, it can not only effectively help the sample image generation model to better understand the target features and improve the classification accuracy, but also enhance the feature representation and improve the quality of the sample image, thereby not only being able to generate highly realistic and diverse difficult samples, but also being able to effectively improve the generation efficiency of the sample image, solving the problem that the existing difficult sample generation is difficult and lacks authenticity. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flow chart of a sample image generation method based on a denoising diffusion model provided in this embodiment;
[0033] Figure 2 A schematic diagram of the structure of the sample image generation model provided in this embodiment;
[0034] Figure 3 A schematic diagram of the specific architecture of the sample image generation model provided in this embodiment;
[0035] Figure 4 A schematic diagram of the structure of a sample image generating device based on a denoising diffusion model provided in this embodiment. DETAILED DESCRIPTION
[0036] The sample image generation method and device based on the denoising diffusion model proposed by the present invention are further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the accompanying drawings are all in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. In addition, the structure shown in the accompanying drawings is often a part of the actual structure. In particular, the emphasis that each drawing needs to show is different, and sometimes different proportions are used.
[0037] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present invention are used to distinguish similar objects in order to describe the embodiments of the present invention, rather than to describe a specific order or sequence. It should be understood that the structures used in this way can be interchanged under appropriate circumstances. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] Considering that the sample images used by existing image processing models in the training process are limited in source and small in number, it is necessary to use sample generation models to use existing sample images to generate new sample images. However, the existing sample generation technology has distribution differences in classified samples, which can easily lead to uneven distribution of sample labels. The image processing model may tend to predict the result as a sample value with a large number of labels, which ultimately leads to instability of the image processing model. Therefore, it is necessary to improve the uniformity of sample classification in sample generation technology, which requires the sample generation model to accurately classify the generated sample images.
[0039] Based on this, this embodiment provides a sample image generation method based on a denoising diffusion model, such as Figure 1 As shown, including:
[0040] S1, obtain contour labels and category labels;
[0041] S2, constructing a sample image generation model based on the denoising diffusion model;
[0042] S3, using the sample image generation model to encode the contour label, category label and random noise to obtain a noise image and a guiding condition;
[0043] S4, using the sample image generation model to decode and classify the noise image according to the guidance conditions to obtain a sample image and a classification result.
[0044] The sample image generation method based on the denoising diffusion model provided in this embodiment constructs a sample image generation model based on the denoising diffusion model, and adds contour labels and category labels when using the sample image generation model to generate sample images. This can not only effectively help the sample image generation model to better understand the target features and improve the classification accuracy, but also enhance the feature representation and improve the quality of the sample image, thereby not only being able to generate highly realistic and diverse difficult samples, but also being able to effectively improve the generation efficiency of the sample images, solving the problem that the existing difficult sample generation is difficult and lacks authenticity.
[0045] In addition, the sample image generation method based on the denoising diffusion model provided in this embodiment, since the final output includes not only the sample image but also the classification result of the sample image, it is helpful to balance the label quantity of the sample in the later stage, and further when the sample image is used to train the image processing model, the stability of the image processing model can be guaranteed.
[0046] Furthermore, in this embodiment, if Figure 2 As shown, the sample image generation model includes a denoising diffusion network, a U-type network, an automatic spatial search network and a conditional control guidance network; the denoising diffusion network is used to generate a sample image based on a noise image; the U-type network is used to sample the noise image and / or the sample image; the automatic spatial search network is used to find the optimal solution for the stride of the denoising diffusion network during sampling to guide the denoising diffusion network; the conditional control guidance network is used to generate guidance conditions based on contour labels and category labels to guide the U-type network.
[0047] The basic idea of the denoising diffusion network is to start with a simple distribution (such as Gaussian noise), and then gradually transform this simple distribution into the target distribution through a series of iterative steps; in each step, some random noise is added, and a neural network is used to predict the state of the next step. In the application of generating sample images, the denoising diffusion network starts with a simple noise image and then gradually generates a complex cell image.
[0048] Specifically, in this embodiment, the reverse diffusion process of the denoising diffusion network is from noise to the generated sample image, and the reverse diffusion process can be expressed as:
[0049]
[0050] And, the forward diffusion process of the denoising diffusion network is the process of continuously adding noise from the image. This process is also the learning process of the denoising diffusion network. The forward diffusion process is expressed as:
[0051]
[0052] Among them, x0 represents the original image data, x t represents the image data at time t; p θ (x t-1 ∣x t ,c) represents the denoising conditional probability; μ θ (x t ,c,t) represents the mean prediction obtained by the neural network parameterization; represents a learnable or fixed variance; c represents the conditional input, which is a contour label or a category label; β t Represents the noise variance coefficient, which increases monotonically throughout the process; N() represents Gaussian distribution.
[0053] In the process of generating sample images using the denoising diffusion network, if the current step is the first step, a random noise image that conforms to the Gaussian distribution is randomly generated; if it is not the first step, the image generated in the previous step is obtained, and then the denoising diffusion network accepts the noise image to generate the cell image at the current time step. In this way, the classifier can be trained while the denoising diffusion network is being trained, so that the feature extraction ability of the denoising diffusion network can be better generalized to new and unseen data.
[0054] Furthermore, in this embodiment, if Figure 3 As shown, the U-type network includes a downsampling layer, an upsampling layer, a hidden layer and a channel attention unit; the downsampling layer, the upsampling layer and the hidden layer constitute a U-type network unit; the channel attention unit acts on the U-type network unit, and the hidden layer is used to receive the guidance conditions provided by the conditional control guidance network to guide the downsampling layer and the upsampling layer to sample the noise image and / or the sample image.
[0055] Preferably, in this embodiment, the U-shaped network unit adopts large kernel convolution. Figure 3 The content shown is combined with the common knowledge in the art to understand the specific architecture of the U-type network unit, which will not be described in detail in this application.
[0056] This embodiment effectively improves the sampling effect by adding channel attention in the U-shaped network and adopting large kernel convolution, thereby ensuring the quality of the sample image and the accuracy of the classification result.
[0057] Furthermore, in this embodiment, if Figure 3As shown, the automatic spatial search network includes a time step unit (Time steps) and an architecture unit (Architecture); the time step unit includes all possible time steps, and the architecture unit includes various types of architectures; the automatic spatial search network uses a two-stage evolutionary algorithm to find the optimal solution for the diffusion step in the search space according to all possible time steps and various types of architectures.
[0058] The automatic spatial search method provided in this embodiment is to construct a unified search space, which contains all possible time steps and various architectures, and then introduce a two-stage evolutionary algorithm to find the optimal solution of the diffusion step in the designed search space. Among them, in the two-stage evolutionary algorithm, the first stage calculates the sampling score of each time step, and the second stage skips the time step with a lower score; and the definition of the optimal solution is to evaluate the effect of each time step through a score estimation function.
[0059] Compared with the sampling method of the traditional denoising diffusion network with a fixed number of sampling steps, this embodiment can automatically skip the sampling steps that have low or even negative optimization effects on the generated image quality through an automatic spatial search network, thereby reducing the sampling step length, thereby accelerating the speed of the denoising diffusion network in the sampling stage, and effectively improving the generation efficiency of the sample image.
[0060] Preferably, in order to further accelerate the search process, in this embodiment, the sample image generation method based on the denoising diffusion model further includes: comparing the original image with the generated sample image to evaluate the performance of the sample image generation model. Specifically, the FID score can be used to evaluate the sampling performance.
[0061] Furthermore, in this embodiment, if Figure 3 As shown, the conditional control guided network includes a contour encoder, a classification encoder, a guided encoder and a gradient calculator; the contour encoder is used to encode the contour label (contour condition) to obtain the contour coding; the classification encoder is used to encode the category label (category condition) to obtain the category coding; the guided encoder is used to encode the contour coding and the category coding to obtain the guided coding; the gradient calculator is used to perform gradient calculation on the guided coding with preset weights to obtain guided gradient information.
[0062] Specifically, in this embodiment, the guide gradient information is expressed as:
[0063]
[0064] Among them, x represents the image input at the current moment, y represents the current condition information; p t (x) represents the unconditional data distribution at time t, pt (x|y) represents the data distribution under the given condition y at time t; c represents the category label, s represents the contour label, e(c) represents the embedding vector of the category code, and e(s) represents the embedding vector of the contour code; λ c represents the conditional strength coefficient of category encoding, λ s Represents the conditional strength coefficient of the contour encoding.
[0065] In addition, the contour encoder uses a feature map size of 20×20 obtained after U-type network pre-training as contour encoding; the classification encoder uses a one-hot method for category encoding. For N different categories, a vector of length N is used to represent each category. All elements in the vector take values of 0 or 1. Only the position corresponding to the category in the vector is 1, and the rest are 0.
[0066] In this way, this embodiment enables the U-shaped network to simultaneously receive the noise image of the denoising diffusion network and the gradient guidance of the conditional control guidance network, thereby generating a sample image at the current time step. By providing gradient guidance through the conditional control guidance network, higher quality cell image generation can be achieved.
[0067] In step S2 and step S3, by introducing additional contour labels and category labels to guide the U-type network, not only can the category labels be used to help the model better understand different target features, thereby improving the classification accuracy of the type, but the contour features can also be used to provide target shape and boundary information to achieve enhanced feature representation, which is very important for distinguishing target morphological features, especially when the targets are closely arranged or overlapped, thereby improving the quality of sample image generation and helping to generate high-resolution and high-quality sample images.
[0068] This embodiment also provides a sample image generation device based on a denoising diffusion model, which is used to implement the sample image generation method based on a denoising diffusion model as described above. Figure 4 As shown, the sample image generating device based on the denoising diffusion model includes:
[0069] An acquisition module is used to obtain the original image and its contour label and category label;
[0070] A sample image generation model is used to encode the original image, the contour label, the category label and the random noise to obtain the noise image and the guidance condition, and is also used to decode and classify the noise image according to the guidance condition to obtain the sample image and the classification result;
[0071] Output module, used to output sample images and classification results.
[0072] The sample image generation device based on the denoising diffusion model provided in this embodiment adds contour labels and category labels when using the sample image generation model to generate sample images, which can not only effectively help the sample image generation model to better understand the target features and improve the classification accuracy, but also enhance the feature representation and improve the quality of the sample image, thereby not only being able to generate highly realistic and diverse difficult samples, but also effectively improving the generation efficiency of the sample image, solving the problem that the existing difficult samples are difficult to generate and lack authenticity.
[0073] The following is a comparison of the generation effect of lung cancer cell sample images by the sample image generation method based on the denoising diffusion model provided by the prior art and the present embodiment to illustrate the technical advantages of the present application:
[0074] This embodiment uses the existing BigGAN adversarial neural network technology (hereinafter referred to as BigGAN method) and the existing fixed-step denoising diffusion model technology (hereinafter referred to as DDIM method) to compare with the sample image generation method based on the denoising diffusion model provided in this application, and generates lung cancer cell sample images respectively. The comparison results are shown in Table 1:
[0075] Solution Name FID BigGAN method 98.53 DDIM Method 88.29 Sample image generation method based on denoising diffusion model 76.31
[0076] Table 1. FID values of various sample image generation methods
[0077] The FID index is an indicator used to evaluate the difference between the generated model and the real data distribution. The smaller the FID value, the closer the generated image is to the real data distribution.
[0078] It can be seen from Table 1 that the sample image generation method based on the denoising diffusion model provided in the present application has a lower FID value than the sample image generation method in the prior art, which means that the sample image generated by the sample image generation method based on the denoising diffusion model provided in the present application has higher authenticity than the prior art.
[0079] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. In addition, the different parts between the various embodiments can also be used in combination with each other, and the present invention is not limited to this.
[0080] The sample image generation method and device based on the denoising diffusion model provided in this embodiment include: obtaining contour labels and category labels; constructing a sample image generation model based on the denoising diffusion model; encoding the contour labels, category labels and random noise using the sample image generation model to obtain a noise image and a guiding condition; decoding and classifying the noise image according to the guiding condition using the sample image generation model to obtain a sample image and a classification result. By constructing a sample image generation model based on the denoising diffusion model and adding contour labels and category labels when generating sample images using the sample image generation model, it can not only effectively help the sample image generation model to better understand the target features and improve the classification accuracy, but also enhance the feature representation and improve the quality of the sample image, thereby not only generating highly realistic and diverse difficult samples, but also effectively improving the generation efficiency of the sample image, solving the problem that the existing difficult samples are difficult to generate and lack authenticity.
[0081] The above description is only a description of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention. Any changes or modifications made by a person skilled in the art in the field of the present invention based on the above disclosure shall fall within the scope of protection of the claims.
Claims
1. A sample image generation method based on a denoising diffusion model, characterized in that: include: Get contour labels and category labels; Based on the denoising diffusion model, a sample image generation model is constructed; The contour label, the category label and the random noise are encoded by using the sample image generation model to obtain the noise image and the guidance condition; The sample image generation model is used to decode and classify the noise image according to the guided conditions to obtain the sample image and classification results.
2. The sample image generation method based on the denoising diffusion model according to claim 1, characterized in that: The sample image generation model includes a denoising diffusion network, a U-shaped network, an automatic spatial search network and a conditional control guidance network; the denoising diffusion network is used to generate a sample image according to a noise image; the U-shaped network is used to sample the noise image and / or the sample image; the automatic spatial search network is used to find the optimal solution of the stride of the denoising diffusion network during sampling to guide the denoising diffusion network; The conditional control guidance network is used to generate guidance conditions according to the contour label and the category label to guide the U-type network.
3. The sample image generation method based on the denoising diffusion model according to claim 2 is characterized in that: The reverse diffusion process of the denoising diffusion network is expressed as: The forward diffusion process of the denoising diffusion network is expressed as: Among them, x0 represents the original image data, x t represents the image data at time t; p θ (x t-1 ∣x t ,c) represents the denoising conditional probability; μ θ (x t ,c,t) represents the mean prediction obtained by the neural network parameterization; represents a learnable or fixed variance; c represents the conditional input, which is a contour label or a category label; β t Represents the noise variance coefficient, which increases monotonically throughout the process; N() represents Gaussian distribution.
4. The sample image generation method based on the denoising diffusion model according to claim 2 is characterized in that: The U-type network includes a downsampling layer, an upsampling layer, a hidden layer and a channel attention unit; the downsampling layer, the upsampling layer and the hidden layer constitute a U-type network unit; the channel attention unit acts on the U-type network unit, and the hidden layer is used to receive the guidance conditions provided by the conditional control guidance network to guide the downsampling layer and the upsampling layer to sample noise images and / or sample images.
5. The sample image generation method based on the denoising diffusion model according to claim 4 is characterized in that: The U-shaped network unit adopts large kernel convolution.
6. The sample image generation method based on the denoising diffusion model according to claim 2, characterized in that: The automatic spatial search network includes a time step unit and an architecture unit; the time step unit contains all possible time steps, and the architecture unit contains various architectures; the automatic spatial search network uses a two-stage evolutionary algorithm to find the optimal solution for the diffusion step in the search space based on all possible time steps and various architectures.
7. The sample image generation method based on the denoising diffusion model according to claim 2 is characterized in that: The conditional control guided network includes a contour encoder, a classification encoder, a guided encoder and a gradient calculator; the contour encoder is used to encode the contour label to obtain the contour code; the classification encoder is used to encode the category label to obtain the category code; the guided encoder is used to encode the contour code and the category code to obtain the guided code; The gradient calculator is used to perform gradient calculation on the guided code with a preset weight to obtain guided gradient information.
8. The sample image generation method based on the denoising diffusion model according to claim 7, characterized in that: The guided gradient information is expressed as: Among them, x represents the image input at the current moment, y represents the current condition information; p t (x) represents the unconditional data distribution at time t, p t (x|y) represents the data distribution under the given condition y at time t; c represents the category label, s represents the contour label, e(c) represents the embedding vector of the category code, and e(s) represents the embedding vector of the contour code; λ c represents the conditional strength coefficient of category encoding, λ s Represents the conditional strength coefficient of the contour encoding.
9. The sample image generation method based on denoising diffusion model according to claim 7, characterized in that: The contour encoder uses the feature map size of 20×20 obtained after U-type network pre-training as contour encoding; the classification encoder uses one-hot method for category encoding.
10. The sample image generation method based on denoising diffusion model according to claim 1, characterized in that: The sample image generation method based on the denoising diffusion model also includes: The original image is compared with the generated sample image to evaluate the performance of the sample image generation model.
11. A sample image generation device based on a denoising diffusion model, used to implement the sample image generation method based on a denoising diffusion model as claimed in any one of claims 1 to 10, characterized in that: The sample image generating device based on the denoising diffusion model comprises: An acquisition module is used to obtain the original image and its contour label and category label; A sample image generation model is used to encode the original image, the contour label, the category label and the random noise to obtain the noise image and the guidance condition, and is also used to decode and classify the noise image according to the guidance condition to obtain the sample image and the classification result; Output module, used to output sample images and classification results.