I find that,
In (main.py, generate_with_mask.py), 'sample'=False, 'inpaint'=True, and
In (train_mask.py, generate_mask.py) 'sample'=True, 'inpaint'=False.
In LatentDiffusion.log_images method, how does it work differently when sample=True or inpaint=True?
What do the log images -sample_gs.jpg and -sample_scaled_gs.jpg saved when running train_mask.py mean?
A defect image is created using a mask on a random normal image. At this time, isn't there a case where the defect mask is not mapped properly to the normal image and the object deviates from it?(If the mask is over the background)
In 'Personalized_mvtec_mask' class, I really don't know the meaning of these two line.
l=len(mask_files)//3
(why divide by 3 ???, )
(Why do we use only 1/3 of the total mask when creating a mask?)
*self._length = self.num_images repeats**
(What does it mean to increase the total data size by 2000 times?)
There is only a small possibility where the mask is outside the object (which only usually happens in screw). But even if sometimes the mask is outside the object, our model can still generate corresponding masks.
As noted in the paper, we use 1/3 of the data to train our model. So we only use 1/3 of the masks.
Note: The 'repeats' operation is just used to increase the dataset length since the training images are too few, which may not be enough even for only one batch data.
Dear Author, I have some questions
I find that, In (main.py, generate_with_mask.py), 'sample'=False, 'inpaint'=True, and In (train_mask.py, generate_mask.py) 'sample'=True, 'inpaint'=False. In LatentDiffusion.log_images method, how does it work differently when sample=True or inpaint=True?
What do the log images -sample_gs.jpg and -sample_scaled_gs.jpg saved when running train_mask.py mean?
A defect image is created using a mask on a random normal image. At this time, isn't there a case where the defect mask is not mapped properly to the normal image and the object deviates from it?(If the mask is over the background)
In 'Personalized_mvtec_mask' class, I really don't know the meaning of these two line. l=len(mask_files)//3
(why divide by 3 ???, ) (Why do we use only 1/3 of the total mask when creating a mask?)
*self._length = self.num_images repeats** (What does it mean to increase the total data size by 2000 times?)
That open source is helpful to me. Thanks ahead.