disanda / Deep-GAN-Encoders

GAN encoders in PyTorch that could match PGGAN, StyleGAN v1/v2, and BigGAN. Code also integrates the implementation of these GANs.
43 stars 10 forks source link

image reconstruction #4

Closed JNash123 closed 2 years ago

JNash123 commented 2 years ago

how can i use pre-trained model to get image reconstruction directly? what should i do

JNash123 commented 2 years ago

this? rec_real_img.py

disanda commented 2 years ago

Try to run embedding_img.py, or embedding_v2_styleGAN1.py.

They use StyleGAN to invert (embed) real face to style latent code (w), then save w and put to G to reconstruct faces. Other GANs are similar in this way.

disanda commented 2 years ago

this? rec_real_img.py

No, it is a previous script. Just running embedding_img.py, or embedding_v2_styleGAN1.py is enough.

JNash123 commented 2 years ago

this? rec_real_img.py

No, it is a previous script. Just running embedding_img.py, or embedding_v2_styleGAN1.py is enough.

okay, thanks, i'll try

JNash123 commented 2 years ago

this? rec_real_img.py

No, it is a previous script. Just running embedding_img.py, or embedding_v2_styleGAN1.py is enough.

sorry, but when i ran embedding_v2_styleGAN2.py, embedding_v2_styleGAN1.py or embedding_img.py, i didn't get anything, it just created a directory. environment:ubuntu20.04, py3.7, 3090

1660722697021

1660722728310

1660722753138