I am trying to add some augmentations to some of my grayscale images using
def augment_it(img):
seq = iaa.OneOf( [
iaa.ScaleX((0.7,1.3), cval=255),
iaa.CoarseDropout(0.02, size_percent=(0.02,0.2)) #I want the new pixels to be white in colour.
])
# aug_img = iaa.Grayscale(1.0)
aug_img = seq(image=img)
return aug_img
I use this as the preprocessing function with imagedatagenerator in keras.
But this function returns me an RGB image with 3 channels (the coarse dropout being in any of the colours)
I am trying to add some augmentations to some of my grayscale images using
I use this as the preprocessing function with imagedatagenerator in keras.
But this function returns me an RGB image with 3 channels (the coarse dropout being in any of the colours)
What should I do to keep my images grayscale?