Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
weigq committed Mar 24, 2018
1 parent 35be92a commit 394560c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/datasets/human36m.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def __init__(self, actions, data_path, use_hg=True, is_train=True):
self.train_3d = torch.load(os.path.join(data_path, 'train_3d.pth.tar'))
self.train_2d = torch.load(os.path.join(data_path, train_2d_file))
for k2d in self.train_2d.keys():
(sub, act, fname, cls) = k2d
(sub, act, fname) = k2d
k3d = k2d
k3d = (sub, act, fname[:-3], cls) if fname.endswith('-sh') else k3d
k3d = (sub, act, fname[:-3]) if fname.endswith('-sh') else k3d
num_f, _ = self.train_2d[k2d].shape
assert self.train_3d[k3d].shape[0] == self.train_2d[k2d].shape[0], '(training) 3d & 2d shape not matched'
for i in range(num_f):
Expand All @@ -56,11 +56,11 @@ def __init__(self, actions, data_path, use_hg=True, is_train=True):
self.test_3d = torch.load(os.path.join(data_path, 'test_3d.pth.tar'))
self.test_2d = torch.load(os.path.join(data_path, test_2d_file))
for k2d in self.test_2d.keys():
(sub, act, fname, cls) = k2d
(sub, act, fname) = k2d
if act not in self.actions:
continue
k3d = k2d
k3d = (sub, act, fname[:-3], cls) if fname.endswith('-sh') else k3d
k3d = (sub, act, fname[:-3]) if fname.endswith('-sh') else k3d
num_f, _ = self.test_2d[k2d].shape
assert self.test_2d[k2d].shape[0] == self.test_3d[k3d].shape[0], '(test) 3d & 2d shape not matched'
for i in range(num_f):
Expand Down

0 comments on commit 394560c

Please sign in to comment.