0

I have a file with images with only 1 channel, and I want to use a pre-trained model to make some predictions with the images that I have. The problem is that the pre-trained model has been trained with images with 3 channels so I have to add 2 extra channels to all my images. I have tried by stacking the images to get the extra 2 channels but I would like to try something different.

Is there a way to make the 2 extra channels only made by zeros?

stev
  • 5
  • 2
  • If your model is trained to use three channels, adding zeros will give strange results. You'd be better off cloning the channels or using the coefficients [here](https://stackoverflow.com/a/12201744/4642943) to emulate a colour image, or even better retrain it on greyscale images. – Oliver Jul 18 '19 at 07:09
  • Also, if you want an answer, you should add some code so we know what representation of images you have, such as numpy arrays – Oliver Jul 18 '19 at 07:11

0 Answers0