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

python train_encoder.py #15

Open mengyuxin520 opened 4 years ago

mengyuxin520 commented 4 years ago

When i am trying to training the encoder, I got the error as below:

tensorflow.python.framework.errors_impl.FailedPreconditionError: datasets/custom-dataset; Is a directory [[{{node IteratorGetNext}}]]

ShenYujun commented 4 years ago

When training the encoder, we do not need progressive training. So, you should only specify one file for the dataset (i.e., the one with the highest resolution) instead of a directory of datasets from all resolutions.

leoffx commented 4 years ago

It would be nice if this was added to the README. Also adding information about using the dataset_tool.py could be useful for people who never used StyleGAN before.

ShenYujun commented 4 years ago

Good suggestion! We will update the README soon. Thanks!

bigorange-1 commented 1 year ago

Thanks for your great job. Recently, i am reading your code. However, i am struggling in a problem. Why not fix the discriminator “D” while training the encoder “E”? Because, from what I understand, I found, that the generator “G” is fixed. But why, the subsequent discriminator “D” can be updated? Can you help me ?

zhujiapeng commented 1 year ago

Because the image output from the G is dynamically changing i.e., from the initial reconstruction to good reconstruction. Hence, the D needs to be updated.

bigorange-1 commented 1 year ago

So, we can still see the training process of D and E as adversarial trainingg, is it right?

zhujiapeng commented 1 year ago

Yes.

bigorange-1 commented 1 year ago

Thank you very much.

bigorange-1 commented 1 year ago

Hello, I have another question. In perceptual_model.py,i saw that you used VGG16. However, i can't find any training about it. Don’t we need to fine-tune it when we use it? Will directly using the officially provided pre-trained weights have an impact on our results? Or maybe I'm wrong. Missing some key information in your code?Could you tell me? Thank you.