Zhaoyi-Yan / Shift-Net_pytorch

Pytorch implementation of Shift-Net: Image Inpainting via Deep Feature Rearrangement (ECCV, 2018)
http://openaccess.thecvf.com/content_ECCV_2018/papers/Zhaoyi_Yan_Shift-Net_Image_Inpainting_ECCV_2018_paper.pdf
MIT License
363 stars 83 forks source link

About the parameter 'overlap' #125

Closed wj320 closed 3 years ago

wj320 commented 3 years ago

Thanks for sharing your code! I have a question about the parameter 'overlap'. I download your pretrained model and test it on CelebA-HQ dataset with rectangle mask. When I set '--overlap 4', the results are pretty good; however, when I set '--overlap 0', the output images are very poor. Why is it that?

Zhaoyi-Yan commented 3 years ago
  1. --overlap is just used to be consistent with the settings with Context-Encoders and High-Resolution. The authors adopt the central mask with size (128-4)*(128-4), so we follow the settings just to make comparisons easily.

  2. When the model is trained with a fixed mask, then we must adopt the same mask, so the performance degrades severely. It is because the model is not trained with masks of other sizes. When the training is with random masks( irregular masks or rectangle masks with random positions), then the model performs well with any masks in testing. I have described this phenomenon in Readme#Masks.

wj320 commented 3 years ago

Thanks for your reply : ) !!!