zokyo.augmentation.augment module

class zokyo.augmentation.augment.AbstractBuilder[source]

Bases: abc.ABC

abstract classmethod get_keras_generator()[source]
abstract classmethod process_and_generate()[source]
abstract classmethod process_and_save()[source]
class zokyo.augmentation.augment.Builder(config_json='config.json')[source]

Bases: zokyo.augmentation.augment.AbstractBuilder

Builder class to create augmentor Pipeline object through a config file

TODO : Parallelize saving images to disk

TODO : Parallelize operations from data pipeline

get_builder_logger()[source]

Method to return builder’s logger.

get_keras_generator(batch_size=None, internal_batch=None, input_func=None, output_func=None, task='classification')[source]

Method to return a Keras generator. If internal batch is not set, batch size value is used

process_and_generate(batch_size=None, internal_batch=None, infinite_generator=False)[source]

Process the images and yields the results in batches. NOTE : On batch ingestion mode if both internal batch and output batch size is given, sample number cannot be achieved.

process_and_save(batch_save_size=None, internal_batch_size=None)[source]

Process the files and save to disk