I'm trying to build up both a Siamese neural network and triple neural network on a custom large dataset
Keras
has ImageDataGenerator
which makes the generation of input data to a regular
neural network very easy.
I'm interesting to use ImageDataGenerator
or similar ways in order to train a networks with 2(siamese
) and 3(triple
) inputs.
In mniset keras siamese example, The input generated by a pre-process stage which is done by create_pairs
method. I don't think this kind of way fit for a large dataset.
Is it possible to use ImageDataGenerator
in this case? What are my other options assuming the data-set is very big?
The idea of DataGenerators is to give
fit_generator
a stream of data in batches.. hence giving control to you how you want to produce the data, ie whether you load from files or you do some data augmentation like what is done inImageDataGenerator
.Here I posting the modified version of mniset siamese example with custom DataGenerator, you can work it out from here.