class_docstr: Dataset for CrowdHuman.
  
  Args:
      data_root (str): The root directory for
          ``data_prefix`` and ``ann_file``.
      ann_file (str): Annotation file path.
      extra_ann_file (str | optional):The path of extra image metas
          for CrowdHuman. It can be created by CrowdHumanDataset
          automatically or by tools/misc/get_crowdhuman_id_hw.py
          manually. Defaults to None.
class_docstr_tok: ["Dataset","for","CrowdHuman",".","Args",":","data_root","(","str",")",":","The","root","directory","for","``","data_prefix","``","and","``","ann_file","``",".","ann_file","(","str",")",":","Annotation","file","path",".","extra_ann_file","(","str","|","optional",")",":","The","path","of","extra","image","metas","for","CrowdHuman",".","It","can","be","created","by","CrowdHumanDataset","automatically","or","by","tools\/misc\/get_crowdhuman_id_hw.py","manually",".","Defaults","to","None","."]
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.
      """
      data_info = {}
      img_path = osp.join(
          self.data_prefix["img"], f"{raw_data_info['ID']}.jpg"
      )
      data_info["img_path"] = img_path
      data_info["img_id"] = raw_data_info["ID"]
  
      if not self.extra_ann_exist:
          img_bytes = get(img_path, backend_args=self.backend_args)
          img = mmcv.imfrombytes(img_bytes, backend="cv2")
          data_info["height"], data_info["width"] = img.shape[:2]
          self.extra_anns[raw_data_info["ID"]] = img.shape[:2]
          del img, img_bytes
      else:
          data_info["height"], data_info["width"] = self.extra_anns[
              raw_data_info["ID"]
          ]
  
      instances = []
      for i, ann in enumerate(raw_data_info["gtboxes"]):
          instance = {}
          if ann["tag"] not in self.metainfo["classes"]:
              instance["bbox_label"] = -1
              instance["ignore_flag"] = 1
          else:
              instance["bbox_label"] = self.metainfo["classes"].index(
                  ann["tag"]
              )
              instance["ignore_flag"] = 0
          if "extra" in ann:
              if "ignore" in ann["extra"]:
                  if ann["extra"]["ignore"] != 0:
                      instance["bbox_label"] = -1
                      instance["ignore_flag"] = 1
  
          x1, y1, w, h = ann["fbox"]
          bbox = [x1, y1, x1 + w, y1 + h]
          instance["bbox"] = bbox
  
          # Record the full bbox(fbox), head bbox(hbox) and visible
          # bbox(vbox) as additional information. If you need to use
          # this information, you just need to design the pipeline
          # instead of overriding the CrowdHumanDataset.
          instance["fbox"] = bbox
          hbox = ann["hbox"]
          instance["hbox"] = [
              hbox[0],
              hbox[1],
              hbox[0] + hbox[2],
              hbox[1] + hbox[3],
          ]
          vbox = ann["vbox"]
          instance["vbox"] = [
              vbox[0],
              vbox[1],
              vbox[0] + vbox[2],
              vbox[1] + vbox[3],
          ]
  
          instances.append(instance)
  
      data_info["instances"] = instances
      return data_info
  
file_path: mmdetection/mmdet/datasets/crowdhuman.py
imports: import json
  import logging
  import os.path
  import warnings
  from typing import List, Union
  import mmcv
  from mmengine.dist import get_rank
  from mmengine.fileio import dump, get, get_text, load
  from mmengine.logging import print_log
  from mmengine.utils import ProgressBar
  from mmdet.registry import DATASETS
  from .base_det_dataset import BaseDetDataset
label_desc: Use image node_id 3 for calling the CrowdHumanDataset obj's underlying member method code with example usage: obj.parse_data_info(raw_data_info) and returns: data_info