diff --git a/toolkit/datasets/video.py b/toolkit/datasets/video.py index 12f9f76d..9063a1e9 100644 --- a/toolkit/datasets/video.py +++ b/toolkit/datasets/video.py @@ -15,7 +15,7 @@ def __init__(self, name, root, video_dir, init_rect, img_names, self.gt_traj = gt_rect self.attr = attr self.pred_trajs = {} - self.img_names = [os.path.join(root, x) for x in img_names] + self.img_names = [os.path.join(os.path.abspath(root), os.path.abspath(x)) for x in img_names] self.imgs = None if load_img: diff --git a/toolkit/datasets/vot.py b/toolkit/datasets/vot.py index 09dc1a4d..f66d7c17 100644 --- a/toolkit/datasets/vot.py +++ b/toolkit/datasets/vot.py @@ -50,7 +50,7 @@ def __init__(self, name, root, video_dir, init_rect, img_names, gt_rect, self.tag_names = list(self.tags.keys()) if not load_img: - img_name = os.path.join(root, self.img_names[0]) + img_name = os.path.join(os.path.abspath(root), os.path.abspath(self.img_names[0])) img = np.array(Image.open(img_name), np.uint8) self.width = img.shape[1] self.height = img.shape[0]