code: def box3d_iou(corners1, corners2):
      """Compute 3D bounding box IoU.
  
      Input:
          corners1: array (8,3), assume up direction is Z
          corners2: array (8,3), assume up direction is Z
      Output:
          iou: 3D bounding box IoU
      """
      # corner points are in counter clockwise order
      assert corners1.shape == (8, 3)
      assert corners2.shape == (8, 3)
      rect1 = np.asarray(
          [(corners1[i, 0], corners1[i, 1]) for i in range(4)]
      )
      rect2 = np.asarray(
          [(corners2[i, 0], corners2[i, 1]) for i in range(4)]
      )
      inter_area = intersection_area(rect1, rect2)
      z_min = max(corners1[0, 2], corners2[0, 2])
      z_max = min(corners1[4, 2], corners2[4, 2])
      inter_vol = inter_area * max(0.0, z_max - z_min)
      vol1 = box3d_vol(corners1)
      vol2 = box3d_vol(corners2)
      iou = inter_vol / (vol1 + vol2 - inter_vol)
      return iou
  
file_path: torch-points3d/torch_points3d/utils/box_utils.py
imports: import torch
  import numpy
  from scipy.spatial import ConvexHull
  from .geometry import euler_angles_to_rotation_matrix
label_desc: Use image node_id 3 for calling a global function with example usage: box3d_iou(corners1, corners2) and returns: iou