code: def compute(self) -> Union[Number, Dict[str, Number]]:
      averaged = super().compute()
      iou = averaged["inter"] / averaged["union"]
  
      if isinstance(iou, Tensor):
          iou = iou.cpu().numpy()
  
      # Converting iou from [0, 1] to [0, 100]
      # other metrics are by default in [0, 100 range]
      avg_iou = np.mean(iou) * 100.0
  
      return avg_iou
  
file_path: ml-cvnets/metrics/intersection_over_union.py
imports: from numbers import Number
  from typing import Any, Dict, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from metrics import METRICS_REGISTRY
  from metrics.metric_base import AverageMetric
  from utils import logger
label_desc: Use image node_id 2 for calling the IOUMetric obj's underlying member method code with example usage: obj.compute() and returns: avg_iou