code: def get(self, img):
      results = []
      faces = self.app.get(img)
      if len(faces) == 0:
          return results
      for face in faces:
          bbox = face.bbox
          width = bbox[2] - bbox[0]
          kps = face.kps
          center = (kps[0] + kps[1]) / 2.0
          # _size = np.abs(kps[1][0] - kps[0][0]) * 1.5
          _size = max(width / 1.5, np.abs(kps[1][0] - kps[0][0])) * 1.5
          rotate = 0
          _scale = self.input_size / _size
          aimg, M = face_align.transform(
              img, center, self.input_size, _scale, rotate
          )
          # eimg = cv2.resize(aimg, None, fx=R, fy=R)
          # cv2.imwrite("outputs/a_%s"%name, aimg)
          aimg = cv2.cvtColor(aimg, cv2.COLOR_BGR2RGB)
          input = aimg.copy()
          input = np.transpose(input, (2, 0, 1))
          input = np.expand_dims(input, 0)
          imgs = torch.Tensor(input).cuda()
          imgs.div_(255).sub_(0.5).div_(0.5)
          opred = (
              self.model(imgs)
              .detach()
              .cpu()
              .numpy()
              .flatten()
              .reshape((-1, 3))
          )
          opred[:, 0:2] += 1
          opred[:, 0:2] *= self.input_size // 2
          # opred[:, 0:2] *= 112
          opred[:, 2] *= 10.0
          IM = cv2.invertAffineTransform(M)
          pred = face_align.trans_points(opred, IM)
          result = (bbox, kps, pred)
          results.append(result)
      return results
  
imports: from models import GazeModel
  import sys
  import glob
  import torch
  import os
  import os.path
  import numpy
  import cv2
  import os.path
  import insightface
  from insightface.app import FaceAnalysis
  from insightface.utils import face_align
  import menpo.io
  from menpo.image import Image
  from menpo.shape import PointCloud, TriMesh
label_desc: Use image node_id 4 for calling the GazeHandler obj's underlying member method code with example usage: obj.get(img) and returns: results, results