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

Adjust blend priority to make new face mask more prominent? #67

Open
DennisBora opened this issue Feb 13, 2023 · 1 comment
Open

Adjust blend priority to make new face mask more prominent? #67

DennisBora opened this issue Feb 13, 2023 · 1 comment

Comments

@DennisBora
Copy link

Hi, I'm trying to figure out if its somehow possible to adjust the blending between the source and destination face. The detection/replacement itself works fine, but I would like to preserve the color of the new face and give it also a bit more priority. Depending on the source image/video I feel that some results still have too much features/similarities to the original source and I would like to figure out if its somehow possible to preserve more infos from the new face.

Would be great if someone could point me towards the corresponding modules that have the most influence on the visual outcome of the swap.

@AlexanderGroshev
Copy link
Collaborator

Hi, @DennisBora!

There are a few options you can try to keep more information from the new face:

  1. You can try to train the model with a higher identity loss --weight_id - this makes the generated face look more like the original face than the target/destination face.
  2. Edit masks.py. You get the final result by superimposing the generated face on the original frame using a mask. This way, varying the shape of mask makes the final face closer to the new face or the destination face.

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