cnulab/RealNet

About Diffusion Anomaly Synthesis

Closed this issue · 4 comments

Dear author,

Thank you so much for your excellent work.

I wonder how did you produce anomaly synthesis images provided in 360k anomlay dataset like the images below.
image

I am inquiring about the process employed to generate anomaly synthesis images as the provided code for sampling anomaly images using the command python -m torch.distributed.launch --nproc_per_node=1 sample.py --dataset MVTec-AD produces synthesis images like this:
image

Thank you in advance for your response.

Thank you for your interest in our work!
I think the two sets of images you provided both appear to be reasonable anomaly images (though the anomalies in the second set might not be very significant). If you want to generate images with more pronounced anomalies, you can increase the value of 's' in sample.py (line 117, for example, set s=random_between_a_and_b(a=0.15, b=0.25)), which will sample more anomalous images.

Thank you for your reply.

I have one more question.
I believe increasing the value of 's' in sample.py will generate more pronounced anomalies, but it will not generate anomalies like the images that I provided in the first set (i.e. cutting the upper-left part of the capsule and only applying noise on black portion of the capsule). I wonder what methodologies were utilized to generate SIA dataset.

The SIA dataset is generated solely by sample.py, and there are no other methods involved.
Diffusion Anomaly Synthesis operates in the probability space and is not limited to a specific appearance.

I appreciate your response once again, thank you.