genforce / idinvert_pytorch

[ECCV 2020] In-Domain GAN Inversion for Real Image Editing (PyTorch code)
https://genforce.github.io/idinvert/
MIT License
407 stars 54 forks source link

pretrained discriminator #12

Closed hadzica closed 3 years ago

hadzica commented 3 years ago

Hello

For the tensorflow version the pretrained discriminator is provided. Why not for pytorch since, according to the paper, the discriminator and encoder are trained in the same time. Do you maybe still have the pretrained discriminator? Could you please share it?

Thanks

Amir

zhujiapeng commented 3 years ago

Wo do not use the discriminator when doing the inference tasks.

hadzica commented 3 years ago

I understand but since you can provide a pretrained encoder you should theoretically be able to also have the discriminator available since they are trained jointly. Otherwise I can not explain how you can provide the encoder but in the same time the discriminator not. For a project my team and I need also the corresponding discriminator. Is it somehow possible to map the tensorflow model to a pytorch model?

ShenYujun commented 3 years ago

Thanks for your request! However, this repo is just for inference with our encoder, which is more friendly to PyTorch users. So we have not planned to provide the PyTorch version discriminator. Alternatively, you can refer to this repo to get the TensorFlow version, then find the PyTorch implementation of the discriminator in this repo, and finally convert the weight by yourselves.