(self, id_setup)
Prepare ._gts and ._dts for evaluation based on params
        :return: None
Prepare ._gts and ._dts for evaluation based on params
        :return: None
Prepare . _gts and . _dts for evaluation based on params : return : None
def _prepare(self, id_setup):
        '''
        Prepare ._gts and ._dts for evaluation based on params
        :return: None
        '''
        p = self.params
        if p.useCats:
            gts=self.cocoGt.loadAnns(self.cocoGt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds))
            dts=self.cocoDt.loadAnns(self.cocoDt.getAnnIds(imgIds=p.imgIds, catIds=p.catIds))
        else:
            gts=self.cocoGt.loadAnns(self.cocoGt.getAnnIds(imgIds=p.imgIds))
            dts=self.cocoDt.loadAnns(self.cocoDt.getAnnIds(imgIds=p.imgIds))


        # set ignore flag
        for gt in gts:
            gt['ignore'] = gt['ignore'] if 'ignore' in gt else 0
            # gt['ignore'] = 1 if (gt['height'] < self.params.HtRng[id_setup][0] or gt['height'] > self.params.HtRng[id_setup][1]) or \
            #    ( gt['vis_ratio'] < self.params.VisRng[id_setup][0] or gt['vis_ratio'] > self.params.VisRng[id_setup][1]) else gt['ignore']

        self._gts = defaultdict(list)       # gt for evaluation
        self._dts = defaultdict(list)       # dt for evaluation
        for gt in gts:
            self._gts[gt['image_id'], gt['category_id']].append(gt)
        for dt in dts:
            self._dts[dt['image_id'], dt['category_id']].append(dt)
        self.evalImgs = defaultdict(list)   # per-image per-category evaluation results
        self.eval     = {}
def _prepare ( self , id_setup ) : p = self . params if p . useCats : gts = self . cocoGt . loadAnns ( self . cocoGt . getAnnIds ( imgIds = p . imgIds , catIds = p . catIds ) ) dts = self . cocoDt . loadAnns ( self . cocoDt . getAnnIds ( imgIds = p . imgIds , catIds = p . catIds ) ) else : gts = self . cocoGt . loadAnns ( self . cocoGt . getAnnIds ( imgIds = p . imgIds ) ) dts = self . cocoDt . loadAnns ( self . cocoDt . getAnnIds ( imgIds = p . imgIds ) ) # set ignore flag for gt in gts : gt [ 'ignore' ] = gt [ 'ignore' ] if 'ignore' in gt else 0 # gt['ignore'] = 1 if (gt['height'] < self.params.HtRng[id_setup][0] or gt['height'] > self.params.HtRng[id_setup][1]) or \ #    ( gt['vis_ratio'] < self.params.VisRng[id_setup][0] or gt['vis_ratio'] > self.params.VisRng[id_setup][1]) else gt['ignore'] self . _gts = defaultdict ( list ) # gt for evaluation self . _dts = defaultdict ( list ) # dt for evaluation for gt in gts : self . _gts [ gt [ 'image_id' ] , gt [ 'category_id' ] ] . append ( gt ) for dt in dts : self . _dts [ dt [ 'image_id' ] , dt [ 'category_id' ] ] . append ( dt ) self . evalImgs = defaultdict ( list ) # per-image per-category evaluation results self . eval = { }