Skip to content

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

@Yitian-Li

Description

@Yitian-Li

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions