akanimax / pro_gan_pytorch

Unofficial PyTorch implementation of the paper titled "Progressive growing of GANs for improved Quality, Stability, and Variation"
MIT License
536 stars 100 forks source link

Can i use well trained progan generator do gan inversion? #61

Closed MHX1203 closed 2 years ago

MHX1203 commented 2 years ago

I have used my own customal dataset train a progan generator, and now, i 'd like to use the progan do gan inversion, so i can get a latent code of related image through gan inversion.

can anyone help me, what should i do this.

thanks very much.

akanimax commented 2 years ago

Hi there. I believe yes you can very well use a trained Generator from this repo to do it. Easiest thing to check out could be by doing the following:

  1. Download the Metfaces model displayed on repo.
  2. Write a small snippet to load the model. Refer to this script for an example on how to load a trained model.
  3. Turn off model gradients and optimize for a latent code taking your own image. (The inversion process).

I unfortunately don't have time to work on this feature, but please feel free to post here if you need any help doing it code-wise. Cheers :beers:! @akanimax

akanimax commented 2 years ago

Hi there ... I am closing this because of inactivity. Please feel free to open again if you are still facing some problems. Cheers :beers:! @akanimax