class_docstr: Load dataset with MOT format, only support single class MOT.
  
  Args:
      dataset_dir (str): root directory for dataset.
      image_lists (str|list): mot data image lists, muiti-source mot dataset.
      data_fields (list): key name of data dictionary, at least have 'image'.
      sample_num (int): number of samples to load, -1 means all.
      repeat (int): repeat times for dataset, use in benchmark.
  
  Notes:
      MOT datasets root directory following this:
          dataset/mot
          |——————image_lists
          |        |——————caltech.train  
          |        |——————caltech.val   
          |        |——————mot16.train  
          |        |——————mot17.train  
          |        ......
          |——————Caltech
          |——————MOT17
          |——————......
  
      All the MOT datasets have the following structure:
          Caltech
          |——————images
          |        └——————00001.jpg
          |        |—————— ...
          |        └——————0000N.jpg
          └——————labels_with_ids
                      └——————00001.txt
                      |—————— ...
                      └——————0000N.txt
          or
  
          MOT17
          |——————images
          |        └——————train
          |        └——————test
          └——————labels_with_ids
                      └——————train
class_docstr_tok: ["Load","dataset","with","MOT","format",",","only","support","single","class","MOT",".","Args",":","dataset_dir","(","str",")",":","root","directory","for","dataset",".","image_lists","(","str|list",")",":","mot","data","image","lists",",","muiti-source","mot","dataset",".","data_fields","(","list",")",":","key","name","of","data","dictionary",",","at","least","have","'image","'",".","sample_num","(","int",")",":","number","of","samples","to","load",",","-1","means","all",".","repeat","(","int",")",":","repeat","times","for","dataset",",","use","in","benchmark",".","Notes",":","MOT","datasets","root","directory","following","this",":","dataset\/mot","|\u2014\u2014\u2014\u2014\u2014\u2014image_lists","|","|\u2014\u2014\u2014\u2014\u2014\u2014caltech.train","|","|\u2014\u2014\u2014\u2014\u2014\u2014caltech.val","|","|\u2014\u2014\u2014\u2014\u2014\u2014mot16.train","|","|\u2014\u2014\u2014\u2014\u2014\u2014mot17.train","|","......","|\u2014\u2014\u2014\u2014\u2014\u2014Caltech","|\u2014\u2014\u2014\u2014\u2014\u2014MOT17","|\u2014\u2014\u2014\u2014\u2014\u2014","......","All","the","MOT","datasets","have","the","following","structure",":","Caltech","|\u2014\u2014\u2014\u2014\u2014\u2014images","|","\u2514\u2014\u2014\u2014\u2014\u2014\u201400001.jpg","|","|\u2014\u2014\u2014\u2014\u2014\u2014","...","|","\u2514\u2014\u2014\u2014\u2014\u2014\u20140000N.jpg","\u2514\u2014\u2014\u2014\u2014\u2014\u2014labels_with_ids","\u2514\u2014\u2014\u2014\u2014\u2014\u201400001.txt","|\u2014\u2014\u2014\u2014\u2014\u2014","...","\u2514\u2014\u2014\u2014\u2014\u2014\u20140000N.txt","or","MOT17","|\u2014\u2014\u2014\u2014\u2014\u2014images","|","\u2514\u2014\u2014\u2014\u2014\u2014\u2014train","|","\u2514\u2014\u2014\u2014\u2014\u2014\u2014test","\u2514\u2014\u2014\u2014\u2014\u2014\u2014labels_with_ids","\u2514\u2014\u2014\u2014\u2014\u2014\u2014train"]
code: def get_anno(self):
      if self.image_lists == []:
          return
      # only used to get categories and metric
      # only check first data, but the label_list of all data should be same.
      first_mot_data = self.image_lists[0].split(".")[0]
      anno_file = os.path.join(
          self.dataset_dir, first_mot_data, "label_list.txt"
      )
      return anno_file
  
imports: import os
  import sys
  import cv2
  import glob
  import numpy
  from collections import OrderedDict, defaultdict
  from .dataset import DetDataset, _make_dataset, _is_valid_file
  from ppdet.core.workspace import register, serializable
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 2 for calling the MOTDataSet obj's underlying member method code with example usage: obj.get_anno() and returns: anno_file