0

How can I determine how many images will be created after image augmentation via tensorflow ImageDataGenerator. What will be that number for an individual image and likewise all images.

I have total 17 image (16 image for train and 1 image for test)

    import tensorflow as tf 
    from tensorflow.keras.preprocessing.image import ImageDataGenerator

    aug = ImageDataGenerator(rotation_range=25, width_shift_range=0.1,
                         height_shift_range=0.1, shear_range=0.2, zoom_range=0.2,
                         horizontal_flip=True, fill_mode="nearest")

    history_model = model.fit_generator(
    aug.flow(X_train , y_train, batch_size = 32),  epochs=10, verbose=0)
Pranab
  • 379
  • 3
  • 11
  • 1
    Would be great if you could include in the tags and text which library you are using. – Daraan Jan 13 '23 at 10:17
  • import tensorflow as tf and from tensorflow.keras.preprocessing.image import ImageDataGenerator – Pranab Jan 13 '23 at 10:20
  • 1
    as fit_generator is deprecated I can't really remember. Normally per epoch one augmentation per image. Not sure what happens when the batch_size > amount of samples. Did you try it? I think there was an extra parameter to determine steps. e.g. steps = 4* sample_size generates 4 images per sample. – Daraan Jan 13 '23 at 11:12

0 Answers0