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 _load_images(self):
      images = self._find_images()
      ct = 0
      records = []
      for image in images:
          assert image != "" and os.path.isfile(
              image
          ), "Image {} not found".format(image)
          if self.sample_num > 0 and ct >= self.sample_num:
              break
          rec = {"im_id": np.array([ct]), "im_file": image}
          if self.keep_ori_im:
              rec.update({"keep_ori_im": 1})
          self._imid2path[ct] = image
          ct += 1
          records.append(rec)
      assert len(records) > 0, "No image file found"
      return records
  
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 6 for calling the MOTImageFolder obj's underlying member method code with example usage: obj._load_images() and returns: records