autonomousvision / projected-gan

[NeurIPS'21] Projected GANs Converge Faster
MIT License
885 stars 96 forks source link

Training on LSUN bedroom dataset. #6

Closed SHShim0513 closed 2 years ago

SHShim0513 commented 2 years ago

First, thank you for sharing great work!

I trained Projected FastGAN in the LSUN bedroom.

However, FID is increasing across training iterations.

The FID and training loss trends are as follows:

temp.

Is there anyone who suffers from the same issue?

Thank you!

xl-sr commented 2 years ago

Mhm, this is strange. Can you share your training settings?

SHShim0513 commented 2 years ago

Thank you for your response!

My training settings are as follows:

(1) Hardware settings: RTX 3090 * 4 (2) Python3.9.7, pytorch1.9.1.post3, and cuda11.1 are installed in the machine. (3) I ran the code on the provided PG Python environment. (4) Training config: python train.py --outdir=./training-runs/ --cfg=fastgan --data=../bedroom_train_stylegan2_pytorch.zip --gpus=4 --batch=64 --mirror=1 --snap=50 --batch-gpu=8 --kimg=10000 (5) The training dataset is 256x256 resolution.

One thing I suspect is that my training dataset was created from the official StyleGAN2-ada codebase.

Can it have a bad effect on the model?

Thank you!

SHShim0513 commented 2 years ago

I want to show the generated samples from my machine.

Specifically, I think the 'fakes000000.png' is strange.

The 'fakes_init.png' is as follows:

init

The 'fakes000000.png' is as follows:

iter_0

The 'fakes007056.png' is as follows:

iter_7056

Thank you!

xl-sr commented 2 years ago

the fakes00000.png are fine actually, this is because this generator uses BatchNorm. The samples look like clear mode collapse...

I am going to rerun this dataset in a couple of days when I get to it, could you try another LSUN set, eg., church in the mean time?

SHShim0513 commented 2 years ago

Okay. I will try another dataset.

Thank you!

SHShim0513 commented 2 years ago

I trained the Projected FastGAN on the LSUN church dataset.

In this experiment, I created the dataset by using this repository's code.

The model generates realistic textures, however, the samples look like mode collapse at the same time.

The fakes006451.png is as follows:

temp_fakes006451

The FID results are as follows:

temp_church

Thank you!

xl-sr commented 2 years ago

Good news: I could reproduce your results and also found the problem :smile: I am going to do some more testing and push the changes later today. Thank you for making me aware of it, this is why I like sharing code!

In the meantime you can try the StyleGAN2 backbone, this one should work fine.

SHShim0513 commented 2 years ago

Okay! Thanks again. I will wait for the changes.

xl-sr commented 2 years ago

Pushed the changes, you should give it a try again :) Below are the curves you should observe now on LSUN church (blue is FastGAN, pink ist StyleGAN2):

image

Thanks again for making me aware of this issue.

anandbhattad commented 2 years ago

Hi! Do you have pretrained models for LSUN bedrooms trained on StyleGAN2/StyleGAN3? If yes, can you please provide us with those pretrained models? The current one on the webpage is for FastGAN. Thanks for your time and help!