class_docstr: OpenImages evaluation metric.
  
  Evaluate detection mAP for OpenImages. Please refer to
  https://storage.googleapis.com/openimages/web/evaluation.html for more
  details.
  
  Args:
      iou_thrs (float or List[float]): IoU threshold. Defaults to 0.5.
      ioa_thrs (float or List[float]): IoA threshold. Defaults to 0.5.
      scale_ranges (List[tuple], optional): Scale ranges for evaluating
          mAP. If not specified, all bounding boxes would be included in
          evaluation. Defaults to None
      use_group_of (bool): Whether consider group of groud truth bboxes
          during evaluating. Defaults to True.
      get_supercategory (bool): Whether to get parent class of the
          current class. Default: True.
      filter_labels (bool): Whether filter unannotated classes.
          Default: True.
      collect_device (str): Device name used for collecting results from
          different ranks during distributed training. Must be 'cpu' or
          'gpu'. Defaults to 'cpu'.
      prefix (str, optional): The prefix that will be added in the metric
          names to disambiguate homonymous metrics of different evaluators.
          If prefix is not provided in the argument, self.default_prefix
          will be used instead. Defaults to None.
class_docstr_tok: ["OpenImages","evaluation","metric",".","Evaluate","detection","mAP","for","OpenImages",".","Please","refer","to","https",":","\/\/storage.googleapis.com\/openimages\/web\/evaluation.html","for","more","details",".","Args",":","iou_thrs","(","float","or","List","[","float","]",")",":","IoU","threshold",".","Defaults","to","0.5.","ioa_thrs","(","float","or","List","[","float","]",")",":","IoA","threshold",".","Defaults","to","0.5.","scale_ranges","(","List","[","tuple","]",",","optional",")",":","Scale","ranges","for","evaluating","mAP",".","If","not","specified",",","all","bounding","boxes","would","be","included","in","evaluation",".","Defaults","to","None","use_group_of","(","bool",")",":","Whether","consider","group","of","groud","truth","bboxes","during","evaluating",".","Defaults","to","True",".","get_supercategory","(","bool",")",":","Whether","to","get","parent","class","of","the","current","class",".","Default",":","True",".","filter_labels","(","bool",")",":","Whether","filter","unannotated","classes",".","Default",":","True",".","collect_device","(","str",")",":","Device","name","used","for","collecting","results","from","different","ranks","during","distributed","training",".","Must","be","'cpu","'","or","'gpu","'",".","Defaults","to","'cpu","'",".","prefix","(","str",",","optional",")",":","The","prefix","that","will","be","added","in","the","metric","names","to","disambiguate","homonymous","metrics","of","different","evaluators",".","If","prefix","is","not","provided","in","the","argument",",","self.default_prefix","will","be","used","instead",".","Defaults","to","None","."]
docstr: Get parent classes's annotation of the corresponding class.
  
  Args:
      instances (List[dict]): A list of annotations of the instances.
  
  Returns:
      List[dict]: Annotations extended with super-category.
docstr_tok: ["Get","parent","classes","'s","annotation","of","the","corresponding","class",".","Args",":","instances","(","List","[","dict","]",")",":","A","list","of","annotations","of","the","instances",".","Returns",":","List","[","dict","]",":","Annotations","extended","with","super-category","."]
code: def _get_supercategory_ann(self, instances: List[dict]) -> List[dict]:
      """Get parent classes's annotation of the corresponding class.
  
      Args:
          instances (List[dict]): A list of annotations of the instances.
  
      Returns:
          List[dict]: Annotations extended with super-category.
      """
      supercat_instances = []
      relation_matrix = self.dataset_meta["RELATION_MATRIX"]
      for instance in instances:
          labels = np.where(relation_matrix[instance["bbox_label"]])[0]
          for label in labels:
              if label == instance["bbox_label"]:
                  continue
              new_instance = copy.deepcopy(instance)
              new_instance["bbox_label"] = label
              supercat_instances.append(new_instance)
      return supercat_instances
  
file_path: mmdetection/mmdet/evaluation/metrics/openimages_metric.py
imports: import copy
  from collections import OrderedDict
  from typing import List, Optional, Sequence, Union
  import numpy
  from mmengine.evaluator import BaseMetric
  from mmengine.logging import MMLogger, print_log
  from mmdet.registry import METRICS
  from ..functional import eval_map
label_desc: Use image node_id 2 for calling the OpenImagesMetric obj's underlying member method code with example usage: obj._get_supercategory_ann(instances) and returns: supercat_instances