class_docstr: Utilities for calculating IOU/IOS based match for given ObjectPredictions
code: def __init__(
      self,
      match_threshold: float = 0.5,
      match_metric: str = "IOU",
      class_agnostic: bool = True,
  ):
      self.match_threshold = match_threshold
      self.class_agnostic = class_agnostic
      if match_metric == "IOU":
          self.calculate_match = self.calculate_bbox_iou
      elif match_metric == "IOS":
          self.calculate_match = self.calculate_bbox_ios
      else:
          raise ValueError(
              f"'match_metric' should be one of ['IOU', 'IOS'] but given as {match_metric}"
          )
  
imports: import copy
  from typing import List
  import numpy
  from sahi.annotation import BoundingBox, Category, Mask
  from sahi.postprocess.utils import calculate_area, calculate_box_union, calculate_intersection_area
  from sahi.prediction import ObjectPrediction
label_desc: Use image node_id 1 to create a new PostprocessPredictions object  with example: obj = PostprocessPredictions(match_threshold, match_metric, class_agnostic)