def segmentation_path_from_index(self, index):
        """
        given image index, find out the full path of segmentation class
        :param index: index of a specific image
        :return: full path of segmentation class
        """
        seg_class_file = os.path.join(self.data_path, 'SegmentationClass', index + '.png')
        assert os.path.exists(seg_class_file), 'Path does not exist: {}'.format(seg_class_file)
        return seg_class_file

        given image index, find out the full path of segmentation class
        :param index: index of a specific image
        :return: full path of segmentation class
        
lib/dataset/pascal_voc.py