class_docstr: COCO evaluation metric.
  
  Evaluate AR, AP, and mAP for detection tasks including proposal/box
  detection and instance segmentation. Please refer to
  https://cocodataset.org/#detection-eval for more details.
docstr: Process one batch of data samples and predictions.
  
  The processed results should be stored in ``self.results``, which will
  be used to compute the metrics when all batches have been processed.
  
  Args:
      data_batch (dict): A batch of data from the dataloader.
      data_samples (Sequence[dict]): A batch of data samples that
          contain annotations and predictions.
docstr_tok: ["Process","one","batch","of","data","samples","and","predictions",".","The","processed","results","should","be","stored","in","``","self.results","``",",","which","will","be","used","to","compute","the","metrics","when","all","batches","have","been","processed",".","Args",":","data_batch","(","dict",")",":","A","batch","of","data","from","the","dataloader",".","data_samples","(","Sequence","[","dict","]",")",":","A","batch","of","data","samples","that","contain","annotations","and","predictions","."]
code: def process(
      self, data_batch: dict, data_samples: Sequence[dict]
  ) -> None:
      """Process one batch of data samples and predictions.
  
      The processed results should be stored in ``self.results``, which will
      be used to compute the metrics when all batches have been processed.
  
      Args:
          data_batch (dict): A batch of data from the dataloader.
          data_samples (Sequence[dict]): A batch of data samples that
              contain annotations and predictions.
      """
      for track_data_sample in data_samples:
          video_data_samples = track_data_sample["video_data_samples"]
          ori_video_len = video_data_samples[0].ori_video_length
          video_len = len(video_data_samples)
          if ori_video_len == video_len:
              # video process
              for frame_id in range(video_len):
                  img_data_sample = video_data_samples[
                      frame_id
                  ].to_dict()
                  super().process(None, [img_data_sample])
          else:
              # image process
              img_data_sample = video_data_samples[0].to_dict()
              super().process(None, [img_data_sample])
  
file_path: mmdetection/mmdet/evaluation/metrics/coco_video_metric.py
imports: import warnings
  from typing import Sequence
  from mmengine.dist import broadcast_object_list, is_main_process
  from mmdet.registry import METRICS
  from .base_video_metric import collect_tracking_results
  from .coco_metric import CocoMetric
label_desc: Use image node_id 1 for calling the CocoVideoMetric obj's underlying member method code with example usage: obj.process(data_batch, data_samples) without return types