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: Parse person id annotations.
docstr_tok: ["Parse","person","id","annotations","."]
code: def _parse_ann_info(self, data_list: List[dict]):
      """Parse person id annotations."""
      index_tmp_dic = defaultdict(list)  # pid->[idx1,...,idxN]
      self.index_dic = dict()  # pid->array([idx1,...,idxN])
      for idx, info in enumerate(data_list):
          pid = info["gt_label"]
          index_tmp_dic[int(pid)].append(idx)
      for pid, idxs in index_tmp_dic.items():
          self.index_dic[pid] = np.asarray(idxs, dtype=np.int64)
      self.pids = np.asarray(
          list(self.index_dic.keys()), dtype=np.int64
      )
  
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 3 for calling the ReIDDataset obj's underlying member method code with example usage: obj._parse_ann_info(data_list) without return types