SadTalker
SadTalker copied to clipboard
ValueError: input_path must be a valid path to video/image file
I have a new problem when I run the programs in docker.
--driven_audio /host_dir/deyu.wav \
--source_image /host_dir/image.jpg \
--expression_scale 1.0 \
--still \
--result_dir /host_dir
./checkpoints/epoch_20.pth
./checkpoints/auido2pose_00140-model.pth
./checkpoints/auido2exp_00300-model.pth
./checkpoints/facevid2vid_00189-model.pth.tar
./checkpoints/mapping_00229-model.pth.tar
Traceback (most recent call last):
File "inference.py", line 131, in <module>
main(args)
File "inference.py", line 64, in main
first_coeff_path, crop_pic_path = preprocess_model.generate(pic_path, first_frame_dir)
File "/app/SadTalker/src/utils/preprocess.py", line 65, in generate
raise ValueError('input_path must be a valid path to video/image file')
ValueError: input_path must be a valid path to video/image file
I wanna know how I can solve it. Thanks.
I have same problem with you
please dont run it in command line, run in file driectly
same issue
Hi Guys, Here issue is with the extension of the image like .png, .jpg, check everywhere it extension is consistent.
especially in this line
img = 'examples/source_image/{}.`**jpeg**`'.format(default_head_name.value)
Hi guys, I found the solution
Hi Guys, Here issue is with the extension of the image like .png, .jpg, check everywhere it extension is consistent.
especially in this line
img = 'examples/source_image/{}.`**jpeg**`'.format(default_head_name.value)
import ipywidgets as widgets
import glob
import matplotlib.pyplot as plt
# print("Choose the image name to animate: (saved in folder 'examples/')")
img_list = glob.glob1('examples/source_image', '*.jpeg')
print(img_list)
img_list.sort()
img_list = [item.split('.')[0] for item in img_list]
default_head_name = widgets.Dropdown(options=img_list, value='ramveer')
def on_change(change):
if change['type'] == 'change' and change['name'] == 'value':
plt.imshow(plt.imread('examples/source_image/{}.jpeg'.format(default_head_name.value)))
plt.axis('off')
plt.show()
default_head_name.observe(on_change)
display(default_head_name)
plt.imshow(plt.imread('examples/source_image/{}.jpeg'.format(default_head_name.value)))
plt.axis('off')
plt.show()