'Load label image as 1 x height x width integer array of label indices.
The leading singleton dimension is required by the loss.'

def load_label(self, idx):

    im = Image.open('{}/SegmentationClass/{}.png'.format(self.voc_dir, idx))
    label = np.array(im, dtype=np.uint8)
    label = label[np.newaxis, ...]
    return label
