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

How to generate a picture that has the same lighting as the reference sample #32

Open
Yitian-Li opened this issue Mar 7, 2022 · 0 comments

Comments

@Yitian-Li
Copy link

Thanks for your work a lot!I have trouble when I trying to generate a picture that has the same lighting as the reference.
I have tried the same method like #6

  1. utilizing the R_Net to extract the coefficient (257) of both source and reference image, and discarding the last three elements (254).
    2.Combining the identity coefficient of the source image with the other three factors coefficients of the reference image to generate a new coefficient for later face generation.
    3.Adding random noise to the above coefficient and utilizing the truncate_generation to obtain the manipulated results.
    however the generated images do not preserve both the identity information and other information of the source image.

source image

src

reference image

ref

generated image

res

I have also tired the method which optimize from an average latent vector in W+ space. I embed both source image and reference image into W+ space and update it using an Adam optimizer with 3000 iterations, and then I combine them using final_vector = tf.concat([src_vector[:, :8, :], ref_vector[:, 8:, :]], axis=1), but I get a output like this

generated image2

src_ref

Looking forward to your reply! I would appreciate it if you could provide a demo code.

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

1 participant