in videoalignment/datasets.py [0:0]
def check_data(dataset):
if dataset not in VALID_DATASETS:
raise ValueError(
f"{dataset} is not a valid dataset. Valid datasets are {VALID_DATASETS}"
)
if dataset not in DATASETS:
raise_dataset_error(dataset, f"'{dataset}' is not in `DATASETS`")
root_dir = DATASETS[dataset]
if not os.path.isdir(root_dir):
raise_dataset_error(
dataset, f"The specified directory ({root_dir}) doesn't exist."
)
if not os.path.isdir(os.path.join(root_dir, "videos")):
raise_dataset_error(
dataset, f"`videos` dir doesn't exist in the specified directory"
)
if dataset == "Climbing":
if not os.path.isfile(os.path.join(root_dir, "gt_climbing.align")):
raise_dataset_error(
dataset, "gt_climbing.align doesn't exist in the specified directory"
)
elif dataset == "Madonna":
if not os.path.isfile(os.path.join(root_dir, "gt_madonna.align")):
raise_dataset_error(
dataset, "gt_madonna.align doesn't exist in the specified directory"
)
elif dataset == "VCDB":
if not os.path.isdir(os.path.join(root_dir, "annotation")):
raise_dataset_error(
dataset, "`annotation` dir doesn't exist in the specified directory"
)
elif dataset == "EVVE":
if not os.path.isdir(os.path.join(root_dir, "annotations")):
raise_dataset_error(
dataset, "`annotations` dir doesn't exist in the specified directory"
)
else:
# will never reach this
pass