Skip to content

Commit

Permalink
Fixed handling relative paths STVIR#294
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishi Nehra authored and Vishi Nehra committed Oct 19, 2020
1 parent 2bab97f commit f6ac48d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion toolkit/datasets/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion toolkit/datasets/vot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit f6ac48d

Please sign in to comment.