I have 7 labeled classes all with varying quantities of images in them (ranging from 2000-20000). I know in keras
when using the model.fit
I can change how many times each folder of labeled images is read in. Instead, I would like to compare the results if I augmented the images in the folders with fewer images. I only know how to do this image by image, how would I augment all the images in the folder instead of 1 at a time?
gen = ImageDataGenerator(rotation_range=10, width_shift_range=0.1,
height_shift_range=0.1, shear_range=0.15, zoom_range=0.1,
channel_shift_range=10, horizontal_flip=True,
vertical_flip=True)
Folder_path = 'Folder_path_with_images'
image = np.expand_dims(ndimage.imread(Folder_path),0) # I get no permission from Folder_path_with_images
# Generate batches of augmented images from this image
aug_iter = gen.flow(image, save_to_dir = 'NEW_SAVE_PATH')
aug_images = [next(aug_iter)[0].astype(np.uint8) for i in range(10)]