class_docstr: InferenceEngine
  
  Inference engina class which contains preprocess, run, postprocess
class_docstr_tok: ["InferenceEngine","Inference","engina","class","which","contains","preprocess",",","run",",","postprocess"]
docstr: preprocess
  Preprocess to the input.
  Args:
      img_path: Image path.
  Returns: Input data after preprocess.
docstr_tok: ["preprocess","Preprocess","to","the","input",".","Args",":","img_path",":","Image","path",".","Returns",":","Input","data","after","preprocess","."]
code: def preprocess(self, img_path, short_size):
      """preprocess
      Preprocess to the input.
      Args:
          img_path: Image path.
      Returns: Input data after preprocess.
      """
      img = cv2.imread(img_path, 1)
      img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
      h, w = img.shape[:2]
      img = resize_image(img, short_size)
      img = self.transforms(img)
      img = np.expand_dims(img, axis=0)
      shape_info = {"shape": [(h, w)]}
      return img, shape_info
  
imports: import os
  import sys
  import pathlib
  import cv2
  import paddle
  from paddle import inference
  import numpy
  from PIL import Image
  from paddle.vision import transforms
  from tools.predict import resize_image
  from post_processing import get_post_processing
  from utils.util import draw_bbox, save_result
label_desc: Use image node_id 3 for calling the InferenceEngine obj's underlying member method code with example usage: obj.preprocess(img_path, short_size) and returns: img,  shape_info