Methods for sampling synthetic defect image generation
A method may include applying, by a processor, noise to a first image to generate a first noisy image, removing, by the processor, at least a portion of the noise from the first noisy image based on a neural network, selecting, by the processor, during the removing of the noise, a denoising path on the neural network corresponding to a greatest difference between a first intermediate denoised image and a second intermediate denoised image, and generating, by the processor, a second image based on the selected denoising path.
1 . A method comprising:
applying, by a processor, noise to a first image to generate a first noisy image;
removing, by the processor, at least a portion of the noise from the first noisy image based on a neural network;
selecting, by the processor, during the removing of the noise, a denoising path on the neural network corresponding to a greatest difference between a first intermediate denoised image and a second intermediate denoised image; and
generating, by the processor, a second image based on the selected denoising path.
2 . The method of claim 1 , wherein the selecting of the denoising path on the neural network corresponding to the greatest difference comprises:
generating the first intermediate denoised image by setting a class label for the neural network corresponding to the first image;
generating the second intermediate denoised image by setting the class label for the neural network corresponding to the second image; and
determining the difference between the first intermediate denoised image and the second intermediate denoised image.
3 . The method of claim 1 , wherein the neural network is trained by a source product and the first image is from a target product.
4 . The method of claim 1 , wherein the neural network is a diffusion model neural network.
5 . The method of claim 1 , wherein the diffusion model comprises a fixed time step and the selecting of the denoising path is performed at an interval corresponding to the fixed time step.
6 . The method of claim 5 , wherein the time step is in a range of 10 to 100.
7 . The method of claim 1 , wherein the first image is a defect free image of a target product.
8 . The method of claim 7 , wherein the second image is a synthetic defect image of the target product.
9 . The method of claim 1 , wherein the noise comprises Gaussian noise.
10 . The method of claim 1 , wherein the removing of the noise from the first noisy image further comprises selecting a denoising path on the neural network corresponding to the greatest difference between the first intermediate denoised image and the second intermediate denoised image, and between the second intermediate denoised image and a third intermediate denoised image.
11 . A system comprising:
a processor; and
a memory storing instructions executed by the processor to cause the processor to:
apply noise to a first image to generate a first noisy image;
remove at least a portion of the noise from the first noisy image based on a neural network;
select, during the removing of the noise, a denoising path on the neural network corresponding to a greatest difference between a first intermediate denoised image and a second intermediate denoised image; and
generate a second image based on the selected denoising path.
12 . The system of claim 11 , wherein the selecting of the denoising path on the neural network corresponding to the greatest difference comprises:
generating the first intermediate denoised image by setting a class label for the neural network corresponding to the first image;
generating the second intermediate denoised image by setting the class label for the neural network corresponding to the second image; and
determining the difference between the first intermediate denoised image and the second intermediate denoised image.
13 . The system of claim 11 , wherein the neural network is trained by a source product and the first image is from a target product.
14 . The system of claim 11 , wherein the neural network is a diffusion model neural network.
15 . The system of claim 14 , wherein the diffusion model comprises a fixed time step and the selecting of the denoising path is performed at an interval corresponding to the fixed time step.
16 . The system of claim 1 , wherein the time step is in a range of 10 to 100.
17 . The system of claim 11 , wherein the first image is a defect free image of a target product.
18 . The system of claim 17 , wherein the second image is a synthetic defect image of the target product.
19 . The system of claim 11 , wherein the noise comprises Gaussian noise.
20 . The system of claim 11 , wherein the removing of the noise from the first noisy image further comprises selecting a denoising path on the neural network corresponding to the greatest difference between the first intermediate denoised image and the second intermediate denoised image, and between the second intermediate denoised image and a third intermediate denoised image.