code: def to_image(vertices, h, w, is_perspective=False):
      """change vertices to image coord system
      3d system: XYZ, center(0, 0, 0)
      2d image: x(u), y(v). center(w/2, h/2), flip y-axis.
      Args:
          vertices: [nver, 3]
          h: height of the rendering
          w : width of the rendering
      Returns:
          projected_vertices: [nver, 3]
      """
      image_vertices = vertices.copy()
      if is_perspective:
          # if perspective, the projected vertices are normalized to [-1, 1]. so change it to image size first.
          image_vertices[:, 0] = image_vertices[:, 0] * w / 2
          image_vertices[:, 1] = image_vertices[:, 1] * h / 2
      # move to center of image
      image_vertices[:, 0] = image_vertices[:, 0] + w / 2
      image_vertices[:, 1] = image_vertices[:, 1] + h / 2
      # flip vertices along y-axis.
      image_vertices[:, 1] = h - image_vertices[:, 1] - 1
      return image_vertices
  
file_path: insightface/python-package/insightface/thirdparty/face3d/mesh/transform.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import math
  from math import cos, sin
label_desc: Use image node_id 9 for calling a global function with example usage: to_image(vertices, h, w, is_perspective) and returns: image_vertices