GeneFacePlusPlus icon indicating copy to clipboard operation
GeneFacePlusPlus copied to clipboard

Unblinking

Open MtYCNN opened this issue 1 year ago • 7 comments

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

MtYCNN avatar Apr 22 '24 02:04 MtYCNN

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!

abinggo avatar Apr 23 '24 05:04 abinggo

same question

YifuDeng avatar Apr 25 '24 15:04 YifuDeng

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.

louis-she avatar Apr 27 '24 02:04 louis-she

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.

kanxinqing147 avatar Aug 04 '24 09:08 kanxinqing147

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 avatar Aug 29 '24 00:08 benfmch

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.

benfmch avatar Aug 29 '24 01:08 benfmch

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.35 * torch.ones([len(lm68), 1], dtype=opened_eye_lm68.dtype, device=opened_eye_lm68.device)

You should adjust these values according to your video.

Typhoon0303 avatar Nov 29 '24 05:11 Typhoon0303