Data Generator

class TrainDataGenerator

inherits from Keras Sequence base object, allows to use multiprocessing in .fit_generator

__init__

def __init__(samples, img_dir, batch_size, n_classes, basenet_preprocess, img_format, img_load_dims, img_crop_dims, shuffle)

__len__

def __len__()

__getitem__

def __getitem__(index)

on_epoch_end

def on_epoch_end()

__data_generator

def __data_generator(batch_samples)

class TestDataGenerator

inherits from Keras Sequence base object, allows to use multiprocessing in .fit_generator

__init__

def __init__(samples, img_dir, batch_size, n_classes, basenet_preprocess, img_format, img_load_dims)

__len__

def __len__()

__getitem__

def __getitem__(index)

on_epoch_end

def on_epoch_end()

__data_generator

def __data_generator(batch_samples)