From 7e7cc43b1a265a4db910465ca4c665927fa49843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Buitrago?= <49290056+jjbuitrago@users.noreply.github.com> Date: Fri, 12 May 2023 22:24:51 +0200 Subject: [PATCH 1/2] Update cocoeval.py --- PythonAPI/pycocotools/cocoeval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PythonAPI/pycocotools/cocoeval.py b/PythonAPI/pycocotools/cocoeval.py index f4e3decb..b3453a54 100644 --- a/PythonAPI/pycocotools/cocoeval.py +++ b/PythonAPI/pycocotools/cocoeval.py @@ -458,7 +458,7 @@ def _summarize( ap=1, iouThr=None, areaRng='all', maxDets=100 ): def _summarizeDets(): stats = np.zeros((12,)) stats[0] = _summarize(1) - stats[1] = _summarize(1, iouThr=.5, maxDets=self.params.maxDets[2]) + stats[1] = _summarize(1, iouThr=.2, maxDets=self.params.maxDets[2]) stats[2] = _summarize(1, iouThr=.75, maxDets=self.params.maxDets[2]) stats[3] = _summarize(1, areaRng='small', maxDets=self.params.maxDets[2]) stats[4] = _summarize(1, areaRng='medium', maxDets=self.params.maxDets[2]) From fa1cc4fed9862d1410d70133da56e1cb77757380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Buitrago?= <49290056+jjbuitrago@users.noreply.github.com> Date: Fri, 12 May 2023 22:26:29 +0200 Subject: [PATCH 2/2] Update cocoeval.py --- PythonAPI/pycocotools/cocoeval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PythonAPI/pycocotools/cocoeval.py b/PythonAPI/pycocotools/cocoeval.py index b3453a54..fd91f347 100644 --- a/PythonAPI/pycocotools/cocoeval.py +++ b/PythonAPI/pycocotools/cocoeval.py @@ -419,7 +419,7 @@ def accumulate(self, p = None): toc = time.time() print('DONE (t={:0.2f}s).'.format( toc-tic)) - def summarize(self): + def summarize(self, main_iou): ''' Compute and display summary metrics for evaluation results. Note this functin can *only* be applied on the default parameter setting @@ -458,7 +458,7 @@ def _summarize( ap=1, iouThr=None, areaRng='all', maxDets=100 ): def _summarizeDets(): stats = np.zeros((12,)) stats[0] = _summarize(1) - stats[1] = _summarize(1, iouThr=.2, maxDets=self.params.maxDets[2]) + stats[1] = _summarize(1, iouThr=main_iou, maxDets=self.params.maxDets[2]) stats[2] = _summarize(1, iouThr=.75, maxDets=self.params.maxDets[2]) stats[3] = _summarize(1, areaRng='small', maxDets=self.params.maxDets[2]) stats[4] = _summarize(1, areaRng='medium', maxDets=self.params.maxDets[2])