Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/h36m_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def __init__(self, path, remove_static_joints=True):
cam['tangential_distortion']))

# Load serialized dataset
data = np.load(path)['positions_3d'].item()
data = np.load(path, allow_pickle=True)['positions_3d'].item()

self._data = {}
for subject, actions in data.items():
Expand All @@ -252,4 +252,4 @@ def __init__(self, path, remove_static_joints=True):

def supports_semi_supervised(self):
return True


7 changes: 4 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
anim['positions_3d'] = positions_3d

print('Loading 2D detections...')
keypoints = np.load('data/data_2d_' + args.dataset + '_' + args.keypoints + '.npz')
keypoints = np.load('data/data_2d_' + args.dataset + '_' + args.keypoints + '.npz', allow_pickle=True)
keypoints_metadata = keypoints['metadata'].item()
keypoints_symmetry = keypoints['metadata'].item()['keypoints_symmetry']
kps_left, kps_right = list(keypoints_symmetry[0]), list(keypoints_symmetry[1])
Expand Down Expand Up @@ -204,8 +204,9 @@ def fetch(subjects, action_filter=None, subset=1, parse_3d_poses=True):
filter_widths=filter_widths, causal=args.causal, dropout=args.dropout, channels=args.channels,
dense=args.dense)

model_pos_train=nn.DataParallel(model_pos_train,device_ids=[0,1,2]) # multi-GPU
model_pos=nn.DataParallel(model_pos,device_ids=[0,1,2]) # multi-GPU
device_list = [i for i in range(torch.cuda.device_count())]
model_pos_train=nn.DataParallel(model_pos_train,device_ids=device_list) # multi-GPU
model_pos=nn.DataParallel(model_pos,device_ids=device_list) # multi-GPU


receptive_field = model_pos.module.receptive_field()
Expand Down