code: def ZeroCenter(path, size, BGRTranspose=False):
      img = Image.open(path)
      if isinstance(size, tuple):
          h, w = size[0], size[1]
      else:
          h, w = size, size
      img = img.resize((h, w))
      x = np.array(img, dtype=np.float32)
  
      # Reference: 1) Keras image preprocess: https://github.com/keras-team/keras/blob/master/keras/applications/imagenet_utils.py
      #            2) tensorflow github issue: https://github.com/tensorflow/models/issues/517
      # R-G-B for Imagenet === [123.68, 116.78, 103.94]
  
      x[..., 0] -= 123.68
      x[..., 1] -= 116.779
      x[..., 2] -= 103.939
  
      if BGRTranspose == True:
          x = x[..., ::-1]
  
      return x
  
file_path: MMdnn/mmdnn/conversion/examples/imagenet_test.py
imports: from __future__ import absolute_import
  import argparse
  import numpy
  from six import text_type
  from PIL import Image
label_desc: Use image node_id 2 for calling the TestKit obj's underlying member method code with example usage: obj.ZeroCenter(path, size, BGRTranspose) and returns: x