code: def draw_boxes_and_caption(
      self,
      image_frame,
      v_boxes,
      v_labels,
      v_scores,
      show_names=False,
      show_percentage=False,
  ):
      for i in range(len(v_boxes)):
          box = v_boxes[i]
          y1, x1, y2, x2 = box.ymin, box.xmin, box.ymax, box.xmax
          width, height = x2 - x1, y2 - y1
          class_color = self.label_color(
              self.__labels.index(v_labels[i])
          )
  
          image_frame = cv2.rectangle(
              image_frame, (x1, y1), (x2, y2), class_color, 2
          )
  
          label = ""
          if show_names and show_percentage:
              label = "%s : %.3f" % (v_labels[i], v_scores[i])
          elif show_names:
              label = "%s" % (v_labels[i])
          elif show_percentage:
              label = "%.3f" % (v_scores[i])
  
          if show_names or show_percentage:
              b = np.array([x1, y1, x2, y2]).astype(int)
              cv2.putText(
                  image_frame,
                  label,
                  (b[0], b[1] - 10),
                  cv2.FONT_HERSHEY_PLAIN,
                  1,
                  (200, 0, 0),
                  3,
              )
              cv2.putText(
                  image_frame,
                  label,
                  (b[0], b[1] - 10),
                  cv2.FONT_HERSHEY_PLAIN,
                  1,
                  (255, 255, 255),
                  2,
              )
  
      return image_frame
  
imports: import os
  import re
  import numpy
  import json
  from imageai.Detection.Custom.voc import parse_voc_annotation
  from imageai.Detection.YOLO.yolov3 import yolov3_main, yolov3_train, dummy_loss
  from imageai.Detection.Custom.generator import BatchGenerator
  from imageai.Detection.Custom.utils.utils import normalize, evaluate, makedirs
  from tensorflow.keras.callbacks import ReduceLROnPlateau
  from tensorflow.keras.optimizers import Adam
  from imageai.Detection.Custom.callbacks import CustomModelCheckpoint
  from imageai.Detection.Custom.utils.multi_gpu_model import multi_gpu_model
  from imageai.Detection.Custom.gen_anchors import generateAnchors
  import tensorflow
  from tensorflow.keras.models import load_model
  from tensorflow.keras import Input
  from tensorflow.keras.callbacks import TensorBoard
  import tensorflow.keras.backend
  import cv2
label_desc: Use image node_id 10 for calling the CustomDetectionUtils obj's underlying member method code with example usage: obj.draw_boxes_and_caption(image_frame, v_boxes, v_labels, v_scores, show_names, show_percentage) and returns: image_frame