code: def create_inputs(im, im_info):
      """generate input for different model type
      Args:
          im (np.ndarray): image (np.ndarray)
          im_info (dict): info of image
      Returns:
          inputs (dict): input of model
      """
      inputs = {}
      inputs["image"] = im
      origin_shape = list(im_info["origin_shape"])
      resize_shape = list(im_info["resize_shape"])
      pad_shape = (
          list(im_info["pad_shape"])
          if im_info["pad_shape"] is not None
          else list(im_info["resize_shape"])
      )
      scale_x, scale_y = im_info["scale"]
      scale = scale_x
      im_info = np.array([resize_shape + [scale]]).astype("float32")
      inputs["im_info"] = im_info
      inputs["scale_factor"] = (
          np.array([scale_x, scale_x]).astype("float32").reshape(-1, 2)
      )
      inputs["im_shape"] = (
          np.array(resize_shape).astype("float32").reshape(-1, 2)
      )
      return inputs
  
file_path: PaddleHub/modules/image/instance_segmentation/solov2/data_feed.py
imports: import base64
  import cv2
  import numpy
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from paddle.inference import PrecisionType
  from PIL import Image
  from PIL import ImageDraw
label_desc: Use image node_id 1 for calling a global function with example usage: create_inputs(im, im_info) and returns: inputs