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","."]
code: def __init__(self, triplet_sampler: dict = None, *args, **kwargs):
      self.triplet_sampler = triplet_sampler
      super().__init__(*args, **kwargs)
  
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 1 to create a new ReIDDataset object from inherited base classes: BaseDataset with example: obj = ReIDDataset(triplet_sampler)