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

Generated images have geometrical pattern #185

Open
SanaNazari opened this issue Jul 21, 2022 · 9 comments
Open

Generated images have geometrical pattern #185

SanaNazari opened this issue Jul 21, 2022 · 9 comments

Comments

@SanaNazari
Copy link

I am training stylegan3 on dermoscopic skin lesion dataset (HAM10000) in conditional mode with 7 classes . After almost 6k iterations I reached fid of 11. I assume 11 is a pretty good number to get. The issue is that when I generate samples there is a diamond or X shape patterns in the images that make the images unrealistic.
Here are some samples of the real dataset:
ISIC_0025268
ISIC_0027238
ISIC_0027350
ISIC_0029480

And here are some examples of generated samples:

seed0013
seed0019
seed0031
seed0544

Any advice on what id causing this or how can I overcome it?

@coxfuture
Copy link

What cfg are you using? Stylegan3-r is only for datasets with rotational symmetry.

@SanaNazari
Copy link
Author

I am using stylegan3-r. Which cfg is better to use then?

@coxfuture
Copy link

stylegan3-t seems to be the recommended config for general use. the other option is stylegan2, but that's just a fallback to the previous ADA methods

btw, stylegan3-t uses less VRAM so you can probably increase your batch size from what it was on -R

@PDillis
Copy link

PDillis commented Jul 28, 2022

I'd recommend using --cfg=stylegan2 if quality is your main goal. StyleGAN3 configs do not have a higher quality, just more capabilities (in specific, rotational and translational equivariances). If neither of these matter to you, then go for StyleGAN2-ADA, so it's best you know which augmentations to use depending on your dataset size. As per the figure in the ADA paper:

image

So e.g., if you have around 2k images, then set --aug=ada --augpipe=bgc --target=0.4 as per the figure above. Note that this is done with unconditional training of the models, so perhaps the conditional one you are training might differ.

@SanaNazari
Copy link
Author

Thank you for the explanation. I am using 10k images. But I don't see any --augpipe in train options in stylegan3 train.py

@PDillis
Copy link

PDillis commented Jul 29, 2022

It already is using --augpipe=bgc by default as you can see on this line. Since you have a 10k dataset, as per the previous figure, then it'd be best you set --augpipe=bg --target=0.6. As you note, the vanilla StyleGAN3 code doesn't let you set the --augupipe, so you have to add it yourself or use my repo, where I have done that already, plus some other things.

@Haris-Ali007
Copy link

Amazing work by NVLabs. I just have one curiosity. I was watching the generated results on pretrained network. I noted that most of the faces generated by stylegan3-t-ffhq-1024x1024.pkl had some geometric patterns mostly in the areas where different shades merges. What is the reason for this?

@coxfuture
Copy link

As I understand it, it's due to the way stylegan3 does feature extraction. I noticed the same on my custom models trained with the same config, for the first 1000 kimg there were noticeable "deep dream"-esque artifacts that were not present on stylegan2.

@Haris-Ali007
Copy link

Okay. So @isademigod I guess this was also not discussed in the paper as well considering it is a major bug in the model?

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

4 participants