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: Load annotations from an annotation file named as ``self.ann_file``
  
  Returns:
      List[dict]: A list of annotation.
docstr_tok: ["Load","annotations","from","an","annotation","file","named","as","``","self.ann_file","``","Returns",":","List","[","dict","]",":","A","list","of","annotation","."]
code: def load_data_list(self) -> List[dict]:
      """Load annotations from an annotation file named as ``self.ann_file``
  
      Returns:
          List[dict]: A list of annotation.
      """  # noqa: E501
      anno_strs = (
          get_text(self.ann_file, backend_args=self.backend_args)
          .strip()
          .split("\n")
      )
      print_log("loading CrowdHuman annotation...", level=logging.INFO)
      data_list = []
      prog_bar = ProgressBar(len(anno_strs))
      for i, anno_str in enumerate(anno_strs):
          anno_dict = json.loads(anno_str)
          parsed_data_info = self.parse_data_info(anno_dict)
          data_list.append(parsed_data_info)
          prog_bar.update()
      if not self.extra_ann_exist and get_rank() == 0:
          #  TODO: support file client
          try:
              dump(
                  self.extra_anns,
                  self.extra_ann_file,
                  file_format="json",
              )
          except:  # noqa
              warnings.warn(
                  "Cache files can not be saved automatically! To speed up"
                  "loading the dataset, please manually generate the cache"
                  " file by file tools/misc/get_crowdhuman_id_hw.py"
              )
  
          print_log(
              f"\nsave extra_ann_file in {self.data_root}",
              level=logging.INFO,
          )
  
      del self.extra_anns
      print_log("\nDone", level=logging.INFO)
      return data_list
  
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 2 for calling the CrowdHumanDataset obj's underlying member method code with example usage: obj.load_data_list() and returns: data_list