vincent-thevenin / Realistic-Neural-Talking-Head-Models

My implementation of Few-Shot Adversarial Learning of Realistic Neural Talking Head Models (Egor Zakharov et al.).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

errors occur when running embedder_inference.py

opened this issue · comments

Traceback (most recent call last):
File "Realistic/embedder_inference.py", line 27, in
frame_mark_video = frame_mark_video.transpose(2,4).to(device) #T,2,3,256,256
IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 2)

this situation comes when I run the code on the full training set

Perhaps there is an error in loading the video, what's the input siwe after line 24 for frame_mark_video = select_frames(path_to_video , T)? By the way embedder_inference.py doesn't run on the training set as it is not training time, the input is fetched from the example folder.

commented

I ran into this issue a few min ago and just found the solution. Make sure the name of the video file, path_to_video, declared in embedder_inference.py is the same as the actual video file.

If you're using Colab, use absolute paths (e.g. /content/Realistic-Neural-Talking-Head-Models/examples/fine_tuning/test_video.mp4).

I found %pycat and %%writefile really useful to edit repo files already in session storage.

make sure the video file name is correct (test_video.mp4) as it comes from the download. The git code has test_vid.mp4.
you may see other errors like "PyTorch Dimension out of range (expected to be in range of [-1, 0], but got 3)" etc..
It is not loading the video. hope this helps.