mrzhu-cool / pix2pix-pytorch

PyTorch implementation of "Image-to-Image Translation Using Conditional Adversarial Networks".
422 stars 113 forks source link

Artifacts in the generated images #5

Open soumyadeepg opened 7 years ago

soumyadeepg commented 7 years ago

Hi,

I am getting a lot of artifacts when i am applying the code to train and test on face images. @mrzhu-cool Any suggestions on how to avoid them ??

Thanks in advance

XiSHEN0220 commented 6 years ago

It seems that the original code uses nn.ReflectionPad2d while in this version the author directly uses Zero Padding, you can change to reflection padding to see whether it is better.

Another way is to train on small patches, since the network is composed of all convolutional layers, you can test it with larger patches. Learning on small patches, means the network has to pay more attention on learning how to handle the border. This might be helpful to alleviate the artifacts.

jajas commented 5 years ago

Can anyone post some images affected by artefacts, I were playing around but it seems to work well on faces and on cityscapes.

mrzhu-cool commented 5 years ago

Hi, I didn't augument the data in "DatasetFromFolder" before. Adding this strategy may help preventing the artifacts.