'for a given index, load image and bounding boxes info from XML file
:param index: index of a specific image
:return: record[\'boxes\', \'gt_classes\', \'gt_overlaps\', \'flipped\']'

def load_pascal_annotation(self, index):

    import xml.etree.ElementTree as ET
    roi_rec = dict()
    roi_rec['image'] = self.image_path_from_index(index)
    size = cv2.imread(roi_rec['image']).shape
    roi_rec['height'] = size[0]
    roi_rec['width'] = size[1]
    filename = os.path.join(self.data_path, 'Annotations', (index + '.xml'))
    tree = ET.parse(filename)
    objs = tree.findall('object')
    if (not self.config['use_diff']):
        non_diff_objs = [obj for obj in objs if (int(obj.find('difficult').text) == 0)]
        objs = non_diff_objs
    num_objs = len(objs)
    boxes = np.zeros((num_objs, 4), dtype=np.uint16)
    gt_classes = np.zeros(num_objs, dtype=np.int32)
    overlaps = np.zeros((num_objs, self.num_classes), dtype=np.float32)
    class_to_index = dict(zip(self.classes, range(self.num_classes)))
    for (ix, obj) in enumerate(objs):
        bbox = obj.find('bndbox')
        x1 = (float(bbox.find('xmin').text) - 1)
        y1 = (float(bbox.find('ymin').text) - 1)
        x2 = (float(bbox.find('xmax').text) - 1)
        y2 = (float(bbox.find('ymax').text) - 1)
        cls = class_to_index[obj.find('name').text.lower().strip()]
        boxes[ix, :] = [x1, y1, x2, y2]
        gt_classes[ix] = cls
        overlaps[(ix, cls)] = 1.0
    roi_rec.update({'boxes': boxes, 'gt_classes': gt_classes, 'gt_overlaps': overlaps, 'max_classes': overlaps.argmax(axis=1), 'max_overlaps': overlaps.max(axis=1), 'flipped': False})
    return roi_rec
