I have been trying to feed a dataset of brain MRI images (IXI dataset) to a ConvNet, however, some of the images have 140 channels some others 150 channels. How can I make all the images have the same number of channels so that I won't run into trouble with a fixed CNN input shape? I am using nibabel lib for reading the .nii files.
I don't have much knowledge about MRI images, what channels should be discarded?
The obvious approach is definitely:
Find the minimum number of channels in the sample.
Discard all the other channels for any sample.
Now, the discarding can happen from the middle of the slice which will probably contain better details. But this is based on the specific domain.
Or, 2. you can select a mean from the number of channels. and try to discard for the images with higher number of channels and add a black slice for images with lower number of channels.