code: def compute_ious(boxes1, boxes2):
      """[Compute pairwise IOU matrix for given two sets of boxes]
  
      Args:
          boxes1 ([numpy ndarray with shape N,4]): [representing bounding boxes with format (xmin,ymin,xmax,ymax)]
          boxes2 ([numpy ndarray with shape M,4]): [representing bounding boxes with format (xmin,ymin,xmax,ymax)]
      Returns:
          pairwise IOU maxtrix with shape (N,M)，where the value at ith row jth column hold the iou between ith
          box and jth box from box1 and box2 respectively.
      """
      lu = np.maximum(
          boxes1[:, None, :2], boxes2[:, :2]
      )  # lu with shape N,M,2 ; boxes1[:,None,:2] with shape (N,1,2) boxes2 with shape(M,2)
      rd = np.minimum(
          boxes1[:, None, 2:], boxes2[:, 2:]
      )  # rd same to lu
      intersection_wh = np.maximum(0.0, rd - lu)
      intersection_area = (
          intersection_wh[:, :, 0] * intersection_wh[:, :, 1]
      )  # with shape (N,M)
      boxes1_wh = np.maximum(0.0, boxes1[:, 2:] - boxes1[:, :2])
      boxes1_area = boxes1_wh[:, 0] * boxes1_wh[:, 1]  # with shape (N,)
      boxes2_wh = np.maximum(0.0, boxes2[:, 2:] - boxes2[:, :2])
      boxes2_area = boxes2_wh[:, 0] * boxes2_wh[:, 1]  # with shape (M,)
      union_area = np.maximum(
          boxes1_area[:, None] + boxes2_area - intersection_area, 1e-8
      )  # with shape (N,M)
      ious = np.clip(intersection_area / union_area, 0.0, 1.0)
      return ious
  
file_path: PaddleDetection/ppdet/utils/cam_utils.py
imports: import numpy
  import cv2
  import os
  import sys
  import glob
  from ppdet.utils.logger import setup_logger
  import copy
  import paddle
  from ppdet.engine import Trainer
label_desc: Use image node_id 2 for calling a global function with example usage: compute_ious(boxes1, boxes2) and returns: ious