def annotation_path_from_index(self, index):
        """
        find the gt path from given index
        :param index: the given index
        :return: the image path
        """
        index_folder = index.split('_')[0]
        image_file = os.path.join(self.data_path, 'gtFine', self.image_set_sub_folder, index_folder, index + '_gtFine_labelTrainIds.png')
        assert os.path.exists(image_file), 'Path does not exist: {}'.format(image_file)
        return image_file

        find the gt path from given index
        :param index: the given index
        :return: the image path
        
lib/dataset/cityscape.py