Maybe I'm misunderstanding. If I implement channel_shift_range in my ImageDataGenerator, the output should have "scrambled" color values, right? I would like to use it to make my model more robust to variance in color.
However, when I test it, I'm not seeing any effect. Am I using it wrong? Here's my code:
from keras.preprocessing.image import ImageDataGenerator
import cv2
import matplotlib.pyplot as plt
%matplotlib inline
path = '/mnt/Project/Imaging/samples'
datagen = ImageDataGenerator(channel_shift_range=0.9)
genObject = datagen.flow_from_directory(path,
batch_size=1)
augs = []
i = 0
for batch in genObject:
augs.append(batch)
i += 1
if i > 10:
break
for item in augs:
plt.imshow(item[0][0].astype('uint8'))
plt.show()
Environment:
Jupyter Lab
Python 3.6.6
Keras==2.2.4
Keras-Applications==1.0.7
Keras-Preprocessing==1.0.9
tensorboard==1.9.0
tensorflow-gpu==1.9.0
Thanks in advance for the help!