class_docstr: Calculating Average Precision 
class_docstr_tok: ["Calculating","Average","Precision"]
docstr: Accumulate one batch of prediction and groundtruth.
      self.gt_map_cls[idx]: a list of (int, np.array (8, 3))
      self.gt_map_cls[idx]: a list of (int, np.array (8, 3))
  
  Args:
      batch_pred_map_cls: a list of lists [[(pred_cls, pred_box_params, score),...],...]
      batch_gt_map_cls: a list of lists [[(gt_cls, gt_box_params),...],...]
          should have the same length with batch_pred_map_cls (batch_size)
docstr_tok: ["Accumulate","one","batch","of","prediction","and","groundtruth",".","self.gt_map_cls","[","idx","]",":","a","list","of","(","int",",","np.array","(","8",",","3",")",")","self.gt_map_cls","[","idx","]",":","a","list","of","(","int",",","np.array","(","8",",","3",")",")","Args",":","batch_pred_map_cls",":","a","list","of","lists","[","[","(","pred_cls",",","pred_box_params",",","score",")",",","...","]",",","...","]","batch_gt_map_cls",":","a","list","of","lists","[","[","(","gt_cls",",","gt_box_params",")",",","...","]",",","...","]","should","have","the","same","length","with","batch_pred_map_cls","(","batch_size",")"]
code: def step(
      self,
      batch_pred,
      batch_gt,
  ):
      """Accumulate one batch of prediction and groundtruth.
          self.gt_map_cls[idx]: a list of (int, np.array (8, 3))
          self.gt_map_cls[idx]: a list of (int, np.array (8, 3))
  
      Args:
          batch_pred_map_cls: a list of lists [[(pred_cls, pred_box_params, score),...],...]
          batch_gt_map_cls: a list of lists [[(gt_cls, gt_box_params),...],...]
              should have the same length with batch_pred_map_cls (batch_size)
      """
  
      bsize = len(batch_pred)
      assert bsize == len(batch_gt)
      for i in range(bsize):
          self.gt_map_cls[self.scan_cnt] = batch_gt_map_cls[i]
          self.pred_map_cls[self.scan_cnt] = batch_pred_map_cls[i]
          self.scan_cnt += 1
  
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 2 for calling the APCalculator obj's underlying member method code with example usage: obj.step(batch_pred, batch_gt) without return types