Generates batches of augmented/normalized data from image data and labels
flow_images_from_data(x, y = NULL, generator = image_data_generator(),
batch_size = 32, shuffle = TRUE, sample_weight = NULL,
seed = NULL, save_to_dir = NULL, save_prefix = "",
save_format = "png", subset = NULL)
data. Should have rank 4. In case of grayscale data, the channels axis should have value 1, and in case of RGB data, it should have value 3.
labels (can be NULL
if no labels are required)
Image data generator to use for augmenting/normalizing image data.
int (default: 32
).
boolean (defaut: TRUE
).
Sample weights.
int (default: NULL
).
NULL
or str (default: NULL
). This allows you to
optionally specify a directory to which to save the augmented pictures being
generated (useful for visualizing what you are doing).
str (default: ''). Prefix to use for filenames of saved
pictures (only relevant if save_to_dir
is set).
one of "png", "jpeg" (only relevant if save_to_dir is set). Default: "png".
Subset of data ("training"
or "validation"
) if
validation_split
is set in image_data_generator()
.
(x, y)
where x
is an array of image data and y
is a
array of corresponding labels. The generator loops indefinitely.
Yields batches indefinitely, in an infinite loop.
Other image preprocessing: fit_image_data_generator
,
flow_images_from_directory
,
image_load
, image_to_array