code: def get_inference_augmentor():
      # load ResNet mean from Kaiming:
      # from tensorpack.utils.loadcaffe import get_caffe_pb
      # obj = get_caffe_pb().BlobProto()
      # obj.ParseFromString(open('ResNet_mean.binaryproto').read())
      # pp_mean_224 = np.array(obj.data).reshape(3, 224, 224).transpose(1,2,0)
  
      meta = ILSVRCMeta()
      pp_mean = meta.get_per_pixel_mean()
      pp_mean_224 = pp_mean[16:-16, 16:-16, :]
  
      transformers = [
          imgaug.ResizeShortestEdge(256),
          imgaug.CenterCrop((224, 224)),
          imgaug.MapImage(lambda x: x - pp_mean_224),
      ]
      return transformers
  
file_path: tensorpack/examples/ResNet/load-resnet.py
imports: import argparse
  import functools
  import numpy
  import re
  import cv2
  import six
  import tensorflow
  from tensorpack import *
  from tensorpack.dataflow.dataset import ILSVRCMeta
  from tensorpack.utils import logger
  from imagenet_utils import ImageNetModel, eval_classification, get_imagenet_dataflow
  from resnet_model import resnet_bottleneck, resnet_group
label_desc: Use image node_id 1 for calling a global function with example usage: get_inference_augmentor() and returns: transformers