code: def approx_area_of_intersection(det_x, det_y, gt_x, gt_y):
      """
      This helper determine if both polygons are intersecting with each others with an approximation method.
      Area of intersection represented by the minimum bounding rectangular [xmin, ymin, xmax, ymax]
      """
      det_ymax = np.max(det_y)
      det_xmax = np.max(det_x)
      det_ymin = np.min(det_y)
      det_xmin = np.min(det_x)
  
      gt_ymax = np.max(gt_y)
      gt_xmax = np.max(gt_x)
      gt_ymin = np.min(gt_y)
      gt_xmin = np.min(gt_x)
  
      all_min_ymax = np.minimum(det_ymax, gt_ymax)
      all_max_ymin = np.maximum(det_ymin, gt_ymin)
  
      intersect_heights = np.maximum(0.0, (all_min_ymax - all_max_ymin))
  
      all_min_xmax = np.minimum(det_xmax, gt_xmax)
      all_max_xmin = np.maximum(det_xmin, gt_xmin)
      intersect_widths = np.maximum(0.0, (all_min_xmax - all_max_xmin))
  
      return intersect_heights * intersect_widths
  
file_path: PaddleOCR/ppocr/utils/e2e_metric/polygon_fast.py
imports: import numpy
  from shapely.geometry import Polygon
label_desc: Use image node_id 2 for calling a global function with example usage: approx_area_of_intersection(det_x, det_y, gt_x, gt_y) and returns: unknown