Open geoffwoollard opened 5 years ago
See random rotations, flips and shifts in https://machinelearningmastery.com/image-augmentation-deep-learning-keras/
Note that all these are physical since the grid can be placed upside down into the microscope, the particles are not necessarily centred and the grid can rotate in the holder
May need to re-write the custom function for fitting batches
This link explains how datagen works with fit_generator.
datagen = ImageDataGenerator()
fit_generator(datagen, samples_per_epoch=len(train), epochs=100)
rotate image (param for deg step size, eg 1-10 deg) to augment data.
NB: the image is a square and will need cropping