Reputation: 1044
So let's say my original raw dataset has 100 images. And I apply random_horizontal_flip
data augmentation, which by default horizontally flips with 50% probability. So just for the sake of example, lets say it flips 50 of the 100 images. So,
I read as much official documentation as possible, and looked into preprocessor code, but couldn't find my answer.
Upvotes: 3
Views: 1175
Reputation: 114
Default augmentation probability, which is 50%, is independenetly applied to each image. Number of images that your model/algorithm is trained on depends on the number of epochs.
Let's say your batch size is 1 and total number of epoch is 100: Your algoirthm will be trained on 100 images, 50 of them will be flipped version of the original images. In this case, model will not see the original 50 images because your epoch is too low.
Let's say your batch size is 1 and total number of epoch is 200: Your algoirthm will be trained on 200 images, 100 of them will be flipped version of the original images.
As a result, as long as your epoch size is not limiting your dataset, with the probability of 50%, you will see an effect as if you have doubled the dataset by flipping each item.
In addition to the horizontal flip, if you add the vertical flip (random_vertical_flip
) too, you triple your dataset.
Upvotes: 1