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.open('image.png').convert('LA')
here are some other ways
Could you explain more ^ ?
Is it possible to reduce the number of channels of an Image while creating the DataBunch object? If so, how?
I have too little data to train.
But how can I do it for the whole image? And for transformed images by fastai API.