code: def process_image(img):
      img = resize_short(img, target_size=256)
      img = crop_image(img, target_size=DATA_DIM, center=True)
      if img.mode != "RGB":
          img = img.convert("RGB")
      # img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
      img = np.array(img).astype("float32").transpose((2, 0, 1)) / 255
      img -= img_mean
      img /= img_std
      return img
  
file_path: PaddleHub/modules/image/classification/resnet34_v2_imagenet/data_feed.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import os
  from collections import OrderedDict
  import cv2
  import numpy
  from PIL import Image, ImageEnhance
  from paddle import fluid
label_desc: Use image node_id 3 for calling a global function with example usage: process_image(img) and returns: img