From d1d2c1f4693258635eb470cc24ffd81f85a28ddc Mon Sep 17 00:00:00 2001 From: Hongbin Sun Date: Tue, 30 Nov 2021 15:17:07 +0800 Subject: [PATCH] [Fix] Change SBC case to DBC case (#632) --- mmocr/core/evaluation/hmean.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mmocr/core/evaluation/hmean.py b/mmocr/core/evaluation/hmean.py index c46331ec..b853b2da 100644 --- a/mmocr/core/evaluation/hmean.py +++ b/mmocr/core/evaluation/hmean.py @@ -125,6 +125,8 @@ def eval_hmean(results, best_result = dict(hmean=-1) for iter in range(3, 10): thr = iter * 0.1 + if thr < score_thr: + continue top_preds = select_top_boundary(preds, pred_scores, thr) if metric == 'hmean-iou': result, img_result = hmean_iou.eval_hmean_iou( @@ -138,9 +140,9 @@ def eval_hmean(results, output_ranklist(img_result, img_infos, rank_list) print_log( - 'thr {0:.1f}, recall:{1[recall]:.3f}, ' + 'thr {0:.2f}, recall: {1[recall]:.3f}, ' 'precision: {1[precision]:.3f}, ' - 'hmean:{1[hmean]:.3f}'.format(thr, result), + 'hmean: {1[hmean]:.3f}'.format(thr, result), logger=logger) if result['hmean'] > best_result['hmean']: best_result = result