New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
viz_image mode and load noise vectors #4
Comments
Thanks for pointing out that issue, I've fixed the As for the evaluation part, I didn't understand what you meant by using real images instead of generated ones. Can you elaborate? |
Many thanks for your quick reply and updating the repository. Regarding the using of real images, I meant that the adapted generator is just capable of adapting the images to the target domain which were previously generated by StyleGAN model. For instance, would it be possible to generate a caricature of a real input image - not a random generated image from StyleGAN? |
One possible way to do something like that would be to first embed a real image into the source GAN for FFHQ, and use the resulting latent vector as input for your adapted GAN. Ideally, since we expect the correspondence to be preserved, the resulting image from the adapted GAN should be corresponding to the real image used as input initially. |
Thanks a lot for your reply. I have used projector.py to get the latent vector of an input image, but the resulting image does not exactly correspond to the real image. The latent vector from that code changes the view-point and some features of the input image. Could you please advise me how can I get the latent vector of an input image through the StyleGAN2 architecture? Thanks. |
You could use something like Image2StyleGAN, or a more recent version. Keep in mind that it will be difficult to embed an arbitrary image, i.e. the image should likely contain the main object in the center etc. Basically, the test image should roughly follow the properties of the real images used to train the GAN |
That was a very helpful advice, thanks a lot! |
HI, if you use projector.py to gen latent code and noise, during generate stage, put the noise tensor into the model, the result should be what you want. |
There is one problem in the
generator.py
file that probably either in line #91 default mode should be written asviz_imgs
or in line #127 should be written asviz_image
. One of these two lines should be modified to visualize the images.Also, in the
generator.py
file, in line #124,g_ema
is not defined for the cases thattruncation
is less than one.Furthermore, I am wondering if it would be possible to evaluate the model with the input images instead of the generated ones.
Regarding
load_noise
option, I am wondering how can we make the noise vectors or if there is any available link to download the noise vectors asnoise.pt
.Thanks for your great work.
The text was updated successfully, but these errors were encountered: