CoCosNet icon indicating copy to clipboard operation
CoCosNet copied to clipboard

wrong padding of AdaptiveFeatureGenerator

Open htzheng opened this issue 4 years ago • 2 comments

Hi, I noticed that for AdaptiveFeatureGenerator, the encoder is implemented using padding of Conv, self.layer1 = norm_layer(nn.Conv2d(opt.spade_ic, ndf, kw, stride=1, padding=pw)) However, the warping images have strong artifacts at boundry. image

Instead, when replacing the padding with reflect padding, the result is significantly improved. image

Because of this, it seems there is a difference between the pretrained model and the testing code. Also, when using reflect padding for training, I often find the training collapses with unknow error after several epochs. Did you notice the same issue?

htzheng avatar Jul 19 '20 13:07 htzheng

Could you show the error log?

panzhang0212 avatar Aug 14 '20 12:08 panzhang0212

Hi, in the AdaptiveFeatureGenerator, I found feature backbone is extracted without reflect padding, self.layer1 = norm_layer(nn.Conv2d(opt.spade_ic, ndf, kw, stride=1, padding=pw)) Because of this, the warped images have surrounding artifacts. image

I wonder is there any ways to solve this artifact problem. Thanks.

htzheng avatar Aug 16 '20 19:08 htzheng