sjtuplayer / anomalydiffusion

[AAAI 2024] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model
MIT License
114 stars 14 forks source link

Some confusion in training downstream segmentation models #41

Open xrli-U opened 3 months ago

xrli-U commented 3 months ago

Can I understand the settings in the training downstream segmentation network by this way ?

  1. There are only 500 images per anomlay class for training. But in the paper, per anomaly class has 1000 images.
  2. An epoch only randomly selects 500 images for training, in which the number of normal images and abnormal images is equal.
  3. The maximum epoch is 200, but the test data is used to select best_epoch. Is this really allowed when training a model?

Looking forward to your answers. Thank you very much!

sjtuplayer commented 3 months ago

Can I understand the settings in the training downstream segmentation network by this way ?

  1. There are only 500 images per anomlay class for training. But in the paper, per anomaly class has 1000 images.
  2. An epoch only randomly selects 500 images for training, in which the number of normal images and abnormal images is equal.
  3. The maximum epoch is 200, but the test data is used to select best_epoch. Is this really allowed when training a model?

Looking forward to your answers. Thank you very much!

  1. We have abandoned 500 image-pairs with lower quality as illustrated in the reamdme. If you need the other 500 images, you can use the offered pretrained model to generate them. But the 500-version is more stable when training.
  2. Yes, the numbers are equal.
  3. This is not the most standard way to select the model for a supervised model. But since there is not a validation set in anomaly detection task, it is hard to choose the model we need in a supervised training process. Since most of the previous methods are unsupervised methods, they do not have such a problem. For supervised-based anomaly detection, there may be a better way to select the model in the future. (Maybe one way is to use the generated data as the validation set)