title: Image pre-processing parameters for tensorflow models
body: <p>I have a basic question about how to determine the image pre-processing parameters like - "IMAGE_MEAN", "IMAGE_STD" for various tensorflow pre-trained models. The Android sample applications for TensorFlow provides these parameters for a certain inception_v3 model in the ClassifierActivity.java (<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/src/org/tensorflow/demo/ClassifierActivity.java" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/src/org/tensorflow/demo/ClassifierActivity.java</a>) as shown below -</p>
  
  <p>"If you want to use a model that's been produced from the TensorFlow for Poets codelab, you'll need to set IMAGE_SIZE = 299, IMAGE_MEAN = 128, IMAGE_STD = 128"</p>
  
  <p>How do I determine these parameters for other TF models</p>
  
  <p>Also, while converting the TF model to CoreML model, to be used on iOS, there are additional image pre-processing parameters that need to be specified (like - red_bias, green_bias, blue_bias and image_scale) as shown in the code segment below. The below parameters are for inception_v1_2016.pb model. If I want to use another pre-trained model like - ResNet50, MobileNet, etc how do I determine these parameters</p>
  
  <pre><code>tf_converter.convert(tf_model_path = 'inception_v1_2016_08_28_frozen.pb',
                   mlmodel_path = 'InceptionV1.mlmodel',
                   output_feature_names = ['InceptionV1/Logits/Predictions/Softmax:0'],
                   image_input_names = 'input:0',
                   class_labels = 'imagenet_slim_labels.txt',
                   red_bias = -1,
                   green_bias = -1,
                   blue_bias = -1,
                   image_scale = 2.0/255.0
                   )
  </code></pre>
  
  <p>Any help will be greatly appreciated</p>