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

Can I do Face edditing? #5

Closed
tommy19970714 opened this issue Apr 25, 2021 · 5 comments
Closed

Can I do Face edditing? #5

tommy19970714 opened this issue Apr 25, 2021 · 5 comments

Comments

@tommy19970714
Copy link

Can I use MobileStyleGan's latent space to perform face editing like anycost-gan?
I have read both papers, and I hope to be able to do face editing with mobilestylegan, since mobilestylegan has faster inference time.

@bes-dev
Copy link
Owner

bes-dev commented Apr 25, 2021

@tommy19970714 hey, thanks for interesting to our work! Yes, MobileStyleGAN is applicable to face editing as other style-based generative models.

@tommy19970714
Copy link
Author

@bes-dev Thank you for your reply!
I have checked the model of the famous encoder4editing as face editing shown in the following code.
https://github.com/omertov/encoder4editing/blob/03f17f3db53329da815102a2018750522cd63ed9/models/psp.py#L79-L88
The model returns latent in the forward function.
In the case of MobileStyleGAN, how do I get latent?
Do you have an example code?

@bes-dev
Copy link
Owner

bes-dev commented Apr 26, 2021

There are two different subnetworks: mapping network and synthesis network that u can use separately (

style = self.mapping_net(var)
)

@tommy19970714
Copy link
Author

tommy19970714 commented May 1, 2021

@bes-dev Thank you for telling me!
I would like to add the direction vector to the tensor obtained from Distiller.mapping_net as you told me.
Can I use the interfacegan directions in mobilegan?
I'm thinking like the following function of e4e.
https://github.com/omertov/encoder4editing/blob/03f17f3db53329da815102a2018750522cd63ed9/editings/latent_editor.py#L18-L27

Do you have a plan to add the example for face editing?

@bes-dev
Copy link
Owner

bes-dev commented May 1, 2021

@tommy19970714 I don't know who and how built this directions, and I'm not sure that this applicable to MobileStyleGAN as is. So, I think u can make closed form factorization to MobileStyleGAN and build u own directions. It is really easy, u can look at examples from: https://github.com/rosinality/stylegan2-pytorch

@bes-dev bes-dev closed this as completed Jun 25, 2021
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