lelechen63 / Talking-head-Generation-with-Rhythmic-Head-Motion

Other
196 stars 27 forks source link

strange error in the test_ani #11

Open crankyz opened 3 years ago

crankyz commented 3 years ago

got this message "what the fuck for demo/00181_aligned.mp4 several times than :

Traceback (most recent call last): File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/test_demo_ani.py", line 113, in data_loader = CreateDataLoader(opt) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/data_loader.py", line 12, in CreateDataLoader data_loader.initialize(opt) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/custom_dataset_data_loader.py", line 20, in initialize self.dataset = data.create_dataset(opt) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/init.py", line 43, in create_dataset instance.initialize(opt) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/facefore_demo_dataset.py", line 209, in initialize self.ref_video, self.ref_lmarks, self.ref_indices, self.ref_coords = self.define_inference(self.ref_video, self.ref_lmarks) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/facefore_demo_dataset.py", line 409, in define_inference ref_images, ref_lmarks, ref_coords = self.prepare_datas(real_video, lmarks, ref_indices) File "/home/igor/head/Talking-head-Generation-with-Rhythmic-Head-Motion/data/facefore_demo_dataset.py", line 553, in prepare_datas result_lmarks.append(lmark) UnboundLocalError: local variable 'lmark' referenced before assignment

Process finished with exit code 1

Thank you for your answer.

yangchunyong commented 3 years ago

the same error!

liangsen-zju commented 3 years ago

the same error!

lelechen63 commented 3 years ago

@rainingDesert Can you check this issue and fix the Impolite error message???

luantunez commented 3 years ago

The same is happening to me, do you have any update?

ry85 commented 2 years ago

Go to the /data/keypoint2img.py file.

Change line 311, that is, curve_x = np.linspace(x[0], x[-1], (x[-1]-x[0])) to curve_x = np.linspace(x[0].astype(int), x[-1].astype(int), (x[-1].astype(int)-x[0].astype(int)))

Then it will work.

ZziTaiLeo commented 2 years ago

Go to the /data/keypoint2img.py file.

Change line 311, that is, curve_x = np.linspace(x[0], x[-1], (x[-1]-x[0])) to curve_x = np.linspace(x[0].astype(int), x[-1].astype(int), (x[-1].astype(int)-x[0].astype(int)))

Then it will work.

Thanks a lot! It works for me