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 get_additional_inputs(self, dets, meta, with_hm=True):
      # Render input heatmap from previous trackings.
      trans_input = meta["trans_input"]
      inp_width, inp_height = int(meta["inp_width"]), int(
          meta["inp_height"]
      )
      input_hm = np.zeros((1, inp_height, inp_width), dtype=np.float32)
  
      for det in dets:
          if det["score"] < self.tracker.pre_thresh:
              continue
          bbox = affine_transform_bbox(
              det["bbox"], trans_input, inp_width, inp_height
          )
          h, w = bbox[3] - bbox[1], bbox[2] - bbox[0]
          if h > 0 and w > 0:
              radius = gaussian_radius(
                  (math.ceil(h), math.ceil(w)), min_overlap=0.7
              )
              radius = max(0, int(radius))
              ct = np.array(
                  [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2],
                  dtype=np.float32,
              )
              ct_int = ct.astype(np.int32)
              if with_hm:
                  input_hm[0] = draw_umich_gaussian(
                      input_hm[0], ct_int, radius
                  )
      if with_hm:
          input_hm = input_hm[np.newaxis]
      return input_hm
  
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 2 for calling the CenterTrack obj's underlying member method code with example usage: obj.get_additional_inputs(dets, meta, with_hm) and returns: input_hm