code: def postprocess(pred_dets, pred_embs, threshold=0.5):
      tracker = JDETracker()
  
      online_targets_dict = tracker.update(pred_dets, pred_embs)
      online_tlwhs = defaultdict(list)
      online_scores = defaultdict(list)
      online_ids = defaultdict(list)
  
      for cls_id in range(1):
          online_targets = online_targets_dict[cls_id]
          for t in online_targets:
              tlwh = t.tlwh
              tid = t.track_id
              tscore = t.score
  
              # make sure the tscore is no less then the threshold.
              if tscore < threshold:
                  continue
  
              # make sure the target area is not less than the min_box_area.
              if tlwh[2] * tlwh[3] <= tracker.min_box_area:
                  continue
  
              # make sure the vertical ratio of a found target is within the range (1.6 as default ratio).
              if (
                  tracker.vertical_ratio > 0
                  and tlwh[2] / tlwh[3] > tracker.vertical_ratio
              ):
                  continue
              online_tlwhs[cls_id].append(tlwh)
              online_ids[cls_id].append(tid)
              online_scores[cls_id].append(tscore)
  
      online_im = plot_tracking_dict(
          img, 1, online_tlwhs, online_ids, online_scores, frame_id=0
      )
  
      return online_im
  
file_path: PaddleDetection/docs/advanced_tutorials/openvino_inference/fairmot_onnx_openvino.py
imports: from collections import defaultdict
  from pathlib import Path
  import cv2
  import numpy
  import paddle.vision.transforms
  from openvino.inference_engine import IECore
  from ppdet.modeling.mot.tracker import JDETracker
  from ppdet.modeling.mot.visualization import plot_tracking_dict
label_desc: Use image node_id 5 for calling a global function with example usage: postprocess(pred_dets, pred_embs, threshold) and returns: online_im