Data augmentation - How that works for real?

Hello, everyone.

So far I learned the concept of Data Augmentation. But when I try to put it in practice, I got confused.

As we learned in the course, to achieve data augmentation, we create a small sequential model with two or three layers that transform the image.
But in the train time, this sequential model appears as a layer that preprocess every image that is inserted inside the principal net model and outputs a single transformed image;

When I see that, I understand that we are not training with both original and augmented data, but we are training with a transformed image, as every original image that gets inside the net architecture will pass through a random transformation process. Am I correct?

Well, I decided to create a separate script to read every original image, transform and SAVE every transformed image in my hard drive. Then I go into the original script with net model defined and train not with my 300 original images, let’s say, but with 600 or 900 images, being the 300 original ones and the rest are augmented image data.

Is this procedure correct? Am I doing an unnecessary job?

Hi Leodemachado,

Its a good practicing exercise though to understand how we can use data augmentation (DA) as a technique when we have insufficient data around, for instance medical image analysis. And, it depends on a lot of factors like the purpose you are trying to train the model using data augmentation technique.
Using DA, you are just trying to transform the images in different ways to train the model with a larger dataset to achieve better accuracy (the real purpose of training).
So, by using those 600/900 images, which is a figure bigger in number than those of the 300 images, you can draw an analysis on how the outcome would be in terms of accuracy and implementation.
Well you can read this paper and you can get a better idea.