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 centertrack_post_process(self, dets, meta, out_thresh):
      if not ("bboxes" in dets):
          return [{}]
  
      preds = []
      c, s = meta["center"], meta["scale"]
      h, w = meta["out_height"], meta["out_width"]
      trans = get_affine_transform(
          center=c,
          input_size=s,
          rot=0,
          output_size=[w, h],
          shift=(0.0, 0.0),
          inv=True,
      ).astype(np.float32)
      for i, dets_bbox in enumerate(dets["bboxes"]):
          if dets_bbox[1] < out_thresh:
              break
          item = {}
          item["score"] = dets_bbox[1]
          item["class"] = int(dets_bbox[0]) + 1
          item["ct"] = transform_preds_with_trans(
              dets["cts"][i].reshape([1, 2]), trans
          ).reshape(2)
  
          if "tracking" in dets:
              tracking = transform_preds_with_trans(
                  (dets["tracking"][i] + dets["cts"][i]).reshape(
                      [1, 2]
                  ),
                  trans,
              ).reshape(2)
              item["tracking"] = tracking - item["ct"]
  
          if "bboxes" in dets:
              bbox = transform_preds_with_trans(
                  dets_bbox[2:6].reshape([2, 2]), trans
              ).reshape(4)
              item["bbox"] = bbox
  
          preds.append(item)
      return preds
  
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 5 for calling the CenterTrack obj's underlying member method code with example usage: obj.centertrack_post_process(dets, meta, out_thresh) and returns: preds, list