class_docstr: LVIS v1 dataset for detection.
class_docstr_tok: ["LVIS","v1","dataset","for","detection","."]
docstr: Parse raw annotation to target format.
  
  Args:
      raw_data_info (dict): Raw data information load from ``ann_file``
  
  Returns:
      Union[dict, List[dict]]: Parsed annotation.
docstr_tok: ["Parse","raw","annotation","to","target","format",".","Args",":","raw_data_info","(","dict",")",":","Raw","data","information","load","from","``","ann_file","``","Returns",":","Union","[","dict",",","List","[","dict","]","]",":","Parsed","annotation","."]
code: def parse_data_info(
      self, raw_data_info: dict
  ) -> Union[dict, List[dict]]:
      """Parse raw annotation to target format.
  
      Args:
          raw_data_info (dict): Raw data information load from ``ann_file``
  
      Returns:
          Union[dict, List[dict]]: Parsed annotation.
      """
      img_info = raw_data_info["raw_img_info"]
  
      data_info = {}
  
      # TODO: need to change data_prefix['img'] to data_prefix['img_path']
      img_path = osp.join(
          self.data_prefix["img"], img_info["file_name"]
      )
      if self.data_prefix.get("seg", None):
          seg_map_path = osp.join(
              self.data_prefix["seg"],
              img_info["file_name"].rsplit(".", 1)[0]
              + self.seg_map_suffix,
          )
      else:
          seg_map_path = None
      data_info["img_path"] = img_path
      data_info["img_id"] = img_info["img_id"]
      data_info["seg_map_path"] = seg_map_path
      data_info["height"] = img_info["height"]
      data_info["width"] = img_info["width"]
  
      if self.return_classes:
          data_info["text"] = self.metainfo["classes"]
          data_info["custom_entities"] = True
  
      instances = []
      image_labels = [
          self.cat2label[x] for x in img_info["pos_category_ids"]
      ]
      for image_label in image_labels:
          instance = {}
          instance["bbox_label"] = image_label
          instances.append(instance)
      data_info["instances"] = instances
  
      return data_info
  
file_path: mmdetection/projects/Detic_new/detic/imagenet_lvis.py
imports: import copy
  import os.path
  import pickle
  import warnings
  from typing import List, Union
  from mmengine.fileio import get_local_path
  from mmdet.datasets import LVISV1Dataset
  from mmdet.registry import DATASETS
label_desc: Use image node_id 3 for calling the ImageNetLVISV1Dataset obj's underlying member method code with example usage: obj.parse_data_info(raw_data_info) and returns: data_info