I'm doing a Image Classification on Diabetic Retinopathy. The data distribution is uneven .The images of each label is distributed like this.
0 1805
2 999
1 370
4 295
3 193
The images in label 0 are in high numbers than other . So I want to add perform data augumentation on other labels to increase the no of images equal to that of label 0
train_data_gen = ImageDataGenerator(rescale = 1./255, validation_split=train_val_split) train_generator = train_data_gen.flow_from_directory( directory='/kaggle/input/traindata/train', target_size = (224,224), batch_size = 32, class_mode = 'categorical', subset='training') validation_generator = train_data_gen.flow_from_directory( directory='/kaggle/input/traindata/train', target_size = (224,224), batch_size = 32, class_mode = 'categorical', subset='validation')
I'm using ImageDataGenerator . SO anyone help me out to oversample all samples using data augumentation.