anvoynov / GANLatentDiscovery

The authors official implementation of Unsupervised Discovery of Interpretable Directions in the GAN Latent Space
416 stars 52 forks source link

Can't reproduce results #22

Closed orpatashnik closed 2 years ago

orpatashnik commented 3 years ago

Hi, First, I would like to thank you for sharing your code for your awesome work. I'm trying to reproduce the results, but I get really weird results, especially for StyleGAN FFHQ. For example: image

Based on your human annotation, I would expect the editing directions to be: red_light: 6 gender: 15 color_intensity: 24 lightening_2: 49 eyes: 50 contrast: 53 luminance: 57 hair-skin_inversion: 58 skintone: 69 redness: 70 tan: 71 saturation: 78 smile(entangled): 96

The steps I've done: 1) I ran the download.py script to download the pretrained models. 2) I ran the evaluation notebook.

The only change I did is in the args.json file, I changed the resolution attribute to be named as gan_resolution to adjust your code.

Thanks!

LynnHo commented 3 years ago

@orpatashnik I think the results are correct. There are two lines of codes:

annotated = list(deformator.annotation.values())
inspection_dim = annotated[0]

Therefore, the results above are of the first annotated direction "red_light".

Then you can change the index of annotated[0] to obtain results of other annotated directions.

alip7 commented 2 years ago

@orpatashnik I think the results are correct. There are two lines of codes:

annotated = list(deformator.annotation.values())
inspection_dim = annotated[0]

Therefore, the results above are of the first annotated direction "red_light".

Then you can change the index of annotated[0] to obtain results of other annotated directions.

Hi,could you please tell me what does the number of redness: 70, red_light: 6, gender: 15 etc means?

anvoynov commented 2 years ago

Hi, these are the pertained checkpoint directions annotations. That is, the 70-th direction corresponds to the redness.