def voc_label_indices(colormap, colormap2label):
    'Map a RGB color to a label.'
    colormap = colormap.astype('int32')
    idx = ((((colormap[:, :, 0] * 256) + colormap[:, :, 1]) * 256) + colormap[:, :, 2])
    return colormap2label[idx]
Map a RGB color to a label.
def voc_label_indices(colormap, colormap2label):
    
    colormap = colormap.astype('int32')
    idx = ((((colormap[:, :, 0] * 256) + colormap[:, :, 1]) * 256) + colormap[:, :, 2])
    return colormap2label[idx]