Closed chairiq closed 3 years ago
Change the model input shape to make it single channel. By default it would be something like (IMAGE_HEIGHT, IMAGE_WIDTH, 3). Change that to (IMAGE_HEIGHT,IMAGE_WIDTH,1).
@chairiq This is going to be a problem for you since the code imports a resnet backbone (default = resnet50) model from Tensorflow. TF imports the model with 3 color channels. There's no way to import it with only a single color channel as far as I know. The best thing to do would be to stack your grayscale image 3 times. Go from (IMAGE_HEIGHT,IMAGE_WIDTH,1) and stack them into (IMAGE_HEIGHT,IMAGE_WIDTH,3). It's not a big deal computationally since all of the color channels are combined after the first hidden layer. So with an input image of (IMAGE_HEIGHT,IMAGE_WIDTH,1) you'd only save a little on the first layer.
This issue has been automatically marked as stale due to the lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What changes have to be done in the code for the use of grayscale images instead of RGB?