Search code examples
image-processingmachine-learningconv-neural-networkfeature-extraction

Difference between grayscale images represented by 3 channels and 1 channel in CNN?


I am classifying images where the color doesn't play any role. So, I grayscaled my images and got just grayscale images. But they are represented by 3 channels. I know, that I can use the following formula:

gray_value = R * 0.299 + G * 0.587 + B * 0.114

to convert RGB image to grayscale image and get grayscale image with just one channel.

My question is, is there a difference between using grayscale images represented by 3 channels or by 1 channel in CNN (not in code or filters but in results)? Do the results vary depending on the number of channels, even when the images are the same in both cases?


Solution

  • The information given by the 3 channel and the 1 channel gray scale is the same but in terms of weights and biases of the CNN, the CNN coming from 3 channel images will be bigger and so it will take more time to compute. I would recommend to preproces the images to a 1 channel gray scale and only then use images as input for the CNN.