Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid-like image after training cycle GAN #78

Closed
MaureenZOU opened this issue Aug 16, 2017 · 5 comments
Closed

Grid-like image after training cycle GAN #78

MaureenZOU opened this issue Aug 16, 2017 · 5 comments

Comments

@MaureenZOU
Copy link

When training the cycle-gan, I got some grid like images like the following, I think that is due to the up sampling problem, is anyone met this problem and have solutions?
Similar issue keras-team/keras#3940.
screen shot 2017-08-16 at 9 02 21 am

Thanks a lot!

@phillipi
Copy link
Collaborator

Could be related to this issue: https://distill.pub/2016/deconv-checkerboard/

The solution proposed there is to replace deconvolution with upsampling followed by stride 1 convolution. The cost is a naive implementation will be ~4 times as slow (but you could make it almost as fast with a smarter implementation, see the matrices in the distill post).

Another partial solution is to use a combination of kernel sizes and strides that minimize the unequal sampling problem (e.g., use kernel size 4 and stride 2; you can see the effect in the interactive widget on the distill post).

In my experience, the artifacts usually go away with enough training, as the adversary can notice these artifacts and eventually the generator will adjust its weights to avoid them, even with a naive architecture. The architecture tricks above could help get to good solutions faster, but in general we found them to be unnecessary if you just train long enough.

@MaureenZOU
Copy link
Author

thanks a lot~ got it

@mrluker
Copy link

mrluker commented Oct 3, 2017

I've run into problems changing the sampling to kernel size 4 for the sampling. @phillipi

How did you go about changing that setting in the networks.py file?

@junyanz
Copy link
Owner

junyanz commented Dec 29, 2017

@mrluker It depends on which generator you are using, for the resnet generator, you can change the network architectures here; for the u-net generator, you can edit here. You can change the kernel_size in each function.

@junyanz junyanz closed this as completed Dec 29, 2017
@1DarkL1ght
Copy link

Hi! i have the same problem. My Cycle-GAN generates images with big grid like this. Is this the same problem or not?
generated7027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants