code: def forward(self, img, threshold):
      scores_list = []
      bboxes_list = []
      kpss_list = []
      input_size = tuple(img.shape[0:2][::-1])
      blob = cv2.dnn.blobFromImage(
          img,
          1.0 / self.input_std,
          input_size,
          (self.input_mean, self.input_mean, self.input_mean),
          swapRB=True,
      )
      net_outs = self.session.run(
          self.output_names, {self.input_name: blob}
      )
  
      input_height = blob.shape[2]
      input_width = blob.shape[3]
      fmc = self.fmc
      for idx, stride in enumerate(self._feat_stride_fpn):
          scores = net_outs[idx]
          bbox_preds = net_outs[idx + fmc]
          bbox_preds = bbox_preds * stride
          if self.use_kps:
              kps_preds = net_outs[idx + fmc * 2] * stride
          height = input_height // stride
          width = input_width // stride
          K = height * width
          key = (height, width, stride)
          if key in self.center_cache:
              anchor_centers = self.center_cache[key]
          else:
              # solution-1, c style:
              # anchor_centers = np.zeros( (height, width, 2), dtype=np.float32 )
              # for i in range(height):
              #    anchor_centers[i, :, 1] = i
              # for i in range(width):
              #    anchor_centers[:, i, 0] = i
  
              # solution-2:
              # ax = np.arange(width, dtype=np.float32)
              # ay = np.arange(height, dtype=np.float32)
              # xv, yv = np.meshgrid(np.arange(width), np.arange(height))
              # anchor_centers = np.stack([xv, yv], axis=-1).astype(np.float32)
  
              # solution-3:
              anchor_centers = np.stack(
                  np.mgrid[:height, :width][::-1], axis=-1
              ).astype(np.float32)
              # print(anchor_centers.shape)
  
              anchor_centers = (anchor_centers * stride).reshape(
                  (-1, 2)
              )
              if self._num_anchors > 1:
                  anchor_centers = np.stack(
                      [anchor_centers] * self._num_anchors, axis=1
                  ).reshape((-1, 2))
              if len(self.center_cache) < 100:
                  self.center_cache[key] = anchor_centers
  
          pos_inds = np.where(scores >= threshold)[0]
          bboxes = distance2bbox(anchor_centers, bbox_preds)
          pos_scores = scores[pos_inds]
          pos_bboxes = bboxes[pos_inds]
          scores_list.append(pos_scores)
          bboxes_list.append(pos_bboxes)
          if self.use_kps:
              kpss = distance2kps(anchor_centers, kps_preds)
              # kpss = kps_preds
              kpss = kpss.reshape((kpss.shape[0], -1, 2))
              pos_kpss = kpss[pos_inds]
              kpss_list.append(pos_kpss)
      return scores_list, bboxes_list, kpss_list
  
file_path: insightface/python-package/insightface/model_zoo/retinaface.py
imports: from __future__ import division
  import datetime
  import numpy
  import onnx
  import onnxruntime
  import os
  import os.path
  import cv2
  import sys
label_desc: Use image node_id 4 for calling the RetinaFace obj's underlying member method code with example usage: obj.forward(img, threshold) and returns: scores_list,  bboxes_list,  kpss_list