Julian-Wyatt / AnoDDPM

CVPR Workshop paper - AnoDDPM: Anomaly Detection with Denoising Diffusion Probabilistic Models using Simplex Noise
https://julianwyatt.co.uk/anoddpm
MIT License
154 stars 27 forks source link

some questions about DDPM #17

Closed ZHEGG closed 7 months ago

ZHEGG commented 1 year ago

thanks for your nice code, I am a beginner in the field of diffusion and hope to learn more through your code,I have some questions during my learning process and hope you can help me. 1、When running your open-source code, I set the 'vis_img' switch to true, expecting to see the images of xt-1 and x0,However, I have some doubts about the images displayed. Why is the image of Xt-1/sample clearer than that of X0/pred_x0? Moreover, I noticed that when using 'vis_img', the noise was set to torch.rand_like, while for 'vis_video', the noise was sampled by noise_fn. Would this cause a difference in the images? Here are my results image

I hope you can help me, thanks!!!

Julian-Wyatt commented 1 year ago

Hi,

  1. Screenshot 2023-06-15 at 11 45 48

    There are different outputs depending on the epoch; the one you have highlighted outputs, the real, $x_{t-1}$ and a prediction of $x_0$. Whereas the other outputs real, image with noise, prediction of noise and the mse of the two.

  2. You are correct; this was a minor mistake and was not swapped once I moved to Simplex noise, due to not needing to output the images then. This also does seem to correlate to the strange samples on the screen - For the images I generated for the paper, I used the generate_images.py file to generate my samples rather than these training images.