From 25a5ca6cca0df02c4459c1d448b487acf328177f Mon Sep 17 00:00:00 2001 From: dyning Date: Fri, 15 May 2020 22:46:06 +0800 Subject: [PATCH] Update utility.py --- tools/infer/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/infer/utility.py b/tools/infer/utility.py index cb7833a1..fd72a19f 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -172,7 +172,7 @@ def draw_ocr(image, boxes, txts, scores, draw_txt=True, drop_score=0.5): continue font = ImageFont.truetype( "./doc/simfang.ttf", font_size, encoding="utf-8") - new_txt = str(count) + ': ' + txt + ' ' + str(scores[count]) + new_txt = str(count) + ': ' + txt + ' ' + '%.3f' % (scores[count]) draw_txt.text( (20, gap * (count + 1)), new_txt, txt_color, font=font) count += 1 -- GitLab