load_img: Load image from a file as PIL object

View source: R/preprocessing.R

load_imgR Documentation

Load image from a file as PIL object

Description

Load image from a file as PIL object

Usage

load_img(path, grayscale = FALSE, target_size = NULL)

Arguments

path

Path to image file

grayscale

Boolean, whether to load the image as grayscale.

target_size

If NULL, the default, loads the image in its native resolution. Otherwise, set this to a vector giving desired (img_height, img_width).

Author(s)

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

References

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

See Also

Other image: img_to_array

Other preprocessing: Tokenizer, expand_dims, img_to_array, one_hot, pad_sequences, text_to_word_sequence


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