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: Compute the metrics from processed results.
  
  Args:
      results (list): The processed results of each batch.
  
  Returns:
      dict: The computed metrics. The keys are the names of the metrics,
      and the values are corresponding results.
docstr_tok: ["Compute","the","metrics","from","processed","results",".","Args",":","results","(","list",")",":","The","processed","results","of","each","batch",".","Returns",":","dict",":","The","computed","metrics",".","The","keys","are","the","names","of","the","metrics",",","and","the","values","are","corresponding","results","."]
code: def compute_metrics(self, results: list) -> dict:
      """Compute the metrics from processed results.
  
      Args:
          results (list): The processed results of each batch.
  
      Returns:
          dict: The computed metrics. The keys are the names of the metrics,
          and the values are corresponding results.
      """
      logger = MMLogger.get_current_instance()
      gts, preds = zip(*results)
      eval_results = OrderedDict()
      # get dataset type
      dataset_type = self.dataset_meta.get("dataset_type")
      if dataset_type not in ["oid_challenge", "oid_v6"]:
          dataset_type = "oid_v6"
          print_log(
              "Cannot infer dataset type from the length of the"
              " classes. Set `oid_v6` as dataset type.",
              logger="current",
          )
      mean_aps = []
      for i, (iou_thr, ioa_thr) in enumerate(
          zip(self.iou_thrs, self.ioa_thrs)
      ):
          if self.use_group_of:
              assert ioa_thr is not None, (
                  "ioa_thr must have value when"
                  " using group_of in evaluation."
              )
          print_log(
              f'\n{"-" * 15}iou_thr, ioa_thr: {iou_thr}, {ioa_thr}'
              f'{"-" * 15}'
          )
          mean_ap, _ = eval_map(
              preds,
              gts,
              scale_ranges=self.scale_ranges,
              iou_thr=iou_thr,
              ioa_thr=ioa_thr,
              dataset=dataset_type,
              logger=logger,
              use_group_of=self.use_group_of,
          )
  
          mean_aps.append(mean_ap)
          eval_results[f"AP{int(iou_thr * 100):02d}"] = round(
              mean_ap, 3
          )
      eval_results["mAP"] = sum(mean_aps) / len(mean_aps)
      return eval_results
  
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 5 for calling the OpenImagesMetric obj's underlying member method code with example usage: obj.compute_metrics(results) and returns: eval_results