code: def bbox_iou(box1, box2):
      intersect_w = _interval_overlap(
          [box1.xmin, box1.xmax], [box2.xmin, box2.xmax]
      )
      intersect_h = _interval_overlap(
          [box1.ymin, box1.ymax], [box2.ymin, box2.ymax]
      )
  
      intersect = intersect_w * intersect_h
  
      w1, h1 = box1.xmax - box1.xmin, box1.ymax - box1.ymin
      w2, h2 = box2.xmax - box2.xmin, box2.ymax - box2.ymin
  
      union = w1 * h1 + w2 * h2 - intersect
  
      if union <= 0:
          union = 1
  
      return float(intersect) / float(union)
  
file_path: ImageAI/imageai_tf_deprecated/Detection/Custom/utils/bbox.py
imports: import numpy
  import os
  import cv2
  from .colors import get_color
label_desc: Use image node_id 2 for calling a global function with example usage: bbox_iou(box1, box2) and returns: unknown