class_docstr: Dataset for ReID.
  
  Args:
      triplet_sampler (dict, optional): The sampler for hard mining
          triplet loss. Defaults to None.
      keys: num_ids (int): The number of person ids.
            ins_per_id (int): The number of image for each person.
class_docstr_tok: ["Dataset","for","ReID",".","Args",":","triplet_sampler","(","dict",",","optional",")",":","The","sampler","for","hard","mining","triplet","loss",".","Defaults","to","None",".","keys",":","num_ids","(","int",")",":","The","number","of","person","ids",".","ins_per_id","(","int",")",":","The","number","of","image","for","each","person","."]
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.
      """
      assert isinstance(self.ann_file, str)
      check_file_exist(self.ann_file)
      data_list = []
      with open(self.ann_file) as f:
          samples = [x.strip().split(" ") for x in f.readlines()]
          for filename, gt_label in samples:
              info = dict(img_prefix=self.data_prefix)
              if self.data_prefix["img_path"] is not None:
                  info["img_path"] = osp.join(
                      self.data_prefix["img_path"], filename
                  )
              else:
                  info["img_path"] = filename
              info["gt_label"] = np.array(gt_label, dtype=np.int64)
              data_list.append(info)
      self._parse_ann_info(data_list)
      return data_list
  
file_path: mmdetection/mmdet/datasets/reid_dataset.py
imports: import copy
  import os.path
  from collections import defaultdict
  from typing import Any, Dict, List
  import numpy
  from mmengine.dataset import BaseDataset
  from mmengine.utils import check_file_exist
  from mmdet.registry import DATASETS
label_desc: Use image node_id 2 for calling the ReIDDataset obj's underlying member method code with example usage: obj.load_data_list() and returns: data_list