How to change channel dimension of an image?
You should set a score threshold to map every pixel in the image to one class, and every class has a color (which has RGB channels), so every pixel is a RGB value for its class.
Suppose I have numpy array with shape = [y,z,21] where y = image_width, z= image_height. The above array represents image with 21 channels. How should I convert it to size = [ y,z,3 ] ?