MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / __init__

Method __init__

eval/CIPO_evaluation/pycocotools/cocoeval.py:75–95  ·  view source on GitHub ↗

Initialize CocoEval using coco APIs for gt and dt :param cocoGt: coco object with ground truth annotations :param cocoDt: coco object with detection results :return: None

(self, cocoGt=None, cocoDt=None, iouType='bbox')

Source from the content-addressed store, hash-verified

73 # recall - [TxKxAxM] max recall for every evaluation setting
74 # Note: precision and recall==-1 for settings with no gt objects.
75 def __init__(self, cocoGt=None, cocoDt=None, iouType='bbox'):
76 '''
77 Initialize CocoEval using coco APIs for gt and dt
78 :param cocoGt: coco object with ground truth annotations
79 :param cocoDt: coco object with detection results
80 :return: None
81 '''
82 if not iouType:
83 print('iouType not specified. use default iouType segm')
84 self.cocoGt = cocoGt # ground truth COCO API
85 self.cocoDt = cocoDt # detections COCO API
86 self.evalImgs = defaultdict(list) # per-image per-category evaluation results [KxAxI] elements
87 self.eval = {} # accumulated evaluation results
88 self._gts = defaultdict(list) # gt for evaluation
89 self._dts = defaultdict(list) # dt for evaluation
90 self.params = Params(iouType=iouType) # parameters
91 self._paramsEval = {} # parameters for evaluation
92 self.stats = [] # result summarization
93 self.ious = {} # ious between all gts and dts
94 if not cocoGt is None:
95 self.params.imgIds = sorted(list(cocoGt.imgs.keys()))
96
97 def _prepare(self):
98 '''

Callers

nothing calls this directly

Calls 1

ParamsClass · 0.85

Tested by

no test coverage detected