diff --git a/tools/infer/utility.py b/tools/infer/utility.py index cb7833a1b3a67dcce89b4056a81ade3959088647..fd72a19f6dac1bc4ae79565e9a85134e2cd6945d 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