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","."]
code: def __init__(
      self, data_root, ann_file, extra_ann_file=None, **kwargs
  ):
      # extra_ann_file record the size of each image. This file is
      # automatically created when you first load the CrowdHuman
      # dataset by mmdet.
      if extra_ann_file is not None:
          self.extra_ann_exist = True
          self.extra_anns = load(extra_ann_file)
      else:
          ann_file_name = osp.basename(ann_file)
          if "train" in ann_file_name:
              self.extra_ann_file = osp.join(
                  data_root, "id_hw_train.json"
              )
          elif "val" in ann_file_name:
              self.extra_ann_file = osp.join(
                  data_root, "id_hw_val.json"
              )
          self.extra_ann_exist = False
          if not osp.isfile(self.extra_ann_file):
              print_log(
                  "extra_ann_file does not exist, prepare to collect "
                  "image height and width...",
                  level=logging.INFO,
              )
              self.extra_anns = {}
          else:
              self.extra_ann_exist = True
              self.extra_anns = load(self.extra_ann_file)
      super().__init__(data_root=data_root, ann_file=ann_file, **kwargs)
  
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 1 to create a new CrowdHumanDataset object from inherited base classes: BaseDetDataset with example: obj = CrowdHumanDataset(data_root, ann_file, extra_ann_file)