yuangan / EAT_code

Official code for ICCV 2023 paper: "Efficient Emotional Adaptation for Audio-Driven Talking-Head Generation".
Other
278 stars 31 forks source link

Error in saving .npy file #33

Closed subharya83 closed 5 months ago

subharya83 commented 5 months ago

Running the demo.py file with one single image from the data already provided:

CUDA_VISIBLE_DEVICES=0 python3 demo.py --root_wav ./demo/video_processed/W015_neu_1_002 --emo hap

This is what the demo/imgs looks like: demo/imgs └── 1004_MTI_NEU_XX.flv_0001.jpg This is the error I am getting:

EAT_code/demo.py", line 302, in extract_keypoints np.save(res, [kc, he]) File "<__array_function__ internals>", line 200, in save File "/usr/local/lib/python3.10/dist-packages/numpy/lib/npyio.py", line 521, in save arr = np.asanyarray(arr) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

I think since kc is an array of of size (1, 15, 3) and he is a dictionary which has the following 5 elements, 'roll', 'pitch', 'yaw', 't', and 'exp'. All of these elements have the following sizes: (1, 66) (1, 66) (1, 66) (1, 3) (1, 45) numpy is throwing this error. To reproduce delete the file: demo/imgs_latent/1004_MTI_NEU_XX.flv_0001.npy and try running the script again.

subharya83 commented 5 months ago

Downgrading numpy version from 1.26.2 to 1.25.5 solves the problem.

yuangan commented 5 months ago

Thank you for your reminder. I have modified the environment.yaml according to your advice.