class_docstr: Args:
      pred_config (object): config of model, defined by `Config(model_dir)`
      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 (str): The path of output
      threshold (float): The threshold of score for visualization
code: def merge_batch_result(self, batch_result):
      if len(batch_result) == 1:
          return batch_result[0]
      res_key = batch_result[0].keys()
      results = {k: [] for k in res_key}
      for res in batch_result:
          for k, v in res.items():
              results[k].append(v)
      for k, v in results.items():
          results[k] = np.concatenate(v)
      return results
  
imports: import os
  import yaml
  import glob
  from functools import reduce
  import cv2
  import numpy
  import math
  import paddle
  from paddle.inference import Config
  from paddle.inference import create_predictor
  import sys
  from benchmark_utils import PaddleInferBenchmark
  from picodet_postprocess import PicoDetPostProcess
  from preprocess import preprocess, Resize, NormalizeImage, Permute, PadStride, LetterBoxResize, Pad, decode_image
  from mot.visualize import visualize_box_mask
  from mot_utils import argsparser, Timer, get_current_memory_mb
label_desc: Use image node_id 6 for calling the Detector obj's underlying member method code with example usage: obj.merge_batch_result(batch_result) and returns: results, batch_result