code: def predict_image(infer_config, predictor, img_list):
      # load preprocess transforms
      transforms = Compose(infer_config.preprocess_infos)
      # predict image
      for img_path in img_list:
          inputs = transforms(img_path)
          inputs_name = [var.name for var in predictor.get_inputs()]
          inputs = {k: inputs[k][None,] for k in inputs_name}
  
          outputs = predictor.run(output_names=None, input_feed=inputs)
  
          print("ONNXRuntime predict: ")
          if infer_config.arch in ["HRNet"]:
              print(np.array(outputs[0]))
          else:
              bboxes = np.array(outputs[0])
              for bbox in bboxes:
                  if (
                      bbox[0] > -1
                      and bbox[1] > infer_config.draw_threshold
                  ):
                      print(
                          f"{int(bbox[0])} {bbox[1]} "
                          f"{bbox[2]} {bbox[3]} {bbox[4]} {bbox[5]}"
                      )
  
file_path: PaddleDetection/deploy/third_engine/onnx/infer.py
imports: import os
  import yaml
  import argparse
  import numpy
  import glob
  from onnxruntime import InferenceSession
  from preprocess import Compose
label_desc: Use image node_id 2 for calling a global function with example usage: predict_image(infer_config, predictor, img_list) without return types