(name, is_training=False)
return preprocessing_fn
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.

    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.
Returns preprocessing_fn(image, height, width, **kwargs).
Returns preprocessing_fn ( image height width ** kwargs ) .
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.

    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 = {
        'xception_lighthead': common_preprocessing.light_head_preprocess_image,
        'xdet_resnet': common_preprocessing.preprocess_image,
    }

    if name not in preprocessing_fn_map:
        raise ValueError('Preprocessing name [%s] was not recognized' % name)

    def preprocessing_fn(image, labels, bboxes,
                         out_shape, data_format='NHWC', **kwargs):
        return preprocessing_fn_map[name](#(preprocess_image_unittest
            image, labels, bboxes, out_shape, data_format=data_format,
            is_training=is_training, **kwargs)
    return preprocessing_fn
def get_preprocessing ( name , is_training = False ) : preprocessing_fn_map = { 'xception_lighthead' : common_preprocessing . light_head_preprocess_image , 'xdet_resnet' : common_preprocessing . preprocess_image , } if name not in preprocessing_fn_map : raise ValueError ( 'Preprocessing name [%s] was not recognized' % name ) def preprocessing_fn ( image , labels , bboxes , out_shape , data_format = 'NHWC' , * * kwargs ) : return preprocessing_fn_map [ name ] ( #(preprocess_image_unittest image , labels , bboxes , out_shape , data_format = data_format , is_training = is_training , * * kwargs ) return preprocessing_fn