class_docstr: Args:
      model_dir (str): root path of model.pdiparams, model.pdmodel and infer_cfg.yml
      device (str): Choose the device you want to run, it can be: CPU/GPU/XPU/NPU, default is CPU
      run_mode (str): mode of running(paddle/trt_fp32/trt_fp16)
      batch_size (int): size of pre batch in inference
      trt_min_shape (int): min shape for dynamic shape in trt
      trt_max_shape (int): max shape for dynamic shape in trt
      trt_opt_shape (int): opt shape for dynamic shape in trt
      trt_calib_mode (bool): If the model is produced by TRT offline quantitative
          calibration, trt_calib_mode need to set True
      cpu_threads (int): cpu threads
      enable_mkldnn (bool): whether to open MKLDNN
      output_dir (string): The path of output, default as 'output'
      threshold (float): Score threshold of the detected bbox, default as 0.5
      save_images (bool): Whether to save visualization image results, default as False
      save_mot_txts (bool): Whether to save tracking results (txt), default as False
class_docstr_tok: ["Args",":","model_dir","(","str",")",":","root","path","of","model.pdiparams",",","model.pdmodel","and","infer_cfg.yml","device","(","str",")",":","Choose","the","device","you","want","to","run",",","it","can","be",":","CPU\/GPU\/XPU\/NPU",",","default","is","CPU","run_mode","(","str",")",":","mode","of","running","(","paddle\/trt_fp32\/trt_fp16",")","batch_size","(","int",")",":","size","of","pre","batch","in","inference","trt_min_shape","(","int",")",":","min","shape","for","dynamic","shape","in","trt","trt_max_shape","(","int",")",":","max","shape","for","dynamic","shape","in","trt","trt_opt_shape","(","int",")",":","opt","shape","for","dynamic","shape","in","trt","trt_calib_mode","(","bool",")",":","If","the","model","is","produced","by","TRT","offline","quantitative","calibration",",","trt_calib_mode","need","to","set","True","cpu_threads","(","int",")",":","cpu","threads","enable_mkldnn","(","bool",")",":","whether","to","open","MKLDNN","output_dir","(","string",")",":","The","path","of","output",",","default","as","'output'","threshold","(","float",")",":","Score","threshold","of","the","detected","bbox",",","default","as","0.5","save_images","(","bool",")",":","Whether","to","save","visualization","image","results",",","default","as","False","save_mot_txts","(","bool",")",":","Whether","to","save","tracking","results","(","txt",")",",","default","as","False"]
code: def preprocess(self, image_list):
      preprocess_ops = []
      for op_info in self.pred_config.preprocess_infos:
          new_op_info = op_info.copy()
          op_type = new_op_info.pop("type")
          preprocess_ops.append(eval(op_type)(**new_op_info))
  
      assert len(image_list) == 1, "MOT only support bs=1"
      im_path = image_list[0]
      im, im_info = preprocess(im_path, preprocess_ops)
      # inputs = create_inputs(im, im_info)
      inputs = {}
      inputs["image"] = np.array((im,)).astype("float32")
      inputs["im_shape"] = np.array((im_info["im_shape"],)).astype(
          "float32"
      )
      inputs["scale_factor"] = np.array(
          (im_info["scale_factor"],)
      ).astype("float32")
  
      inputs["trans_input"] = im_info["trans_input"]
      inputs["inp_width"] = im_info["inp_width"]
      inputs["inp_height"] = im_info["inp_height"]
      inputs["center"] = im_info["center"]
      inputs["scale"] = im_info["scale"]
      inputs["out_height"] = im_info["out_height"]
      inputs["out_width"] = im_info["out_width"]
  
      if self.pre_image is None:
          self.pre_image = inputs["image"]
          # initializing tracker for the first frame
          self.tracker.init_track([])
      inputs["pre_image"] = self.pre_image
      self.pre_image = inputs["image"]  # Note: update for next image
  
      # render input heatmap from tracker status
      pre_hm = self.get_additional_inputs(
          self.tracker.tracks, inputs, with_hm=True
      )
      inputs["pre_hm"] = pre_hm  # .to_tensor(pre_hm)
  
      input_names = self.predictor.get_input_names()
      for i in range(len(input_names)):
          input_tensor = self.predictor.get_input_handle(input_names[i])
          if input_names[i] == "x":
              input_tensor.copy_from_cpu(inputs["image"])
          else:
              input_tensor.copy_from_cpu(inputs[input_names[i]])
  
      return inputs
  
imports: import os
  import copy
  import math
  import time
  import yaml
  import cv2
  import numpy
  from collections import defaultdict
  import paddle
  from benchmark_utils import PaddleInferBenchmark
  from utils import gaussian_radius, gaussian2D, draw_umich_gaussian
  from preprocess import preprocess, decode_image, WarpAffine, NormalizeImage, Permute
  from utils import argsparser, Timer, get_current_memory_mb
  from infer import Detector, get_test_images, print_arguments, bench_log, PredictConfig
  from keypoint_preprocess import get_affine_transform
  import sys
  from pptracking.python.mot import CenterTracker
  from pptracking.python.mot.utils import MOTTimer, write_mot_results
  from pptracking.python.mot.visualize import plot_tracking
label_desc: Use image node_id 3 for calling the CenterTrack obj's underlying member method code with example usage: obj.preprocess(image_list) and returns: inputs