code: def __init__(self, anno_file, **kwargs):
      self.anno_file = anno_file
      self.clsid2catid, self.catid2name = get_categories(
          "RBOX", anno_file
      )
      self.catid2clsid = {v: k for k, v in self.clsid2catid.items()}
      self.classwise = kwargs.get("classwise", False)
      self.output_eval = kwargs.get("output_eval", None)
      self.save_prediction_only = kwargs.get(
          "save_prediction_only", False
      )
      self.overlap_thresh = kwargs.get("overlap_thresh", 0.5)
      self.map_type = kwargs.get("map_type", "11point")
      self.evaluate_difficult = kwargs.get("evaluate_difficult", False)
      self.imid2path = kwargs.get("imid2path", None)
      class_num = len(self.catid2name)
      self.detection_map = DetectionMAP(
          class_num=class_num,
          overlap_thresh=self.overlap_thresh,
          map_type=self.map_type,
          is_bbox_normalized=False,
          evaluate_difficult=self.evaluate_difficult,
          catid2name=self.catid2name,
          classwise=self.classwise,
      )
  
      self.reset()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import json
  import paddle
  import numpy
  import typing
  from collections import defaultdict
  from pathlib import Path
  from .map_utils import prune_zero_padding, DetectionMAP
  from .coco_utils import get_infer_results, cocoapi_eval
  from .widerface_utils import face_eval_run
  from ppdet.data.source.category import get_categories
  from ppdet.modeling.rbox_utils import poly2rbox_np
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 1 to create a new RBoxMetric object from inherited base classes: Metric with example: obj = RBoxMetric(anno_file)