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

Cycle-GAN training #5

Open
IssamLaradji opened this issue Mar 16, 2019 · 5 comments
Open

Cycle-GAN training #5

IssamLaradji opened this issue Mar 16, 2019 · 5 comments

Comments

@IssamLaradji
Copy link

IssamLaradji commented Mar 16, 2019

Hii! Does the code have the cycle-gan part of the paper? Thanks!

@gjy3035
Copy link
Owner

gjy3035 commented Mar 17, 2019

For SE Cycle GAN, we add a loss in Cycle GAN during the reconstruction process.
In practice, we add a .py file and modify the model file.

Considering the minor improvement based on Cycle GAN, we provide some related files.
SE CycleGAN.zip

pytorch_ssim: loss computation.
cycle_gan_model.py: SE Cycle GAN model file
filter.py: Scene Regulization.

@gjy3035
Copy link
Owner

gjy3035 commented Mar 17, 2019

Because of many deadlines in March and April, we don't have enough time to check the entire SE Cycle GAN code and release it. After April, we will try our best to open source it ASAP.
If you have any problems during training SE Cycle GAN, you can submit issues or send email to me: gjy3035@gmail.com. Thanks for your attention!

@IssamLaradji
Copy link
Author

IssamLaradji commented Mar 17, 2019

Thanks a lot @gjy3035 that's very helpful! Would it be okay if you provide the hyperparameters you used with Cycada/SSIM?

For example,

  • the lambda in the reconstruction loss;
  • the crop size of the input image;
  • the batch size; and
  • the network architectures of the discriminators and generators?

Thanks a lot for your engagement! :)

@gjy3035
Copy link
Owner

gjy3035 commented Mar 18, 2019

Other settings are followed by pix2pix's (pytorch 0.3.1) default configuration (the paper also mentions it). To be specific,

  • lambda is 10.0;
  • size setting:
    • pre process: resize GCC to 540*960
    • training: crop size 360*360
  • batch size is 2 on two 1080Ti GPUs (you may adopt a larger value on Titan V or other high-performance devices);
  • same as the default selection: basic and resnet_9blocks

Here, we provide the opt.txt for you.
opt.txt
Two key setting:
loadSize: 540: height size for pre processing;
resize_or_crop: scale_height_and_crop: keeping the ratio and resize GCC to height of 540, i.e., the entire resolution is 540*960 (you may add some code similar to "scale_width_and_crop" in data/base_dataset.py).

@CommissarMa
Copy link

I wonder if the process of generating realistic GCC images are as follows:

  1. use 'scale_height_and_crop' to get 360*360 patches for CycleGAN training as your opt.txt above.
  2. use trained netG to get realistic GCC images with 540*960.
    Thank you.

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

No branches or pull requests

3 participants