(self)
return gt_roidb
Return the database of ground-truth regions of interest.
        This function loads/saves from/to a cache file to speed up future calls.
Return the database of ground-truth regions of interest.
        This function loads/saves from/to a cache file to speed up future calls.
Return the database of ground - truth regions of interest . This function loads / saves from / to a cache file to speed up future calls .
def gt_roidb(self):
        """
        Return the database of ground-truth regions of interest.
        This function loads/saves from/to a cache file to speed up future calls.
        """

        gt_roidb0 = [self._load_coco_annotation(index)
                    for index in self._image_index]


        #need to filter instance with zeros gt boxes

        num_has_instances = 0
        image_index = []

        for i in xrange(len(self._image_index)):
            has_boxes = gt_roidb0[i]['has_boxes']
            if has_boxes:
                num_has_instances = num_has_instances + 1
                image_index.append(self._image_index[i])



        gt_roidb = [None for i in xrange(num_has_instances)]

        j = 0
        for i in xrange(len(self._image_index)):
            has_boxes = gt_roidb0[i]['has_boxes']
            if has_boxes:
                gt_roidb[j] = gt_roidb0[i]
                j = j + 1

        self._image_index = image_index
        for i in xrange(len(self._image_index)):
            gt_roidb[i]['image'] = self.image_path_at(i)


        return gt_roidb
def gt_roidb ( self ) : gt_roidb0 = [ self . _load_coco_annotation ( index ) for index in self . _image_index ] #need to filter instance with zeros gt boxes num_has_instances = 0 image_index = [ ] for i in xrange ( len ( self . _image_index ) ) : has_boxes = gt_roidb0 [ i ] [ 'has_boxes' ] if has_boxes : num_has_instances = num_has_instances + 1 image_index . append ( self . _image_index [ i ] ) gt_roidb = [ None for i in xrange ( num_has_instances ) ] j = 0 for i in xrange ( len ( self . _image_index ) ) : has_boxes = gt_roidb0 [ i ] [ 'has_boxes' ] if has_boxes : gt_roidb [ j ] = gt_roidb0 [ i ] j = j + 1 self . _image_index = image_index for i in xrange ( len ( self . _image_index ) ) : gt_roidb [ i ] [ 'image' ] = self . image_path_at ( i ) return gt_roidb