C2_W2_DataAugmentation_ImageDataGenerator

Hello,

I have a question regarding the different image variations ImageDataGenerator generates when applying parameters for data augmentation.

If I have a 200 images dataset, and I use ImageDataGenerator to use data augmentation, will my augmentation parameters be applied at random on my dataset resulting in the same amount of images (200) but modified according to the specified parameters, or does it will generate additional variations of my 200 images and add those to the original dataset, probably increasing the size of my training set?

Or probably it applies at random the parameters specified during training, resulting on a different variaton of the same image on each epoch, without the need of increasing the training size?

“does it will generate additional variations of my 200 images and add those to the original dataset, probably increasing the size of my training set?”

This is what happens, for every image it applies the defined transformation and adds it to the dataset hence augment it.

1 Like

so if it adds new images to the dataset, the batch size increases or it uses more batches in order to also use those new transformed images?

The batch size is a parameter you predefined a so called hyper-parameter, hence it uses more batches.

In the output display of model_for_aug.fit() it shows 100/100 when each epoch ends. So it appears that the number of batches is still 100, the same as when augmentation is not used, unless TensorFlow added batches behind the scene and does not display them.

Does it take less or more time with augmentation?