code: def main():
      detector = JDE_Detector(
          FLAGS.model_dir,
          tracker_config=None,
          device=FLAGS.device,
          run_mode=FLAGS.run_mode,
          batch_size=1,
          trt_min_shape=FLAGS.trt_min_shape,
          trt_max_shape=FLAGS.trt_max_shape,
          trt_opt_shape=FLAGS.trt_opt_shape,
          trt_calib_mode=FLAGS.trt_calib_mode,
          cpu_threads=FLAGS.cpu_threads,
          enable_mkldnn=FLAGS.enable_mkldnn,
          output_dir=FLAGS.output_dir,
          threshold=FLAGS.threshold,
          save_images=FLAGS.save_images,
          save_mot_txts=FLAGS.save_mot_txts,
      )
  
      # predict from video file or camera video stream
      if FLAGS.video_file is not None or FLAGS.camera_id != -1:
          detector.predict_video(FLAGS.video_file, FLAGS.camera_id)
      else:
          # predict from image
          img_list = get_test_images(FLAGS.image_dir, FLAGS.image_file)
          detector.predict_image(
              img_list, FLAGS.run_benchmark, repeats=10
          )
  
          if not FLAGS.run_benchmark:
              detector.det_times.info(average=True)
          else:
              mode = FLAGS.run_mode
              model_dir = FLAGS.model_dir
              model_info = {
                  "model_name": model_dir.strip("/").split("/")[-1],
                  "precision": mode.split("_")[-1],
              }
              bench_log(detector, img_list, model_info, name="MOT")
  
imports: import os
  import time
  import yaml
  import cv2
  import numpy
  from collections import defaultdict
  import paddle
  from benchmark_utils import PaddleInferBenchmark
  from preprocess import decode_image
  from utils import argsparser, Timer, get_current_memory_mb
  from infer import Detector, get_test_images, print_arguments, bench_log, PredictConfig
  import sys
  from pptracking.python.mot import JDETracker
  from pptracking.python.mot.utils import MOTTimer, write_mot_results
  from pptracking.python.mot.visualize import plot_tracking_dict
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types