(self, model_path)
Init.

    Parameters
    ----------
    model_path : str
      Path to the MANO model file. This model is converted by `prepare_mano.py`
      from official release.
Init.
Init .
def __init__(self, model_path):
    """
    Init.

    Parameters
    ----------
    model_path : str
      Path to the MANO model file. This model is converted by `prepare_mano.py`
      from official release.
    """
    params = load_pkl(model_path)
    self.verts = params['verts']
    self.faces = params['faces']
    self.weights = params['weights']
    self.joints = params['joints']

    self.n_verts = self.verts.shape[0]
    self.n_faces = self.faces.shape[0]

    self.ref_pose = []
    self.ref_T = []
    for j in range(MANOHandJoints.n_joints):
      parent = MANOHandJoints.parents[j]
      if parent is None:
        self.ref_T.append(self.verts)
        self.ref_pose.append(self.joints[j])
      else:
        self.ref_T.append(self.verts - self.joints[parent])
        self.ref_pose.append(self.joints[j] - self.joints[parent])
    self.ref_pose = np.expand_dims(np.stack(self.ref_pose, 0), -1)
    self.ref_T = np.expand_dims(np.stack(self.ref_T, 1), -1)
def __init__ ( self , model_path ) : params = load_pkl ( model_path ) self . verts = params [ 'verts' ] self . faces = params [ 'faces' ] self . weights = params [ 'weights' ] self . joints = params [ 'joints' ] self . n_verts = self . verts . shape [ 0 ] self . n_faces = self . faces . shape [ 0 ] self . ref_pose = [ ] self . ref_T = [ ] for j in range ( MANOHandJoints . n_joints ) : parent = MANOHandJoints . parents [ j ] if parent is None : self . ref_T . append ( self . verts ) self . ref_pose . append ( self . joints [ j ] ) else : self . ref_T . append ( self . verts - self . joints [ parent ] ) self . ref_pose . append ( self . joints [ j ] - self . joints [ parent ] ) self . ref_pose = np . expand_dims ( np . stack ( self . ref_pose , 0 ) , - 1 ) self . ref_T = np . expand_dims ( np . stack ( self . ref_T , 1 ) , - 1 )