Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About the meaning of "n" of "DDAD-S-n" #19

Open
xgzng opened this issue Jan 5, 2024 · 11 comments
Open

About the meaning of "n" of "DDAD-S-n" #19

xgzng opened this issue Jan 5, 2024 · 11 comments

Comments

@xgzng
Copy link

xgzng commented Jan 5, 2024

Hello, I'd like to ask about the meaning of 10 in DDAD-S-10 in your paper. Your paper describes it as "n refers to the number of denoising iterations", but isn't the number of denoising iterations 1000? I don't see a 10 setting in the code, or do I iterate the training process 10 times to get it?

@arimousa
Copy link
Owner

arimousa commented Jan 5, 2024

Hello, as you correctly mentioned 10 is the number of the denoising steps. In the code it can be calculated based on "test_trajectoy_steps" and "skip" in the config file. Where "test_trajectoy_steps: 250" means the starting point (T' = 250) and "skip" means the denoising step size we take at each denoising iteration. Mathematically n= test_trajectoy_steps / skip.

@xgzng
Copy link
Author

xgzng commented Jan 5, 2024

Thank you for your answer.I'll take a closer look at the code.

@arimousa
Copy link
Owner

arimousa commented Jan 5, 2024

We utilize the DDIM sampler which allows for the generation of samples without the need to take all 1000 steps. In our model, during inference, the initial noisy step is 250 (referred as test_trajectoy_steps in the config file) which is a more suitable noise-to-signal ratio.

Note that during training, all 1000 steps (referred as trajectory_steps) are executed.

@xgzng xgzng closed this as completed Jan 6, 2024
@xgzng xgzng reopened this Mar 13, 2024
@xgzng
Copy link
Author

xgzng commented Mar 13, 2024

Hello, I visualized the reconstructed image in the reconstruction part of your code, but I found that the reconstructed image did not have much repair, and there was still a big anomaly. I did the above operation in the bottle dataset. Could you give me a solution?

@arimousa
Copy link
Owner

Decreasing the Value of w would result in better reconstruction of the anomalous part.

@xgzng
Copy link
Author

xgzng commented Mar 14, 2024

OK, thank you for your answer, it does have a very good effect, but it does not seem to achieve the most perfect repair effect. It still feels flawed to the naked eye, but it is enough for anomaly detection, perhaps because the abnormal part is too serious to achieve an almost perfect repair effect. I only made observations on the bottle dataset.

@arimousa
Copy link
Owner

Great. If your are using DDAD-S just scaling the model to higher number of parameters will help. However, though we aimed for a cohesive visual reconstruction, it is worth to note that at the end the anomaly score is calculated based on the deviation of the reconstruction from the input image. It means that only keeping then normal pattern of the input image, while having deviation in anomalous part will result in anomaly detection. The conditioning mechanism essentially aims for keeping the normal behavior of the image.
Hope this explanation helps to map out the correlation between reconstruction and anomaly detection.

@xgzng xgzng closed this as completed Mar 15, 2024
@xgzng xgzng reopened this Apr 22, 2024
@xgzng
Copy link
Author

xgzng commented Apr 22, 2024

Hello, I would like to ask, will DDAD have a significant improvement over DDAD-S in the effect of reconstruction?

@arimousa
Copy link
Owner

Hi, DDAD can reconstruct details with greater precision, resulting in a better anomaly score.

@xgzng
Copy link
Author

xgzng commented Apr 22, 2024

OK, thank you very much.

@xgzng xgzng closed this as completed Apr 22, 2024
@xgzng xgzng reopened this Aug 1, 2024
@xgzng
Copy link
Author

xgzng commented Aug 1, 2024

Hello, is there a range limit for the conditional parameter w? For example, when w takes a certain maximum value, the effect of the diffusion model will be almost zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants