anothermartz / Easy-Wav2Lip

Colab for making Wav2Lip high quality and easy to use
578 stars 88 forks source link

the generated videos are not very clear, especially around the mouth area #40

Open gavid0124 opened 5 months ago

gavid0124 commented 5 months ago

I have captured dynamic images from the original video and the new video. This is the original picture: original

The following is the new picture: new

Can you tell me which parameters need to add in order to make the generated video clearer?

Thank you very much!

anothermartz commented 4 months ago

Few things to try:

  1. Make sure you're using the "Enhanced" quality option.
  2. "Wav2Lip_GAN" for wav2lip_version can increase visual quality at the expense of lip movement accuracy.
  3. Try "half resolution" for output_height - this may seem counter intuitive but it may be that the input resolution is so high that the inherent low resolution of Wav2Lip just makes it look all smushy and then GFPGAN just can't figure out what's going on. Lowering the resolution may bridge the gap between the input resolution and Wav2Lip's tiny 96x96 resolution.

Let me know how you get on!

gavid0124 commented 4 months ago

Few things to try:

  1. Make sure you're using the "Enhanced" quality option.
  2. "Wav2Lip_GAN" for wav2lip_version can increase visual quality at the expense of lip movement accuracy.
  3. Try "half resolution" for output_height - this may seem counter intuitive but it may be that the input resolution is so high that the inherent low resolution of Wav2Lip just makes it look all smushy and then GFPGAN just can't figure out what's going on. Lowering the resolution may bridge the gap between the input resolution and Wav2Lip's tiny 96x96 resolution.

Let me know how you get on!

Thank you, I understand, It's OK.

suyunkai commented 4 months ago

抱歉,我尝试了上面所说的办法,但并不管用。想了解还有什么比较好的方案,可以减轻脸部边框。即使是需要额外的后期操作。

anothermartz commented 4 months ago

抱歉,我尝试了上面所说的办法,但并不管用。想了解还有什么比较好的方案,可以减轻脸部边框。即使是需要额外的后期操作。

试试增加朝向边框方向的 "padding" 数值,例如,如果线条出现在下巴上:

u : 0 d: 15 l : 0 r : 0

我建议每个方向的数值不要超过 25, 因为增加填充也会增大生成嘴巴的大小,这样看起来可能会有点奇怪。

另外,如果脸部移动很多,也许可以将 "mouth_tracking" 选项设置为 true,并使用 "debug_mask" 检查蒙版设置看起来是否合适。

关于额外的后期处理,有一个名为 "Roop" 的项目可以进行脸部替换。我自己没有尝试过,但也许可以通过将处理后的脸部与原始脸部进行替换来提高质量。

它包含在这个工具中: https://github.com/numz/sd-wav2lip-uhq

"I apologize, I tried the methods mentioned above, but they didn't work. I would like to know if there are any better solutions to reduce the border of the face. Even if it requires additional post-processing."

Try increasing the "padding" numbers in the direction of the border, example if the lines are on the chin:

u : 0 d: 15 l : 0 r : 0

I wouldn't go over 25 in any direction and adding padding also increases the size of the generated mouth so it can look odd.

Also if the face is moving around a lot, it may be a good idea to make the option "mouth_tracking" true and check that the mask settings you have look good with "debug_mask".

As for additional post-processing, there is a project called "Roop" which can do face swapping, I haven't tried this myself but perhaps it can improve the quality to swap the processed face with the original.

It is included as part of this tool: https://github.com/numz/sd-wav2lip-uhq