code: def get_yolo_boxes(
      model, images, net_h, net_w, anchors, obj_thresh, nms_thresh
  ):
      image_h, image_w, _ = images[0].shape
      nb_images = len(images)
      batch_input = np.zeros((nb_images, net_h, net_w, 3))
  
      # preprocess the input
      for i in range(nb_images):
          batch_input[i] = preprocess_input(images[i], net_h, net_w)
  
      # run the prediction
      batch_output = model.predict_on_batch(batch_input)
      batch_boxes = [None] * nb_images
  
      for i in range(nb_images):
          yolos = [
              batch_output[0][i],
              batch_output[1][i],
              batch_output[2][i],
          ]
          boxes = []
  
          # decode the output of the network
          for j in range(len(yolos)):
              yolo_anchors = anchors[
                  (2 - j) * 6 : (3 - j) * 6
              ]  # config['model']['anchors']
              boxes += decode_netout(
                  yolos[j], yolo_anchors, obj_thresh, net_h, net_w
              )
  
          # correct the sizes of the bounding boxes
          correct_yolo_boxes(boxes, image_h, image_w, net_h, net_w)
  
          # suppress non-maximal boxes
          do_nms(boxes, nms_thresh)
  
          batch_boxes[i] = boxes
  
      return batch_boxes
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/utils/utils.py
imports: import cv2
  import numpy
  import os
  from .bbox import BoundBox, bbox_iou
  from scipy.special import expit
label_desc: Use image node_id 9 for calling a global function with example usage: get_yolo_boxes(model, images, net_h, net_w, anchors, obj_thresh, nms_thresh) and returns: batch_boxes