I use keras to do image augmentation and segmentation. I want to investigate the number of images generated, so I test the following setting of arguments: (1) set batch_size as 1 in flow_from_directory when define the generator:
def myGene(...):
...
image_datagen = ImageDataGenerator(**aug_dict)
image_generator = image_datagen.flow_from_directory(...,batch_size = 1,..., save_prefix = 'view',...)
mask_datagen = ImageDataGenerator(**aug_dict)
mask_generator = mask_datagen.flow_from_directory(...,batch_size = 1,..., save_prefix = 'view',...)
...
(2) When training, I set epochs = 1 and steps_per_epoch=1:
model.fit_generator(myGene,steps_per_epoch=1,epochs=1,...)
After training finished, I expect only 1 image and 1 mask are in the directory './view', but I actually found 11 pairs there.
What is wrong here? Did I fail to setting some arguments, or did I do something wrong?