Is there any way to transform images into monochrome?

I’m lacking in data and want to train the data in monochrome instead of RGB. But I couldn’t find a way to transform images into monochrome in fastai.

I wish fastai had such a feature. But if there is no such feature now, is there any way to do it with some workaround?

You can use PIL to this:

from PIL import Image
img ='image.png').convert('LA')'greyscale.png')

here are some other ways

1 Like

Could you explain more ^ ?

Is it possible to reduce the number of channels of an Image while creating the DataBunch object? If so, how?

1 Like

I have too little data to train.

But how can I do it for the whole image? And for transformed images by fastai API.