code: def intersection_over_union(y_true, y_pred):
      ious = []
      for y_t, y_p in list(zip(y_true, y_pred)):
          iou = compute_ious(y_t, y_p)
          iou_mean = 1.0 * np.sum(iou) / len(iou)
          ious.append(iou_mean)
      return np.mean(ious)
  
file_path: nni/examples/trials/kaggle-tgs-salt/metrics.py
imports: import numpy
  from pycocotools import mask
  from utils import get_segmentations
label_desc: Use image node_id 5 for calling a global function with example usage: intersection_over_union(y_true, y_pred) and returns: np