When I use data augmentation to increase the train dataset, should I use all augmentation techniques (parameters in keras)?
Which data augmentation parameters should use with flow_from_directory
?
Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.
Sign up to join this communityWhen I use data augmentation to increase the train dataset, should I use all augmentation techniques (parameters in keras)?
Which data augmentation parameters should use with flow_from_directory
?
This entirely depends on your data!
Generally, the more augmentation, the more situations your model will be exposed to during training and therefore the more robust it will be when being tested on unseen data.
However, what if we for example were working on a model for self driving cars? Using the vertical_flip
just doesn't make sense, because the car will (hopefully!) be er be driving along on its roof.
I would suggest starting with no augmentation and slowly adding one possibility at a time. For example, you record an accuracy of 80% with no augmentation. Then addfeaturewise_normalizatiom
and featurewise_std_normalization
giving you an accuracy of 85%. Then adding horizontal_flip
gets you to 90%. Finally you try adding zca_whitening
and that send you back down to 86%.
The reverse approach may also work well for you, starting with all augmentation parameters turned on and removing them one by one. In any case, it is completely dependent on your specific problem and your available data. Keras' ImageDataGenerator has a long list of parameters, so having a think about what makes sense will save you a lot of time.