I have 4 separate image folders with their own separate labels(images in folder 1 correspond to label 1 etc).
However, the image dataset is unbalanced where I have too much images with label 1 and 2 but not enough images for label 3 and 4.
As such, I decided to try to do image augmentation to boost my image dataset.
Here's how my code looks like.
train_datagen = ImageDataGenerator(rotation_range=20,width_shift_range=0.2, height_shift_range=0.2,preprocessing_function=preprocess_input,horizontal_flip=True)
train_generator=train_datagen.flow_from_directory('/trainImages',target_size=(80,80),batch_size=32,class_mode='categorical')
All the image folders are in the path "/trainImages"(e.g:"/trainImages/1","/trainImages/2")
The problem with this approach is that the augmentation is also done on images in folder 1 and 2(which do not need augmentation)
Is there a way to customize the ImageDataGenerator to ignore the image augmentation arguments for folder 1 and 2?
I'm rather new at both Python and Keras...