preprocess_input: Preprocess input for pre-defined imagenet networks

View source: R/applications.R

preprocess_inputR Documentation

Preprocess input for pre-defined imagenet networks

Description

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.

Usage

preprocess_input(img, model = c("Xception", "VGG16", "VGG19", "ResNet50",
  "InceptionV3"))

Arguments

img

the input image, as an array

model

the model you wish to preprocess to

Author(s)

Taylor B. Arnold, taylor.arnold@acm.org

References

Chollet, Francois. 2015. Keras: Deep Learning library for Theano and TensorFlow.


kerasR documentation built on Aug. 17, 2022, 5:06 p.m.