class_docstr: Base video dataset for VID, MOT and VIS tasks.
class_docstr_tok: ["Base","video","dataset","for","VID",",","MOT","and","VIS","tasks","."]
docstr: Parse raw annotation to target format.
  
  Args:
      raw_data_info (dict): Raw data information loaded from
          ``ann_file``.
  
  Returns:
      dict: Parsed annotation.
docstr_tok: ["Parse","raw","annotation","to","target","format",".","Args",":","raw_data_info","(","dict",")",":","Raw","data","information","loaded","from","``","ann_file","``",".","Returns",":","dict",":","Parsed","annotation","."]
code: def parse_data_info(self, raw_data_info: dict) -> dict:
      """Parse raw annotation to target format.
  
      Args:
          raw_data_info (dict): Raw data information loaded from
              ``ann_file``.
  
      Returns:
          dict: Parsed annotation.
      """
      img_info = raw_data_info["raw_img_info"]
      ann_info = raw_data_info["raw_ann_info"]
      data_info = {}
  
      data_info.update(img_info)
      if self.data_prefix.get("img_path", None) is not None:
          img_path = osp.join(
              self.data_prefix["img_path"], img_info["file_name"]
          )
      else:
          img_path = img_info["file_name"]
      data_info["img_path"] = img_path
  
      instances = []
      for i, ann in enumerate(ann_info):
          instance = {}
  
          if ann.get("ignore", False):
              continue
          x1, y1, w, h = ann["bbox"]
          inter_w = max(0, min(x1 + w, img_info["width"]) - max(x1, 0))
          inter_h = max(0, min(y1 + h, img_info["height"]) - max(y1, 0))
          if inter_w * inter_h == 0:
              continue
          if ann["area"] <= 0 or w < 1 or h < 1:
              continue
          if ann["category_id"] not in self.cat_ids:
              continue
          bbox = [x1, y1, x1 + w, y1 + h]
  
          if ann.get("iscrowd", False):
              instance["ignore_flag"] = 1
          else:
              instance["ignore_flag"] = 0
          instance["bbox"] = bbox
          instance["bbox_label"] = self.cat2label[ann["category_id"]]
          if ann.get("segmentation", None):
              instance["mask"] = ann["segmentation"]
          if ann.get("instance_id", None):
              instance["instance_id"] = ann["instance_id"]
          else:
              # image dataset usually has no `instance_id`.
              # Therefore, we set it to `i`.
              instance["instance_id"] = i
          instances.append(instance)
      data_info["instances"] = instances
      return data_info
  
file_path: mmdetection/mmdet/datasets/base_video_dataset.py
imports: import copy
  import os.path
  from collections import defaultdict
  from typing import Any, List, Tuple
  import mmengine.fileio
  from mmengine.dataset import BaseDataset
  from mmengine.logging import print_log
  from mmdet.datasets.api_wrappers import COCO
  from mmdet.registry import DATASETS
label_desc: Use image node_id 3 for calling the BaseVideoDataset obj's underlying member method code with example usage: obj.parse_data_info(raw_data_info) and returns: data_info