@@ -68,7 +68,6 @@ def __init__(self, cocoGt=None, cocoDt=None, iouType='segm'):
68
68
print ('iouType not specified. use default iouType segm' )
69
69
self .cocoGt = cocoGt # ground truth COCO API
70
70
self .cocoDt = cocoDt # detections COCO API
71
- self .params = {} # evaluation parameters
72
71
self .evalImgs = defaultdict (list ) # per-image per-category evaluation results [KxAxI] elements
73
72
self .eval = {} # accumulated evaluation results
74
73
self ._gts = defaultdict (list ) # gt for evaluation
@@ -203,7 +202,7 @@ def computeOks(self, imgId, catId):
203
202
if len (gts ) == 0 or len (dts ) == 0 :
204
203
return []
205
204
ious = np .zeros ((len (dts ), len (gts )))
206
- sigmas = np . array ([ .26 , .25 , .25 , .35 , .35 , .79 , .79 , .72 , .72 , .62 , .62 , 1.07 , 1.07 , .87 , .87 , .89 , .89 ]) / 10.0
205
+ sigmas = p . kpt_oks_sigmas
207
206
vars = (sigmas * 2 )** 2
208
207
k = len (sigmas )
209
208
# compute oks between each detection and ground truth object
@@ -521,6 +520,7 @@ def setKpParams(self):
521
520
self .areaRng = [[0 ** 2 , 1e5 ** 2 ], [32 ** 2 , 96 ** 2 ], [96 ** 2 , 1e5 ** 2 ]]
522
521
self .areaRngLbl = ['all' , 'medium' , 'large' ]
523
522
self .useCats = 1
523
+ self .kpt_oks_sigmas = np .array ([.26 , .25 , .25 , .35 , .35 , .79 , .79 , .72 , .72 , .62 ,.62 , 1.07 , 1.07 , .87 , .87 , .89 , .89 ])/ 10.0
524
524
525
525
def __init__ (self , iouType = 'segm' ):
526
526
if iouType == 'segm' or iouType == 'bbox' :
0 commit comments