(self, id_setup)
Run per image evaluation on given images and store results (a list of dict) in self.evalImgs
        :return: None
Run per image evaluation on given images and store results (a list of dict) in self.evalImgs
        :return: None
Run per image evaluation on given images and store results ( a list of dict ) in self . evalImgs : return : None
def evaluate(self, id_setup):
        '''
        Run per image evaluation on given images and store results (a list of dict) in self.evalImgs
        :return: None
        '''
        tic = time.time()
        # print('Running per image evaluation...')
        p = self.params
        # add backward compatibility if useSegm is specified in params
        if not p.useSegm is None:
            p.iouType = 'segm' if p.useSegm == 1 else 'bbox'
            print('useSegm (deprecated) is not None. Running {} evaluation'.format(p.iouType))
        # print('Evaluate annotation type *{}*'.format(p.iouType))
        p.imgIds = list(np.unique(p.imgIds))
        if p.useCats:
            p.catIds = list(np.unique(p.catIds))
        p.maxDets = sorted(p.maxDets)
        self.params=p

        self._prepare(id_setup)
        # loop through images, area range, max detection number
        catIds = p.catIds if p.useCats else [-1]

        computeIoU = self.computeIoU

        self.ious = {(imgId, catId): computeIoU(imgId, catId) \
                        for imgId in p.imgIds
                        for catId in catIds}

        evaluateImg = self.evaluateImg
        maxDet = p.maxDets[-1]
        HtRng = self.params.HtRng[id_setup]
        VisRng = self.params.VisRng[id_setup]
        self.evalImgs = [evaluateImg(imgId, catId, HtRng, VisRng, maxDet)
                 for catId in catIds
                 for imgId in p.imgIds
             ]
        self._paramsEval = copy.deepcopy(self.params)
        toc = time.time()
def evaluate ( self , id_setup ) : tic = time . time ( ) # print('Running per image evaluation...') p = self . params # add backward compatibility if useSegm is specified in params if not p . useSegm is None : p . iouType = 'segm' if p . useSegm == 1 else 'bbox' print ( 'useSegm (deprecated) is not None. Running {} evaluation' . format ( p . iouType ) ) # print('Evaluate annotation type *{}*'.format(p.iouType)) p . imgIds = list ( np . unique ( p . imgIds ) ) if p . useCats : p . catIds = list ( np . unique ( p . catIds ) ) p . maxDets = sorted ( p . maxDets ) self . params = p self . _prepare ( id_setup ) # loop through images, area range, max detection number catIds = p . catIds if p . useCats else [ - 1 ] computeIoU = self . computeIoU self . ious = { ( imgId , catId ) : computeIoU ( imgId , catId ) for imgId in p . imgIds for catId in catIds } evaluateImg = self . evaluateImg maxDet = p . maxDets [ - 1 ] HtRng = self . params . HtRng [ id_setup ] VisRng = self . params . VisRng [ id_setup ] self . evalImgs = [ evaluateImg ( imgId , catId , HtRng , VisRng , maxDet ) for catId in catIds for imgId in p . imgIds ] self . _paramsEval = copy . deepcopy ( self . params ) toc = time . time ( )