code: def compute_ious(gt, predictions):
      gt_ = get_segmentations(gt)
      predictions_ = get_segmentations(predictions)
  
      if len(gt_) == 0 and len(predictions_) == 0:
          return np.ones((1, 1))
      elif len(gt_) != 0 and len(predictions_) == 0:
          return np.zeros((1, 1))
      else:
          iscrowd = [0 for _ in predictions_]
          ious = cocomask.iou(gt_, predictions_, iscrowd)
          if not np.array(ious).size:
              ious = np.zeros((1, 1))
          return 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 2 for calling a global function with example usage: compute_ious(gt, predictions) and returns: np, np, ious