yerfor / GeneFacePlusPlus

GeneFace++: Generalized and Stable Real-Time 3D Talking Face Generation; Official Code
MIT License
1.59k stars 229 forks source link

Unblinking #184

Open MtYCNN opened 7 months ago

MtYCNN commented 7 months ago

After using your new version of code, I found that no matter how you train it, you won't blink and will keep staring. Is there any way to solve this problem? No matter how big eye_blink_dim is set, it hasn't changed. please

abinggo commented 7 months ago

Hi, I'm having the same problem, but I've trained out that my eyes stay closed and won't open. However, I suspect that one of the modules didn't match during training 1, and there was an error size mismatch for blink_encoder.1.weight, I solved the error by skipping, but the trained character's eyes are closed!

YifuDeng commented 7 months ago

same question

louis-she commented 7 months ago
image

You can see that the default blink dim in head and torso config is not the same, and that's why blink_encoder.1.weight not match. change torso from 4 to 2 will load the weights.

kanxinqing147 commented 3 months ago

In file inference/genefacepp_infer.py line 185 and line 186, there should have

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.03).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.97).item()

please alter these line to

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.001).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.95).item()

it is worked for me, although I am not so satisfy.

benfmch commented 3 months ago

In file inference/genefacepp_infer.py line 185 and line 186, there should have

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.03).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.97).item()

please alter these line to

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.001).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.95).item()

it is worked for me, although I am not so satisfy.

Great.You help me able to see the eye blinking in my own data, although the effect is far from satisfactory.

benfmch commented 3 months ago

In file inference/genefacepp_infer.py line 185 and line 186, there should have

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.03).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.97).item()

please alter these line to

self.closed_eye_area_percent = torch.quantile(eye_area_percents, q=0.001).item()
self.opened_eye_area_percent = torch.quantile(eye_area_percents, q=0.95).item()

it is worked for me, although I am not so satisfy.

Great.You help me able to see the eye blinking in my own data, although the effect is far from satisfactory.

By the way , in my dataset , it only works with "--blink_mode = period" in inference command.

Typhoon0303 commented 1 day ago

If the video shows eye blinking but some parts of the video appear mosaic-like or have blurry eyes during non-blinking moments, you can fix this by modifying this section:

In file inference/genefacepp_infer.py line 84

eye_area_percent = 0.6 * torch.ones([len(lm68), 1], dtype=opened_eye_lm68.dtype, device=opened_eye_lm68.device)

please alter these line to

eye_area_percent = 0.6 * torch.ones([len(lm68), 1], dtype=opened_eye_lm68.dtype, device=opened_eye_lm68.device)

You should adjust these values according to your video.