code: def intersection_over_union(bbs1, bbs2):
      assert bbs1.ndim == 2 and bbs2.ndim == 2
      bbs1_bc = bbs1[:, _np.newaxis]
      bbs2_bc = bbs2[_np.newaxis]
  
      inter = _np.maximum(
          _np.minimum(bbs1_bc[..., 2:], bbs2_bc[..., 2:])
          - _np.maximum(bbs1_bc[..., :2], bbs2_bc[..., :2]),
          0,
      )
      inter_area = inter[..., 0] * inter[..., 1]
      area1 = (bbs1_bc[..., 2] - bbs1_bc[..., 0]) * (
          bbs1_bc[..., 3] - bbs1_bc[..., 1]
      )
      area2 = (bbs2_bc[..., 2] - bbs2_bc[..., 0]) * (
          bbs2_bc[..., 3] - bbs2_bc[..., 1]
      )
  
      return inter_area / (area1 + area2 - inter_area + 1e-5)
  
file_path: turicreate/src/python/turicreate/toolkits/object_detector/_detection.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: intersection_over_union(bbs1, bbs2) and returns: unknown