code: def compute_overlap(a, b):
      """
      Code originally from https://github.com/rbgirshick/py-faster-rcnn.
      Parameters
      ----------
      a: (N, 4) ndarray of float
      b: (K, 4) ndarray of float
      Returns
      -------
      overlaps: (N, K) ndarray of overlap between boxes and query_boxes
      """
      area = (b[:, 2] - b[:, 0]) * (b[:, 3] - b[:, 1])
  
      iw = np.minimum(
          np.expand_dims(a[:, 2], axis=1), b[:, 2]
      ) - np.maximum(np.expand_dims(a[:, 0], 1), b[:, 0])
      ih = np.minimum(
          np.expand_dims(a[:, 3], axis=1), b[:, 3]
      ) - np.maximum(np.expand_dims(a[:, 1], 1), b[:, 1])
  
      iw = np.maximum(iw, 0)
      ih = np.maximum(ih, 0)
  
      ua = (
          np.expand_dims(
              (a[:, 2] - a[:, 0]) * (a[:, 3] - a[:, 1]), axis=1
          )
          + area
          - iw * ih
      )
  
      ua = np.maximum(ua, np.finfo(float).eps)
  
      intersection = iw * ih
  
      return intersection / ua
  
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 10 for calling a global function with example usage: compute_overlap(a, b) and returns: unknown