Skip to content

Commit

Permalink
fix evaluation with param.useCats = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
tylin committed Sep 9, 2015
1 parent 54cc41f commit 1f07dc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PythonAPI/pycocotools/cocoeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ def accumulate(self, p = None):
# allows input customized parameters
if p is None:
p = self.params
p.catIds = p.catIds if p.useCats == 1 else [-1]
T = len(p.iouThrs)
R = len(p.recThrs)
K = len(p.catIds) if p.useCats else 1
Expand All @@ -294,8 +295,8 @@ def accumulate(self, p = None):

# create dictionary for future indexing
_pe = self._paramsEval

setK = set(self.params.catIds) if _pe.useCats else set([-1])
catIds = _pe.catIds if _pe.useCats else [-1]
setK = set(catIds)
setA = set(map(tuple, _pe.areaRng))
setM = set(_pe.maxDets)
setI = set(_pe.imgIds)
Expand Down

0 comments on commit 1f07dc3

Please sign in to comment.