mirror of
https://github.com/open-mmlab/mmocr.git
synced 2025-06-03 21:54:47 +08:00
[Fix] Change SBC case to DBC case (#632)
This commit is contained in:
parent
1c8ab80409
commit
d1d2c1f469
@ -125,6 +125,8 @@ def eval_hmean(results,
|
|||||||
best_result = dict(hmean=-1)
|
best_result = dict(hmean=-1)
|
||||||
for iter in range(3, 10):
|
for iter in range(3, 10):
|
||||||
thr = iter * 0.1
|
thr = iter * 0.1
|
||||||
|
if thr < score_thr:
|
||||||
|
continue
|
||||||
top_preds = select_top_boundary(preds, pred_scores, thr)
|
top_preds = select_top_boundary(preds, pred_scores, thr)
|
||||||
if metric == 'hmean-iou':
|
if metric == 'hmean-iou':
|
||||||
result, img_result = hmean_iou.eval_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)
|
output_ranklist(img_result, img_infos, rank_list)
|
||||||
|
|
||||||
print_log(
|
print_log(
|
||||||
'thr {0:.1f}, recall:{1[recall]:.3f}, '
|
'thr {0:.2f}, recall: {1[recall]:.3f}, '
|
||||||
'precision: {1[precision]:.3f}, '
|
'precision: {1[precision]:.3f}, '
|
||||||
'hmean:{1[hmean]:.3f}'.format(thr, result),
|
'hmean: {1[hmean]:.3f}'.format(thr, result),
|
||||||
logger=logger)
|
logger=logger)
|
||||||
if result['hmean'] > best_result['hmean']:
|
if result['hmean'] > best_result['hmean']:
|
||||||
best_result = result
|
best_result = result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user