Closed shonehang closed 6 years ago
yes, will work, just convert all images which have a single channel to a 3 channel image by repeating the same 2d matrix across all 3 channels. Put a line after this line to do so. Your line should be something like rgb = np.repeat(grey[:, :, np.newaxis], 3, 2).
Thank you very much! I will try it according to your advice soon.
I trained RGB images before, which have 3 channels. Now I want to train gray images that have only one channel. How should I modify this code? Thank you very much!