in utilities/misc.py [0:0]
def load_mano_meshes(params, model_dicts, oTh=(np.eye(4), np.eye(4)),
flat_hand_mean=False):
if not MANO_PRESENT or model_dicts is None:
return (None, None)
out = []
for hand_idx, mp in enumerate(params):
if mp is None:
out.append(None)
continue
ncomps = len(mp['pose']) - 3
m = load_mano_model(model_dicts[hand_idx], ncomps=ncomps,
flat_hand_mean=flat_hand_mean)
m.betas[:] = mp['betas']
m.pose[:] = mp['pose']
oTm = oTh[hand_idx] @ mp['hTm']
vertices = np.array(m)
vertices = tform_points(oTm, vertices)
joints = mano2openpose(mano_joints_with_fingertips(m))
joints = tform_points(oTm, joints)
out.append({
'vertices': vertices,
'joints': joints,
'faces': np.asarray(m.f),
})
return out