cropImageGenerator {animl}R Documentation

Tensorflow data generator that crops images to bounding box.

Description

Creates an image data generator that crops images based on bounding box coordinates.

Usage

cropImageGenerator(
  files,
  boxes,
  resize_height = 456,
  resize_width = 456,
  standardize = FALSE,
  batch = 32
)

Arguments

files

a vector of file names

boxes

a data frame or matrix of bounding box coordinates in the format left, top, width, height.

resize_height

the height the cropped image will be resized to.

resize_width

the width the cropped image will be resized to.

standardize

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

batch

the batch size for the image generator.

Value

A Tensorflow image data generator.

Examples

## Not run: #' dataset <- cropImageGenerator(images, boxes, standardize = FALSE, batch = batch)

[Package animl version 1.1.0 Index]