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
      draw_center_traj (bool): Whether drawing the trajectory of center, default as False
      secs_interval (int): The seconds interval to count after tracking, default as 10
      skip_frame_num (int): Skip frame num to get faster MOT results, default as -1
      do_entrance_counting(bool): Whether counting the numbers of identifiers entering 
          or getting out from the entrance, default as False，only support single class
          counting in MOT.
      do_break_in_counting(bool): Whether counting the numbers of identifiers break in
          the area, default as False，only support single class counting in MOT,
          and the video should be taken by a static camera.
      region_type (str): Area type for entrance counting or break in counting, 'horizontal'
          and 'vertical' used when do entrance counting. 'custom' used when do break in counting. 
          Note that only support single-class MOT, and the video should be taken by a static camera.
      region_polygon (list): Clockwise point coords (x0,y0,x1,y1...) of polygon of area when
          do_break_in_counting. Note that only support single-class MOT and
          the video should be taken by a static camera.
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","draw_center_traj","(","bool",")",":","Whether","drawing","the","trajectory","of","center",",","default","as","False","secs_interval","(","int",")",":","The","seconds","interval","to","count","after","tracking",",","default","as","10","skip_frame_num","(","int",")",":","Skip","frame","num","to","get","faster","MOT","results",",","default","as","-1","do_entrance_counting","(","bool",")",":","Whether","counting","the","numbers","of","identifiers","entering","or","getting","out","from","the","entrance",",","default","as","False\uff0conly","support","single","class","counting","in","MOT",".","do_break_in_counting","(","bool",")",":","Whether","counting","the","numbers","of","identifiers","break","in","the","area",",","default","as","False\uff0conly","support","single","class","counting","in","MOT",",","and","the","video","should","be","taken","by","a","static","camera",".","region_type","(","str",")",":","Area","type","for","entrance","counting","or","break","in","counting",",","'horizontal'","and","'vertical","'","used","when","do","entrance","counting",".","'custom","'","used","when","do","break","in","counting",".","Note","that","only","support","single-class","MOT",",","and","the","video","should","be","taken","by","a","static","camera",".","region_polygon","(","list",")",":","Clockwise","point","coords","(","x0",",","y0",",","x1",",","y1","...",")","of","polygon","of","area","when","do_break_in_counting",".","Note","that","only","support","single-class","MOT","and","the","video","should","be","taken","by","a","static","camera","."]
code: def postprocess(self, inputs, result):
      # postprocess output of predictor
      np_boxes = result["pred_dets"]
      if np_boxes.shape[0] <= 0:
          print("[WARNNING] No object detected.")
          result = {"pred_dets": np.zeros([0, 6]), "pred_embs": None}
      result = {k: v for k, v in result.items() if v is not None}
      return result
  
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 mot_utils import argsparser, Timer, get_current_memory_mb
  from det_infer import Detector, get_test_images, print_arguments, bench_log, PredictConfig
  import sys
  from mot import JDETracker
  from mot.utils import MOTTimer, write_mot_results, flow_statistic
  from mot.visualize import plot_tracking, plot_tracking_dict
label_desc: Use image node_id 2 for calling the JDE_Detector obj's underlying member method code with example usage: obj.postprocess(inputs, result) and returns: result