Creates an image data generator that crops images based on bounding box coordinates and returnes an image/label pair.
cropImageTrainGenerator(
files,
boxes,
label,
classes,
resize_height = 456,
resize_width = 456,
standardize = FALSE,
augmentation_color = FALSE,
augmentation_geometry = FALSE,
shuffle = FALSE,
cache = FALSE,
cache_dir = NULL,
return_iterator = FALSE,
batch = 32
)
A Tensorflow image data generator.
a vector of file names
a data frame or matrix of bounding box coordinates in the format left, top, width, height.
a vector of labels
a vector of all classes for the active model
the height the cropped image will be resized to.
the width the cropped image will be resized to.
standardize the image to the range 0 to 1, TRUE or FALSE.
use data augmentation to change the color, TRUE or FALSE.
use data augmentation to change the geometry of the images, TRUE or FALSE.
return data pairas in random order, TRUE or FALSE.
use caching to reduce reading from disk, TRUE or FALSE.
directory used for caching, if none provided chaching will be done in memory.
Should an iterator be returned? If RALSE a tfdataset will be returned.
the batch size for the image generator.
if (FALSE) {
dataset <- cropImageTrainGenerator(images, standardize = FALSE, batch = batch)}
Run the code above in your browser using DataLab