mphirke / video2bvh2.0

https://github.com/Dene33/video_to_bvh but with python 3 and tensorflow2.0
Other
7 stars 3 forks source link

List index out of range #2

Closed Adilrn closed 4 years ago

Adilrn commented 4 years ago

Thank you for this amazing repo, I ha been looking for this fir a while. However, I am running to an issue while executing the cell containing the following:

from tqdm import tqdm

frames_path = '/content/generated_images/'
json_path = '/content/generated_jsons/'
frames = []
jsons = []
included_ext = [".png", ".jpg", ".jpeg"]
input_frames = [fn for fn in natsort.natsorted(os.listdir(frames_path)) if any(fn.endswith(ext) for ext in included_ext)]

for frame in tqdm(range(len(input_frames))): # Reference - https://stackoverflow.com/a/21096293/9155948
    frames.append(cv2.resize(cv2.imread(frames_path+input_frames[frame]), (224,224)))
    for openpose_json in natsort.natsorted(os.listdir(json_path)):
        if openpose_json.split('_')[-2] == os.path.splitext(input_frames[frame])[0].split('_')[-1]:
            jsons.append(openpose_json)

The error is the following: IndexError: list index out of range Do you know what seems to be the problem?