I am converting a set of images and a set of ground truth images to LMDB database. The purpose is pixel-wise prediction.
Most of the codes for creating LMDB from RGB images has a line indicating transpose in CxHxW
order, as follows:
im = im.transpose((2,0,1)) # convert to CxHxW
My image data (both train data and corresponding ground truth images) are grayscale (i.e., single channel). My question is, what is the purpose of this line and should I do this matrix transpose for my single channel
images and ground truth or it is not necessary?
Your help is appreciated.