code: def calc_ious(boxes1, boxes2):
      ltrb1 = xywh_to_ltrb(boxes1)
      ltrb2 = xywh_to_ltrb(boxes2)
  
      il = tf.math.maximum(ltrb1[..., 0], ltrb2[..., 0])
      it = tf.math.maximum(ltrb1[..., 1], ltrb2[..., 1])
      ir = tf.math.minimum(ltrb1[..., 2], ltrb2[..., 2])
      ib = tf.math.minimum(ltrb1[..., 3], ltrb2[..., 3])
      I = tf.math.maximum(0.0, ir - il) * tf.math.maximum(0.0, ib - it)
  
      A1 = (ltrb1[..., 2] - ltrb1[..., 0]) * (
          ltrb1[..., 3] - ltrb1[..., 1]
      )
      A2 = (ltrb2[..., 2] - ltrb2[..., 0]) * (
          ltrb2[..., 3] - ltrb2[..., 1]
      )
      U = A1 + A2 - I
  
      return I / U
  
file_path: DALI/docs/examples/use_cases/tensorflow/yolov4/src/utils.py
imports: import tensorflow
  import numpy
  from inference import decode_prediction
label_desc: Use image node_id 4 for calling a global function with example usage: calc_ious(boxes1, boxes2) and returns: unknown