class_docstr: Utilities for calculating IOU/IOS based match for given ObjectPredictions
docstr: Returns the ratio of intersection area to the smaller box's area
docstr_tok: ["Returns","the","ratio","of","intersection","area","to","the","smaller","box","'s","area"]
code: def calculate_bbox_ios(
      pred1: ObjectPrediction, pred2: ObjectPrediction
  ) -> float:
      """Returns the ratio of intersection area to the smaller box's area"""
      box1 = np.array(pred1.bbox.to_xyxy())
      box2 = np.array(pred2.bbox.to_xyxy())
      area1 = calculate_area(box1)
      area2 = calculate_area(box2)
      intersect = calculate_intersection_area(box1, box2)
      smaller_area = np.minimum(area1, area2)
      return intersect / smaller_area
  
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 6 for calling the PostprocessPredictions obj's underlying member method code with example usage: obj.calculate_bbox_ios(pred1, pred2) and returns: unknown