correct pickle loading
This commit is contained in:
@@ -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] = {}
|
||||
|
||||
Reference in New Issue
Block a user