code: def draw_on(self, img, faces):
      import cv2
  
      dimg = img.copy()
      for i in range(len(faces)):
          face = faces[i]
          box = face.bbox.astype(int)
          color = (0, 0, 255)
          cv2.rectangle(
              dimg, (box[0], box[1]), (box[2], box[3]), color, 2
          )
          if face.kps is not None:
              kps = face.kps.astype(int)
              # print(landmark.shape)
              for l in range(kps.shape[0]):
                  color = (0, 0, 255)
                  if l == 0 or l == 3:
                      color = (0, 255, 0)
                  cv2.circle(dimg, (kps[l][0], kps[l][1]), 1, color, 2)
          if face.gender is not None and face.age is not None:
              cv2.putText(
                  dimg,
                  "%s,%d" % (face.sex, face.age),
                  (box[0] - 1, box[1] - 4),
                  cv2.FONT_HERSHEY_COMPLEX,
                  0.7,
                  (0, 255, 0),
                  1,
              )
  
          # for key, value in face.items():
          #    if key.startswith('landmark_3d'):
          #        print(key, value.shape)
          #        print(value[0:10,:])
          #        lmk = np.round(value).astype(int)
          #        for l in range(lmk.shape[0]):
          #            color = (255, 0, 0)
          #            cv2.circle(dimg, (lmk[l][0], lmk[l][1]), 1, color,
          #                       2)
      return dimg
  
file_path: insightface/python-package/insightface/app/face_analysis.py
imports: from __future__ import division
  import glob
  import os.path
  import numpy
  import onnxruntime
  from numpy.linalg import norm
  from ..model_zoo import model_zoo
  from ..utils import DEFAULT_MP_NAME, ensure_available
  from .common import Face
label_desc: Use image node_id 4 for calling the FaceAnalysis obj's underlying member method code with example usage: obj.draw_on(img, faces) and returns: dimg