Closed ytz123456 closed 1 year ago
One more question is that during my training process, the discriminator loss is stable (around 0) while the generator loss is fluctuating wildly (like tens to thousands), does that mean there are problems with my training?
Hi, @ytz123456. Thank you for using this repository and your comments.
Response to the first comment:
The directory 'good', which contains normal images, corresponds to training_label=0
, so I think there is no mistake.
Even when checking the label IDs of the bottle dataset as shown in the code below, training_label=0
corresponds to 'good'.
>>> from torchvision4ad.datasets import MVTecAD
>>> mvtec_ad = MVTecAD(".", "bottle", train=False, download=True)
>>> mvtec_ad._find_classes("/content/bottle/train")
(['good'], {'good': 0})
>>> mvtec_ad._find_classes("/content/bottle/test")
(['broken_large', 'broken_small', 'contamination', 'good'],
{'good': 0, 'broken_large': 1, 'broken_small': 2, 'contamination': 3})
Response to the second comment: Can the trained generator generate images based on the training data? There are no constraints on the generator loss, so if the discriminator loss has decreased to around 0 and the generator is able to generate images, there should be no problem.
Thank you for your prompt reply!
Hi @A03ki , Thank you for this amazing repository! When trying out training on mvtec-ad dataset, in the visualization part, there is a line that seems to be wrong. Instead of
training_label=0
, we should settraining_label=3
. Thank you!