I am trying to build a DataBlock for an Image Inpainting GAN (to be precise the Generator).
For image inpainting tasks parts of the input images will be erased, the output image should stay the same.
So I my DataBlock looks like this:
dblock=DataBlock(blocks=(ImageBlock, ImageBlock), get_items=get_image_files, get_y=lambda x: path/"images"/x.name, splitter=RandomSplitter(), item_tfms=Resize(size), batch_tfms=[*aug_transforms(), Normalize.from_stats(*imagenet_stats), RandomErasing(p=1.)]) dblock.summary(path/"images")
A couple of questions:
- Is this the right approach to generate a diverse dataset or should I create my masked images beforehand?
- The augmentation of random erasing parts is currently performed on both input and output, can I restrict it (and only this augmentation) to only the input?
- Currently the docs state that Random Erasing should be done after a Normalization. Am I right to assume that this means its order should be after
- Is there a way to set
RandomErasingto not generate noise, but one color (e.g. black=0)?