Learn R Programming

animl (version 1.1.0)

ImageGenerator: Tensorflow data generator that resizes images.

Description

Creates an image data generator that resizes images if requested.

Usage

ImageGenerator(
  files,
  resize_height = NULL,
  resize_width = NULL,
  standardize = FALSE,
  batch = 1
)

Value

A Tensorflow image data generator.

Arguments

files

a vector of file names

resize_height

the height the cropped image will be resized to. If NULL returns original size images.

resize_width

the width the cropped image will be resized to. If NULL returns original size images..

standardize

standardize the image to the range 0 to 1, TRUE or FALSE.

batch

the batch size for the image generator.

Examples

Run this code
if (FALSE) {
dataset <- ImageGenerator(images, standardize = FALSE, batch = batch)
}

Run the code above in your browser using DataLab