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",")",".","~"]
docstr: fit 3dmm & pose parameters
  Args:
      x: (n, 2) image points
      X_ind: (n,) corresponding Model vertex indices
      max_iter: iteration
      isShow: whether to reserve middle results for show
  Returns:
      fitted_sp: (n_sp, 1). shape parameters
      fitted_ep: (n_ep, 1). exp parameters
      s, angles, t
docstr_tok: ["fit","3dmm","&","pose","parameters","Args",":","x",":","(","n",",","2",")","image","points","X_ind",":","(","n",",",")","corresponding","Model","vertex","indices","max_iter",":","iteration","isShow",":","whether","to","reserve","middle","results","for","show","Returns",":","fitted_sp",":","(","n_sp",",","1",")",".","shape","parameters","fitted_ep",":","(","n_ep",",","1",")",".","exp","parameters","s",",","angles",",","t"]
code: def fit(self, x, X_ind, max_iter=4, isShow=False):
      """fit 3dmm & pose parameters
      Args:
          x: (n, 2) image points
          X_ind: (n,) corresponding Model vertex indices
          max_iter: iteration
          isShow: whether to reserve middle results for show
      Returns:
          fitted_sp: (n_sp, 1). shape parameters
          fitted_ep: (n_ep, 1). exp parameters
          s, angles, t
      """
      if isShow:
          fitted_sp, fitted_ep, s, R, t = fit.fit_points_for_show(
              x,
              X_ind,
              self.model,
              n_sp=self.n_shape_para,
              n_ep=self.n_exp_para,
              max_iter=max_iter,
          )
          angles = np.zeros((R.shape[0], 3))
          for i in range(R.shape[0]):
              angles[i] = mesh.transform.matrix2angle(R[i])
      else:
          fitted_sp, fitted_ep, s, R, t = fit.fit_points(
              x,
              X_ind,
              self.model,
              n_sp=self.n_shape_para,
              n_ep=self.n_exp_para,
              max_iter=max_iter,
          )
          angles = mesh.transform.matrix2angle(R)
      return fitted_sp, fitted_ep, s, angles, t
  
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 10 for calling the MorphabelModel obj's underlying member method code with example usage: obj.fit(x, X_ind, max_iter, isShow) and returns: fitted_sp,  fitted_ep,  s,  angles,  t