class_docstr: docstring for  MorphabelModel
  model: nver: number of vertices. ntri: number of triangles. *: must have. ~: can generate ones array for place holder.
          'shapeMU': [3*nver, 1]. *
          'shapePC': [3*nver, n_shape_para]. *
          'shapeEV': [n_shape_para, 1]. ~
          'expMU': [3*nver, 1]. ~ 
          'expPC': [3*nver, n_exp_para]. ~
          'expEV': [n_exp_para, 1]. ~
          'texMU': [3*nver, 1]. ~
          'texPC': [3*nver, n_tex_para]. ~
          'texEV': [n_tex_para, 1]. ~
          'tri': [ntri, 3] (start from 1, should sub 1 in python and c++). *
          'tri_mouth': [114, 3] (start from 1, as a supplement to mouth triangles). ~
          'kpt_ind': [68,] (start from 1). ~
class_docstr_tok: ["docstring","for","MorphabelModel","model",":","nver",":","number","of","vertices",".","ntri",":","number","of","triangles",".","*",":","must","have",".","~",":","can","generate","ones","array","for","place","holder",".","'shapeMU","'",":","[","3","*","nver",",","1","]",".","*","'shapePC","'",":","[","3","*","nver",",","n_shape_para","]",".","*","'shapeEV","'",":","[","n_shape_para",",","1","]",".","~","'expMU","'",":","[","3","*","nver",",","1","]",".","~","'expPC","'",":","[","3","*","nver",",","n_exp_para","]",".","~","'expEV","'",":","[","n_exp_para",",","1","]",".","~","'texMU","'",":","[","3","*","nver",",","1","]",".","~","'texPC","'",":","[","3","*","nver",",","n_tex_para","]",".","~","'texEV","'",":","[","n_tex_para",",","1","]",".","~","'tri","'",":","[","ntri",",","3","]","(","start","from","1",",","should","sub","1","in","python","and","c++",")",".","*","'tri_mouth","'",":","[","114",",","3","]","(","start","from","1",",","as","a","supplement","to","mouth","triangles",")",".","~","'kpt_ind","'",":","[","68",",","]","(","start","from","1",")",".","~"]
code: def __init__(self, model_path, model_type="BFM"):
      super(MorphabelModel, self).__init__()
      if model_type == "BFM":
          self.model = load.load_BFM(model_path)
      else:
          print("sorry, not support other 3DMM model now")
          exit()
  
      # fixed attributes
      self.nver = self.model["shapePC"].shape[0] / 3
      self.ntri = self.model["tri"].shape[0]
      self.n_shape_para = self.model["shapePC"].shape[1]
      self.n_exp_para = self.model["expPC"].shape[1]
      self.n_tex_para = self.model["texMU"].shape[1]
  
      self.kpt_ind = self.model["kpt_ind"]
      self.triangles = self.model["tri"]
      self.full_triangles = np.vstack(
          (self.model["tri"], self.model["tri_mouth"])
      )
  
file_path: insightface/python-package/insightface/thirdparty/face3d/morphable_model/morphabel_model.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import scipy.io
  from ..None import mesh
  from .None import fit
  from .None import load
label_desc: Use image node_id 1 to create a new MorphabelModel object from inherited base classes: object with example: obj = MorphabelModel(model_path, model_type)