'coco ann: [u\'segmentation\', u\'area\', u\'iscrowd\', u\'image_id\', u\'bbox\', u\'category_id\', u\'id\']
iscrowd:
crowd instances are handled by marking their overlaps with all categories to -1
and later excluded in training
bbox:
[x1, y1, w, h]
:param index: coco image id
:return: roidb entry'

def _load_coco_annotation(self, index):

    im_ann = self.coco.loadImgs(index)[0]
    width = im_ann['width']
    height = im_ann['height']
    annIds = self.coco.getAnnIds(imgIds=index, iscrowd=None)
    objs = self.coco.loadAnns(annIds)
    valid_objs = []
    for obj in objs:
        (x, y, w, h) = obj['bbox']
        x1 = np.max((0, x))
        y1 = np.max((0, y))
        x2 = np.min(((width - 1), (x1 + np.max((0, (w - 1))))))
        y2 = np.min(((height - 1), (y1 + np.max((0, (h - 1))))))
        if ((obj['area'] > 0) and (x2 >= x1) and (y2 >= y1)):
            obj['clean_bbox'] = [x1, y1, x2, y2]
            valid_objs.append(obj)
    objs = valid_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)
    for (ix, obj) in enumerate(objs):
        cls = self._coco_ind_to_class_ind[obj['category_id']]
        boxes[ix, :] = obj['clean_bbox']
        gt_classes[ix] = cls
        if obj['iscrowd']:
            overlaps[ix, :] = (-1.0)
        else:
            overlaps[(ix, cls)] = 1.0
    roi_rec = {'image': self.image_path_from_index(index), 'height': height, 'width': width, '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
