segmentation_generator: Generates batches of data (images and masks). The data will...

Description Usage Arguments

View source: R/segmentation_generator.R

Description

Generates batches of data (images and masks). The data will be looped over (in batches).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
segmentation_generator(
  path,
  colormap,
  mode = "dir",
  only_images = FALSE,
  net_h = 256,
  net_w = 256,
  grayscale = FALSE,
  scale = 1/255,
  batch_size = 32,
  shuffle = TRUE,
  subdirs = c("images", "masks"),
  column_sep = ";"
)

Arguments

path

Images and masks directory.

colormap

Class color map. For example voc_colormap.

mode

Character. One of 'c("dir", "nested_dirs", "config_file")'

only_images

Should generator read only images (e.g. on train set for predictions).

net_h

Input layer height. Must be equal to '2^x, x - natural'.

net_w

Input layer width. Must be equal to '2^x, x - natural'.

grayscale

Defines input layer color channels - '1' if 'TRUE', '3' if 'FALSE'.

scale

Scaling factor for images pixel values. Default to '1 / 255'.

batch_size

Batch size.

shuffle

Should data be shuffled.

subdirs

Vector of two characters containing names of subdirectories with images and masks.

column_sep

Character. Configuration file separator.


maju116/platypus documentation built on Oct. 18, 2020, 9:40 a.m.