correct pickle loading

This commit is contained in:
Bart Moyaers
2019-08-08 16:03:48 +02:00
parent 05d86d5fd1
commit e499da08df

View File

@@ -282,9 +282,18 @@ class Human36mDataset(MocapDataset):
cam['intrinsic'] = np.concatenate((cam['focal_length'], cam['center'],
cam['radial_distortion'], cam['tangential_distortion']))
# save np.load
np_load_old = np.load
# modify the default parameters of np.load
np.load = lambda *a,**k: np_load_old(*a, allow_pickle=True, **k)
# Load serialized dataset
data = np.load(path)['positions_3d'].item()
# restore np.load for future normal usage
np.load = np_load_old
self._data = {}
for subject, actions in data.items():
self._data[subject] = {}