class_docstr: Load MOT dataset with MOT format from image folder or video .
  Args:
      video_file (str): path of the video file, default ''.
      frame_rate (int): frame rate of the video, use cv2 VideoCapture if not set.
      dataset_dir (str): root directory for dataset.
      keep_ori_im (bool): whether to keep original image, default False. 
          Set True when used during MOT model inference while saving
          images or video, or used in DeepSORT.
class_docstr_tok: ["Load","MOT","dataset","with","MOT","format","from","image","folder","or","video",".","Args",":","video_file","(","str",")",":","path","of","the","video","file",",","default","``",".","frame_rate","(","int",")",":","frame","rate","of","the","video",",","use","cv2","VideoCapture","if","not","set",".","dataset_dir","(","str",")",":","root","directory","for","dataset",".","keep_ori_im","(","bool",")",":","whether","to","keep","original","image",",","default","False",".","Set","True","when","used","during","MOT","model","inference","while","saving","images","or","video",",","or","used","in","DeepSORT","."]
code: def __init__(
      self,
      video_file=None,
      frame_rate=-1,
      dataset_dir=None,
      data_root=None,
      image_dir=None,
      sample_num=-1,
      keep_ori_im=False,
      anno_path=None,
      **kwargs,
  ):
      super(MOTImageFolder, self).__init__(
          dataset_dir, image_dir, sample_num=sample_num
      )
      self.video_file = video_file
      self.data_root = data_root
      self.keep_ori_im = keep_ori_im
      self._imid2path = {}
      self.roidbs = None
      self.frame_rate = frame_rate
      self.anno_path = anno_path
  
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 1 to create a new MOTImageFolder object from inherited base classes: DetDataset with example: obj = MOTImageFolder(video_file, frame_rate, dataset_dir, data_root, image_dir, sample_num, keep_ori_im, anno_path)