class_docstr: mAP evaluation metrics for the VIS task.
  
  Args:
      metric (str | list[str]): Metrics to be evaluated.
          Default value is `youtube_vis_ap`.
      metric_items (List[str], optional): Metric result names to be
          recorded in the evaluation result. Defaults to None.
      outfile_prefix (str | None): The prefix of json files. It includes
          the file path and the prefix of filename, e.g., "a/b/prefix".
          If not specified, a temp file will be created. Defaults to None.
      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 homonyms metrics of different evaluators.
          If prefix is not provided in the argument, self.default_prefix
          will be used instead. Default: None
      format_only (bool): If True, only formatting the results to the
          official format and not performing evaluation. Defaults to False.
docstr: Compute the metrics from processed results.
  
  Args:
      results (List): The processed results of each batch.
  
  Returns:
      Dict[str, float]: 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","[","str",",","float","]",":","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[str, float]:
      """Compute the metrics from processed results.
  
      Args:
          results (List): The processed results of each batch.
  
      Returns:
          Dict[str, float]: The computed metrics. The keys are the names of
          the metrics, and the values are corresponding results.
      """
      # split gt and prediction list
      tmp_pred_results, tmp_gt_results = zip(*results)
      gt_results = self.format_gts(tmp_gt_results)
      pred_results = self.format_preds(tmp_pred_results)
  
      if self.format_only:
          self.save_pred_results(pred_results)
          return dict()
  
      ytvis = YTVIS(gt_results)
  
      ytvis_dets = ytvis.loadRes(pred_results)
      vid_ids = ytvis.getVidIds()
  
      iou_type = metric = "segm"
      eval_results = OrderedDict()
      ytvisEval = YTVISeval(ytvis, ytvis_dets, iou_type)
      ytvisEval.params.vidIds = vid_ids
      ytvisEval.evaluate()
      ytvisEval.accumulate()
      ytvisEval.summarize()
  
      coco_metric_names = {
          "mAP": 0,
          "mAP_50": 1,
          "mAP_75": 2,
          "mAP_s": 3,
          "mAP_m": 4,
          "mAP_l": 5,
          "AR@1": 6,
          "AR@10": 7,
          "AR@100": 8,
          "AR_s@100": 9,
          "AR_m@100": 10,
          "AR_l@100": 11,
      }
      metric_items = self.metric_items
      if metric_items is not None:
          for metric_item in metric_items:
              if metric_item not in coco_metric_names:
                  raise KeyError(
                      f'metric item "{metric_item}" is not supported'
                  )
  
      if metric_items is None:
          metric_items = [
              "mAP",
              "mAP_50",
              "mAP_75",
              "mAP_s",
              "mAP_m",
              "mAP_l",
          ]
      for metric_item in metric_items:
          key = f"{metric}_{metric_item}"
          val = float(
              f"{ytvisEval.stats[coco_metric_names[metric_item]]:.3f}"
          )
          eval_results[key] = val
  
      return eval_results
  
imports: import os.path
  import tempfile
  import warnings
  import zipfile
  from collections import OrderedDict, defaultdict
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import mmengine
  import numpy
  from mmengine.dist import all_gather_object, barrier, broadcast_object_list, is_main_process
  from mmengine.logging import MMLogger
  from mmdet.registry import METRICS
  from mmdet.structures.mask import encode_mask_results
  from ..functional import YTVIS, YTVISeval
  from .base_video_metric import BaseVideoMetric, collect_tracking_results
label_desc: Use image node_id 3 for calling the YouTubeVISMetric obj's underlying member method code with example usage: obj.compute_metrics(results) and returns: eval_results, dict