I am using Keras ImageDataGenerator for data augmentation. After generating ImDatagenerator as follows,
datagen = ImageDataGenerator( rescale=1./255.)
DG = datagen.flow_from_directory(
directory='Path_To_Dataset',
target_size=(img_rows, img_cols), color_mode='rgb',
classes=['c1', 'c2'],
class_mode='categorical',
batch_size=32, shuffle=True, seed=42,
subset=None, interpolation='bicubic'
)
I am trying to change one image's pixels of DG
by simply assigning a numpy.ndarray with the same size as follows
DG[0][0][0,:,:,:] = np.random.rand(img_rows,img_cols,3)
While it does not give any error, but I do not observe any change in the DG.