code: def turn_back_coords(img1_shape, coords, img0_shape, ratio_pad=None):
      """
      将预测的坐标信息转换回原图尺度
      :param img1_shape: 缩放后的图像尺度
      :param coords: 预测的box信息
      :param img0_shape: 缩放前的图像尺度
      :param ratio_pad: 缩放过程中的缩放比例以及pad
      :return:
      """
      # Rescale coords (xyxy) from img1_shape to img0_shape
      if ratio_pad is None:  # calculate from img0_shape
          gain = max(img1_shape) / max(img0_shape)  # gain  = old / new
          pad = (img1_shape[1] - img0_shape[1] * gain) / 2, (
              img1_shape[0] - img0_shape[0] * gain
          ) / 2  # wh padding
      else:
          gain = ratio_pad[0][0]
          pad = ratio_pad[1]
  
      coords[:, [0, 2]] -= pad[0]  # x padding
      coords[:, [1, 3]] -= pad[1]  # y padding
      coords[:, :4] /= gain
      clip_coords(coords, img0_shape)
      return coords
  
file_path: deep-learning-for-image-processing/pytorch_object_detection/yolov3_spp/load_onnx_test.py
imports: import time
  import cv2
  import onnx
  import onnxruntime
  import numpy
  from matplotlib import pyplot
  from draw_box_utils import draw_box
label_desc: Use image node_id 4 for calling a global function with example usage: turn_back_coords(img1_shape, coords, img0_shape, ratio_pad) and returns: coords