# Path: preprocessing/cifarnet_preprocessing.py
# _PADDING = 4
# def preprocess_for_train(image,
#                          output_height,
#                          output_width,
#                          random_mirror,
#                          padding=_PADDING):
# def preprocess_for_eval(image, output_height, output_width):
# def preprocess_image(image, output_height, output_width, random_mirror, is_training=False):
# 
# Path: preprocessing/inception_preprocessing.py
# def apply_with_random_selector(x, func, num_cases):
# def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
# def preprocess_for_train(image, height, width,
#                          random_mirror,
#                          fast_mode=False,
#                          scope=None):
# def preprocess_for_eval(image, height, width, scope=None):
# def preprocess_image(image, height, width,
#                      random_mirror,
#                      is_training=False,
#                      fast_mode=False):
# 
# Path: preprocessing/googlenet_preprocessing.py
# _R_MEAN = 123.68
# _G_MEAN = 116.78
# _B_MEAN = 103.94
# def apply_with_random_selector(x, func, num_cases):
# def _mean_image_subtraction(image, means):
# def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
# def preprocess_for_train(image, height, width,
#                          random_mirror,
#                          fast_mode=False,
#                          scope=None):
# def preprocess_for_eval(image, height, width, scope=None):
# def preprocess_image(image, height, width,
#                      random_mirror,
#                      is_training=False,
#                      fast_mode=False):
# 
# Path: preprocessing/vgg_preprocessing.py
# _R_MEAN = 123.68
# _G_MEAN = 116.78
# _B_MEAN = 103.94
# _RESIZE_SIDE_MIN = 256
# _RESIZE_SIDE_MAX = 512
# def _crop(image, offset_height, offset_width, crop_height, crop_width):
# def _random_crop(image_list, crop_height, crop_width):
# def _central_crop(image_list, crop_height, crop_width):
# def _mean_image_subtraction(image, means):
# def _smallest_size_at_least(height, width, smallest_side):
# def _aspect_preserving_resize(image, smallest_side):
# def preprocess_for_train(image,
#                          output_height,
#                          output_width,
#                          random_mirror,
#                          resize_side_min=_RESIZE_SIDE_MIN,
#                          resize_side_max=_RESIZE_SIDE_MAX):
# def preprocess_for_eval(image):
# def preprocess_image(image, output_height, output_width, random_mirror, is_training=False,
#                      resize_side_min=_RESIZE_SIDE_MIN,
#                      resize_side_max=_RESIZE_SIDE_MAX):


import tensorflow as tf
from preprocessing import cifarnet_preprocessing
from preprocessing import inception_preprocessing
from preprocessing import lenet_preprocessing
from preprocessing import googlenet_preprocessing
from preprocessing import vgg_preprocessing
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function



slim = tf.contrib.slim


def get_preprocessing(name, is_training=False):
  """Returns preprocessing_fn(image, height, width, **kwargs).

  Args:
    name: The name of the preprocessing function.
    is_training: `True` if the model is being used for training and `False`
      otherwise.

  Returns:
    preprocessing_fn: A function that preprocessing a single image (pre-batch).
      It has the following signature:
        image = preprocessing_fn(image, output_height, output_width, ...).

  Raises:
    ValueError: If Preprocessing `name` is not recognized.
  """
  preprocessing_fn_map = {
      'cifarnet': cifarnet_preprocessing,
      'inception': inception_preprocessing,
      'inception_v1': inception_preprocessing,
      'inception_v2': inception_preprocessing,

# Path: preprocessing/cifarnet_preprocessing.py
# _PADDING = 4
# def preprocess_for_train(image,
#                          output_height,
#                          output_width,
#                          random_mirror,
#                          padding=_PADDING):
# def preprocess_for_eval(image, output_height, output_width):
# def preprocess_image(image, output_height, output_width, random_mirror, is_training=False):
# 
# Path: preprocessing/inception_preprocessing.py
# def apply_with_random_selector(x, func, num_cases):
# def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
# def preprocess_for_train(image, height, width,
#                          random_mirror,
#                          fast_mode=False,
#                          scope=None):
# def preprocess_for_eval(image, height, width, scope=None):
# def preprocess_image(image, height, width,
#                      random_mirror,
#                      is_training=False,
#                      fast_mode=False):
# 
# Path: preprocessing/googlenet_preprocessing.py
# _R_MEAN = 123.68
# _G_MEAN = 116.78
# _B_MEAN = 103.94
# def apply_with_random_selector(x, func, num_cases):
# def _mean_image_subtraction(image, means):
# def distort_color(image, color_ordering=0, fast_mode=True, scope=None):
# def preprocess_for_train(image, height, width,
#                          random_mirror,
#                          fast_mode=False,
#                          scope=None):
# def preprocess_for_eval(image, height, width, scope=None):
# def preprocess_image(image, height, width,
#                      random_mirror,
#                      is_training=False,
#                      fast_mode=False):
# 
# Path: preprocessing/vgg_preprocessing.py
# _R_MEAN = 123.68
# _G_MEAN = 116.78
# _B_MEAN = 103.94
# _RESIZE_SIDE_MIN = 256
# _RESIZE_SIDE_MAX = 512
# def _crop(image, offset_height, offset_width, crop_height, crop_width):
# def _random_crop(image_list, crop_height, crop_width):
# def _central_crop(image_list, crop_height, crop_width):
# def _mean_image_subtraction(image, means):
# def _smallest_size_at_least(height, width, smallest_side):
# def _aspect_preserving_resize(image, smallest_side):
# def preprocess_for_train(image,
#                          output_height,
#                          output_width,
#                          random_mirror,
#                          resize_side_min=_RESIZE_SIDE_MIN,
#                          resize_side_max=_RESIZE_SIDE_MAX):
# def preprocess_for_eval(image):
# def preprocess_image(image, output_height, output_width, random_mirror, is_training=False,
#                      resize_side_min=_RESIZE_SIDE_MIN,
#                      resize_side_max=_RESIZE_SIDE_MAX):


# Path: preprocessing/preprocessing_factory.py
import tensorflow as tf
from preprocessing import cifarnet_preprocessing
from preprocessing import inception_preprocessing
from preprocessing import lenet_preprocessing
from preprocessing import googlenet_preprocessing
from preprocessing import vgg_preprocessing

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function



slim = tf.contrib.slim


def get_preprocessing(name, is_training=False):
  """Returns preprocessing_fn(image, height, width, **kwargs).

  Args:
    name: The name of the preprocessing function.
    is_training: `True` if the model is being used for training and `False`
      otherwise.

  Returns:
    preprocessing_fn: A function that preprocessing a single image (pre-batch).
      It has the following signature:
        image = preprocessing_fn(image, output_height, output_width, ...).

  Raises:
    ValueError: If Preprocessing `name` is not recognized.
  """
  preprocessing_fn_map = {
      'cifarnet': cifarnet_preprocessing,
      'inception': inception_preprocessing,
      'inception_v1': inception_preprocessing,
      'inception_v2': inception_preprocessing,

      'inception_v3': inception_preprocessing,