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

How to generate pictures in detection.py #8

Closed zideliu closed 1 year ago

zideliu commented 1 year ago
image

Is it to save the above two results as pictures?

Julian-Wyatt commented 1 year ago

Hi I'm not certain what you're asking?

diff.forward_backward - runs the diffusion process with the unit model on image and (mse > 0.5).float() takes a threshold on the square error and converts the boolean tensor back to a float

zideliu commented 1 year ago

Hi I'm not certain what you're asking?

diff.forward_backward - runs the diffusion process with the unit model on image and (mse > 0.5).float() takes a threshold on the square error and converts the boolean tensor back to a float

image

I want to get the result image of detection through this file, but I don't know how to get it.

Julian-Wyatt commented 1 year ago

Yes, so the MSE variable should be that $E{sq}$ column and the threshold will be $E{seg}$

Julian-Wyatt commented 1 year ago

Does that help? you seem to be the majority of the way there?

zideliu commented 1 year ago

Does that help? you seem to be the majority of the way there?

Thank you for your reply, I think I probably understand, what I need to do is to plot MSE

zideliu commented 1 year ago

By the way, in your experiments, on the leather dataset, is it better to set RGB to False than to True?

Julian-Wyatt commented 1 year ago

Hi, Our paper highlights the potential for exploring AnoDDPM on multi-channel images, but we never fully explored this ourselves. So yes, this is why the leather images in the paper are greyscale. Therefore I would highly recommend whilst getting the model to work to use grayscale instead.

Julian-Wyatt commented 1 year ago

Does that help? you seem to be the majority of the way there?

Thank you for your reply, I think I probably understand, what I need to do is to plot MSE

MSE is the E_{sq} column from that image you sent