geoffwoollard / ece1512_project

0 stars 0 forks source link

augment data #15

Open geoffwoollard opened 5 years ago

geoffwoollard commented 5 years ago

rotate image (param for deg step size, eg 1-10 deg) to augment data.

NB: the image is a square and will need cropping

geoffwoollard commented 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

geoffwoollard commented 5 years ago

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)