baby.generator.ImageLabel¶
- class baby.generator.ImageLabel(paths, batch_size, aug, preprocess=None, in_memory=False)¶
Bases:
Sequence
- Attributes
- n_pairs
- shapes
Methods
Method called at the end of every epoch.
get_by_index
- __init__(paths, batch_size, aug, preprocess=None, in_memory=False)¶
Generator for training image-label pairs.
- Arguments:
- paths: an iterable generating tuples of filename pairs
specifying source image and target image
batch_size: integer specifying desired size for each batch aug: an Augmenter object for transforming the images preprocess: a single callable or tuple of callables (one for each
file of pair); None specifies the default standard_norm
in_memory: whether or not to load all images into memory
Methods
__init__
(paths, batch_size, aug[, ...])Generator for training image-label pairs.
get_by_index
(i[, aug])Method called at the end of every epoch.
Attributes
n_pairs
shapes
- on_epoch_end()¶
Method called at the end of every epoch.