I have found something strange to. I want to train a single channel image classifier for satellite type data - eventually to be used with IR sat data. I have struggled to find enough IR sat data to do this so I wish to pretrain a greyscale model on the Planet dataset. Then, I wish to tune this model on my small IR dataset. Hopefully this will give some boost!
I have tweeted the Planet notebook to add only the following line of code:
from PIL import Image
for p in pathlib.Path('/root/.fastai/data/planet/train-jpg').iterdir():
img = Image.open(p)
img = img.convert('L')
img.save(p)
This converts the RGB to greyscale and saves it down in-place. I then run the rest of the notebook and despite there being only a single channel, where there should be 3-channels, the notebook seems to be running/training, albeit, slowly. It was my intuition that we are using a pretrained resnet34 in this first case, therefore, it shouldn’t run on the single channel.
How is this seemingly possible?