Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pdollar/coco
Browse files Browse the repository at this point in the history
  • Loading branch information
pdollar committed Oct 1, 2015
2 parents e1edc69 + 1f07dc3 commit 7faa9e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion PythonAPI/pycocotools/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def info(self):
Print information about the annotation file.
:return:
"""
for key, value in self.datset['info'].items():
for key, value in self.dataset['info'].items():
print '%s: %s'%(key, value)

def getAnnIds(self, imgIds=[], catIds=[], areaRng=[], iscrowd=None):
Expand Down
11 changes: 8 additions & 3 deletions PythonAPI/pycocotools/cocoeval.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,14 @@ def evaluateImg(self, imgId, catId, aRng, maxDet):
dtIg = np.logical_or(dtIg, np.logical_and(dtm==0, np.repeat(a,T,0)))
# store results for given image and category
return {
'image_id': imgId,
'category_id': catId,
'aRng': aRng,
'maxDet': maxDet,
'dtIds': [d['id'] for d in dt],
'gtIds': [g['id'] for g in gt],
'dtMatches': dtm,
# 'gtMatches': gtm,
'gtMatches': gtm,
'dtScores': [d['score'] for d in dt],
'gtIgnore': gtIg,
'dtIgnore': dtIg,
Expand All @@ -280,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 @@ -290,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 7faa9e0

Please sign in to comment.