genforce / idinvert

[ECCV 2020] In-Domain GAN Inversion for Real Image Editing
https://genforce.github.io/idinvert/
MIT License
461 stars 65 forks source link

Question about discriminator #8

Closed 07hyx06 closed 4 years ago

07hyx06 commented 4 years ago

Thanks for your great work..But i have some problems about the discriminator..

Does the discriminator (appears in encoder training process) is the StyleGAN discriminator or a discriminator trained from scratch with the encoder?

07hyx06 commented 4 years ago

What about the result without training with a discriminator(just compute the pixelwise loss, remove the adverisal loss and the D loss)?

zhujiapeng commented 4 years ago

Here, the discriminator is just fine-tuned from the original StyleGAN's discriminator. The inverted images will be blurry if without a discriminator.

07hyx06 commented 4 years ago

Here, the discriminator is just fine-tuned from the original StyleGAN's discriminator. The inverted images will be blurry if without a discriminator.

Thanks for your reply! Another question, in train_encoder.py, what's the meaning of total_kimg? Is it means the size of real image dataset is 14000 and train it 1000 times?

ShenYujun commented 4 years ago

@07hyx06 This follows the official StyleGAN implementation. Basically, it means how many thousands of images will be seen by the generator (or encoder in this repo). Suppose having batch_size = 10 for each iteration, then total_kimg = 2 means 2 * 1000 / 10 = 200 iterations.