def load_pascal_segmentation_annotation(self, index):
        """
        for a given index, load image and bounding boxes info from XML file
        :param index: index of a specific image
        :return: record['seg_cls_path', 'flipped']
        """
        import xml.etree.ElementTree as ET
        seg_rec = dict()
        seg_rec['image'] = self.image_path_from_index(index)
        size = cv2.imread(seg_rec['image']).shape
        seg_rec['height'] = size[0]
        seg_rec['width'] = size[1]

        seg_rec['seg_cls_path'] = self.segmentation_path_from_index(index)
        seg_rec['flipped'] = False

        return seg_rec

        for a given index, load image and bounding boxes info from XML file
        :param index: index of a specific image
        :return: record['seg_cls_path', 'flipped']
        
lib/dataset/pascal_voc.py