How many images are generated when ImageDataGenerator is used, and when data augmentation is included as a part of the model? Is there any way to know the number of images generated by the ImageDataGenerator class and loading data using flow_from_directory method? I searched everywhere for the same but couldn't find anything useful.
Also, if I use image_dataset_from_directory fuction, I have to include data augmentation layers as a part of the model. In that case, how many images are generated?
My ImageDataGenerator code:
train_datagen = ImageDataGenerator(rescale=1./255,
                                   horizontal_flip=True,
                                   zoom_range=0.2,
                                   shear_range=0.2,
                                   rotation_range=15,
                                   fill_mode='nearest')

My code with data augmentation as a part of the model:
data_aug = Sequential([
                         layers.experimental.preprocessing.Rescaling(1./255),
                         layers.experimental.preprocessing.RandomFlip('horizontal'),
                         layers.experimental.preprocessing.RandomZoom(0.2,0.2),
                         layers.experimental.preprocessing.RandomRotation(0.06)
])



# in the model:

input_layer = layers.Input(shape=(150, 150, 3))
x = data_aug(input_layer)
In one epoch - It's the number of images in your Directory or the DataFrame
 In case of a custom Generator. It will be batch_size * steps_per_epoch
You may check this with any of these approaches -

Check the shape of prediction on train model.predict(traindata).shape
Save the images into a dir by using save_to_dir='/content/train_data'
Write a callback for batch_end
Get the steps_per_epoch in the training print statement i.e.
125/125 [==============================] - 50s 392ms/step - loss: 0.6637 - accuracy: 0.6000