This is my method of replacing indicies with higher pixel intensity values:
#For generating colormap of given image:
def replace_pixels(img):

    labelsTC = [x for x in range(200,246)]
    temp_mask = np.zeros((img.shape),dtype=np.int)

    '''

      traverse through the given array img array. and compare each point like below

      if point >= 0 && point<=20:

        temp_mask[i] = labelsTC[point]

    '''

    for i in range(img.shape[0]):
        for j in range(img.shape[1]):
                if(img[i,j]>=1 and img[i,j]<=20):
                    temp_mask[i,j] = labelsTC[img[i,j]]



    return temp_mask

And these are the results that I get after visualisation:
Image 1, 2, 3 are the Input image, predictions (segmentation maps), ground-truth labels respectively.

plane.png1344×963 88.2 KB


bird.png1343×916 94.4 KB


computer.jpg1344×955 102 KB


dogonchair.png1343×918 111 KB