code: def compute_tensor_iou(seg, gt):
      intersection, union = compute_tensor_iu(seg, gt)
      iou = (intersection + 1e-6) / (union + 1e-6)
  
      return iou
  
file_path: PaddleSeg/EISeg/eiseg/plugin/video/util/tensor_util.py
imports: import numpy
  import paddle
  import paddle.nn.functional
  from paddle.vision import transforms
label_desc: Use image node_id 4 for calling a global function with example usage: compute_tensor_iou(seg, gt) and returns: iou