Preprocess input for pre-defined imagenet networks
These assume you have already converted images into a three channel, 224 by 224 matrix with load_img and img_to_array. The processing differs based on the model so set the appropriate model that you are using.
preprocess_input(img, model = c("Xception", "VGG16", "VGG19", "ResNet50", "InceptionV3"))
img |
the input image, as an array |
model |
the model you wish to preprocess to |
Taylor B. Arnold, taylor.arnold@acm.org
Chollet, Francois. 2015. Keras: Deep Learning library for Theano and TensorFlow.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.