class_docstr: Calculating Average Precision 
class_docstr_tok: ["Calculating","Average","Precision"]
docstr: Args:
      ap_iou_thresh: float between 0 and 1.0
          IoU threshold to judge whether a prediction is positive.
      class2type_map: dict
          int: str
          e.g. {0: 'cabinet', 1: '', ...}
docstr_tok: ["Args",":","ap_iou_thresh",":","float","between","0","and","1.0","IoU","threshold","to","judge","whether","a","prediction","is","positive",".","class2type_map",":","dict","int",":","str","e.g",".","{","0",":","'cabinet","'",",","1",":","``",",","...","}"]
code: def __init__(
      self,
      ap_iou_thresh=0.25,
      class2type_map=None,
  ):
      """
      Args:
          ap_iou_thresh: float between 0 and 1.0
              IoU threshold to judge whether a prediction is positive.
          class2type_map: dict
              int: str
              e.g. {0: 'cabinet', 1: '', ...}
      """
      self.ap_iou_thresh = ap_iou_thresh
      self.class2type_map = class2type_map
      n_class = len(self.class2type_map)
      self.class_names = []
      for i in range(n_class):
          self.class_names.append(self.class2type_map[i])
  
      self.reset()
  
file_path: ARKitScenes/threedod/benchmark_scripts/utils/eval_utils.py
imports: import numpy
  import time
  from .box_utils import box3d_iou
label_desc: Use image node_id 1 to create a new APCalculator object from inherited base classes: object with example: obj = APCalculator(ap_iou_thresh, class2type_map)