code: def mot_predict_seq(
      self,
      video_file,
      frame_rate,
      image_dir,
      output_dir,
      data_type="mot",
      model_type="JDE",
      save_images=False,
      save_videos=True,
      show_image=False,
      scaled=False,
      det_results_dir="",
      draw_threshold=0.5,
  ):
      assert (
          video_file is not None or image_dir is not None
      ), "--video_file or --image_dir should be set."
      assert video_file is None or os.path.isfile(
          video_file
      ), "{} is not a file".format(video_file)
      assert image_dir is None or os.path.isdir(
          image_dir
      ), "{} is not a directory".format(image_dir)
  
      if not os.path.exists(output_dir):
          os.makedirs(output_dir)
      result_root = os.path.join(output_dir, "mot_results")
      if not os.path.exists(result_root):
          os.makedirs(result_root)
      assert (
          data_type in MOT_DATA_TYPE
      ), "data_type should be 'mot', 'mcmot' or 'kitti'"
      assert (
          model_type in MOT_ARCH
      ), "model_type should be 'JDE', 'DeepSORT', 'FairMOT' or 'ByteTrack'"
  
      # run tracking
      if video_file:
          seq = video_file.split("/")[-1].split(".")[0]
          self.dataset.set_video(video_file, frame_rate)
          logger.info("Starting tracking video {}".format(video_file))
      elif image_dir:
          seq = image_dir.split("/")[-1].split(".")[0]
          if os.path.exists(os.path.join(image_dir, "img1")):
              image_dir = os.path.join(image_dir, "img1")
          images = [
              "{}/{}".format(image_dir, x)
              for x in os.listdir(image_dir)
          ]
          images.sort()
          self.dataset.set_images(images)
          logger.info(
              "Starting tracking folder {}, found {} images".format(
                  image_dir, len(images)
              )
          )
      else:
          raise ValueError("--video_file or --image_dir should be set.")
  
      save_dir = (
          os.path.join(output_dir, "mot_outputs", seq)
          if save_images or save_videos
          else None
      )
  
      dataloader = create("TestMOTReader")(self.dataset, 0)
      result_filename = os.path.join(result_root, "{}.txt".format(seq))
      if frame_rate == -1:
          frame_rate = self.dataset.frame_rate
  
      with paddle.no_grad():
          if model_type in MOT_ARCH_JDE:
              results, nf, ta, tc = self._eval_seq_jde(
                  dataloader,
                  save_dir=save_dir,
                  show_image=show_image,
                  frame_rate=frame_rate,
                  draw_threshold=draw_threshold,
              )
          elif model_type in MOT_ARCH_SDE:
              results, nf, ta, tc = self._eval_seq_sde(
                  dataloader,
                  save_dir=save_dir,
                  show_image=show_image,
                  frame_rate=frame_rate,
                  seq_name=seq,
                  scaled=scaled,
                  det_file=os.path.join(
                      det_results_dir, "{}.txt".format(seq)
                  ),
                  draw_threshold=draw_threshold,
              )
          elif model_type == "CenterTrack":
              results, nf, ta, tc = self._eval_seq_centertrack(
                  dataloader,
                  save_dir=save_dir,
                  show_image=show_image,
                  frame_rate=frame_rate,
              )
          else:
              raise ValueError(model_type)
  
      if save_videos:
          output_video_path = os.path.join(
              save_dir, "..", "{}_vis.mp4".format(seq)
          )
          cmd_str = "ffmpeg -f image2 -i {}/%05d.jpg {}".format(
              save_dir, output_video_path
          )
          os.system(cmd_str)
          logger.info("Save video in {}".format(output_video_path))
  
      write_mot_results(
          result_filename, results, data_type, self.cfg.num_classes
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import glob
  import re
  import paddle
  import paddle.nn
  import numpy
  from tqdm import tqdm
  from collections import defaultdict
  from ppdet.core.workspace import create
  from ppdet.utils.checkpoint import load_weight, load_pretrain_weight
  from ppdet.modeling.mot.utils import Detection, get_crops, scale_coords, clip_box
  from ppdet.modeling.mot.utils import MOTTimer, load_det_results, write_mot_results, save_vis_results
  from ppdet.modeling.mot.tracker import JDETracker, CenterTracker
  from ppdet.modeling.mot.tracker import DeepSORTTracker, OCSORTTracker, BOTSORTTracker
  from ppdet.modeling.architectures import YOLOX
  from ppdet.metrics import Metric, MOTMetric, KITTIMOTMetric, MCMOTMetric
  from ppdet.data.source.category import get_categories
  import ppdet.utils.stats
  from .callbacks import Callback, ComposeCallback
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 14 for calling the Tracker obj's underlying member method code with example usage: obj.mot_predict_seq(video_file, frame_rate, image_dir, output_dir, data_type, model_type, save_images, save_videos, show_image, scaled, det_results_dir, draw_threshold) without return types