Skip to content
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

[question] What kind of pre-processing would a model that doesn't generate faces require? #49

Open
danpaldev opened this issue Jul 1, 2023 · 1 comment

Comments

@danpaldev
Copy link

Hi there!

I’ve been trying to invert some pictures using pre-trained models that don’t generate faces. For obvious reasons, I’ve been skipping most of the pre-processing, such as dlib face alignment, being the resizing the only part that I left.

However, both the final embedding and the fine-tuned model are of poor quality, either being distorted or blurred. It seems the repository is specifically designed for faces, so I was wondering if you could tell us any best practices or advice about pre-processing pictures that aren’t necessarily faces.

Thanks for the good work!

Regards

@danielroich
Copy link
Owner

Hi @danpaldev,
It depends in the pretrained StyleGAN. Lets take StyleGAN-Human for example.
You can see under the 'Aligned raw images' section the preprocessing functions they use prior of using the GAN. You will have to mimic the process for each pretrained GAN. The alignment of faces is different compared to other alignment methods.

Because many GANs use PTI as their main inversion scheme I would advise you to copy their code and use PTI as they use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants