def voc_label_indices(colormap, colormap2label):
    """Assign label indices for Pascal VOC2012 Dataset."""
    colormap = colormap.astype('int32')
    idx = (colormap[:, :, (0)] * 256 + colormap[:, :, (1)]) * 256 + colormap[:,
        :, (2)]
    return colormap2label[idx]
