code: def bboxes_iou(boxes1: np.ndarray, boxes2: np.ndarray) -> np.ndarray:
      boxes1_area = (boxes1[..., 2] - boxes1[..., 0]) * (
          boxes1[..., 3] - boxes1[..., 1]
      )
      boxes2_area = (boxes2[..., 2] - boxes2[..., 0]) * (
          boxes2[..., 3] - boxes2[..., 1]
      )
  
      left_up = np.maximum(boxes1[..., :2], boxes2[..., :2])
      right_down = np.minimum(boxes1[..., 2:], boxes2[..., 2:])
  
      inter_section = np.maximum(right_down - left_up, 0.0)
      inter_area = inter_section[..., 0] * inter_section[..., 1]
      union_area = boxes1_area + boxes2_area - inter_area
      ious = np.maximum(
          1.0 * inter_area / union_area, np.finfo(np.float32).eps
      )
  
      return ious
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/yolov3_spp/load_onnx_test.py
imports: import time
  import cv2
  import onnx
  import onnxruntime
  import numpy
  from matplotlib import pyplot
  from draw_box_utils import draw_box
label_desc: Use image node_id 6 for calling a global function with example usage: bboxes_iou(boxes1, boxes2) and returns: ious