code: def jaccard_iou(dt: np.array, gt: np.array):
      """Calculate the jaccard IoU.
  
      See https://en.wikipedia.org/wiki/Jaccard_index
  
      Parameters
      ----------
      dt: np.array
          Single Detection in the shape of [x, y, width, height, confidence, class]
      gt: np.array
          Single Ground Truth in the shape of [class, x, y, width, height]
      """
      x_dt, y_dt, w_dt, h_dt = dt[:4]
      x_gt, y_gt, w_gt, h_gt = gt[1:]
  
      x2_dt, y2_dt = x_dt + w_dt, y_dt + h_dt
      x2_gt, y2_gt = x_gt + w_gt, y_gt + h_gt
  
      # innermost left x
      xi = x_dt if x_dt > x_gt else x_gt
      # innermost right x
      x2i = x2_dt if x2_dt < x2_gt else x2_gt
      # same for y
      yi = y_dt if y_dt > y_gt else y_gt
      y2i = y2_dt if y2_dt < y2_gt else y2_gt
  
      # calculate areas
      dt_area = w_dt * h_dt
      gt_area = w_gt * h_gt
      iwidth = x2i - xi if x2i > xi else 0
      ihight = y2i - yi if y2i > yi else 0
      intersection = iwidth * ihight
      return intersection / (dt_area + gt_area - intersection)
  
file_path: deepchecks/deepchecks/vision/metrics_utils/iou_utils.py
imports: from collections import defaultdict
  from typing import List
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: jaccard_iou(dt, gt) and returns: unknown