code: def apply_camera(
      camera_params, tmesh, fitting, ganfit_image_size=512
  ):
      vertices = tmesh.points
  
      # defaults from ganfit
      image_width = ganfit_image_size
      image_height = ganfit_image_size
      near_clip = np.array([0.01])
      far_clip = np.array([10.0])
      fov_y = camera_params[3] + GANFIT_CAMERA_CONSTANTS[3]
  
      camera_matrices = get_camera_matrices(camera_params)
      perspective_transforms = perspective(
          image_width / image_height, fov_y, near_clip, far_clip
      )
      clip_space_transforms = np.matmul(
          perspective_transforms, camera_matrices
      )
  
      clip_space_vertices = transform_homogeneous(
          clip_space_transforms, np.array([vertices])
      )
  
      _MINIMUM_PERSPECTIVE_DIVIDE_THRESHOLD = 1e-6
      clip_space_points_w = np.maximum(
          np.abs(clip_space_vertices[:, 3:4]),
          _MINIMUM_PERSPECTIVE_DIVIDE_THRESHOLD,
      ) * np.sign(clip_space_vertices[:, 3:4])
      normalized_device_coordinates = (
          clip_space_vertices[:, 0:3] / clip_space_points_w
      )
  
      normalized_device_coordinates = (
          (normalized_device_coordinates[:, 0:2] * [1, -1]) / 2 + 0.5
      ) * [image_width, image_height]
  
      dense_lms_org = fitting["transformation"].apply(
          normalized_device_coordinates[:, ::-1]
      )[:, ::-1]
  
      dense_lms_org /= [1024, 1024]
      dense_lms_org[:, 1] = 1 - dense_lms_org[:, 1]
  
      return dense_lms_org
  
file_path: insightface/reconstruction/ostec/utils/ganfit_camera.py
imports: import numpy
  import math
label_desc: Use image node_id 11 for calling a global function with example usage: apply_camera(camera_params, tmesh, fitting, ganfit_image_size) and returns: dense_lms_org