in data/prepare_data_2d_h36m_sh.py [0:0]
def process_subject(subject, file_list, output):
if subject == 'S11':
assert len(file_list) == 119, "Expected 119 files for subject " + subject + ", got " + str(len(file_list))
else:
assert len(file_list) == 120, "Expected 120 files for subject " + subject + ", got " + str(len(file_list))
for f in file_list:
action, cam = os.path.splitext(os.path.basename(f))[0].replace('_', ' ').split('.')
if subject == 'S11' and action == 'Directions':
continue # Discard corrupted video
if action not in output[subject]:
output[subject][action] = [None, None, None, None]
with h5py.File(f) as hf:
positions = hf['poses'].value
output[subject][action][cam_map[cam]] = positions.astype('float32')