Update utility.py
This commit is contained in:
parent
ed177f8cf6
commit
25a5ca6cca
|
@ -172,7 +172,7 @@ def draw_ocr(image, boxes, txts, scores, draw_txt=True, drop_score=0.5):
|
||||||
continue
|
continue
|
||||||
font = ImageFont.truetype(
|
font = ImageFont.truetype(
|
||||||
"./doc/simfang.ttf", font_size, encoding="utf-8")
|
"./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(
|
draw_txt.text(
|
||||||
(20, gap * (count + 1)), new_txt, txt_color, font=font)
|
(20, gap * (count + 1)), new_txt, txt_color, font=font)
|
||||||
count += 1
|
count += 1
|
||||||
|
|
Loading…
Reference in New Issue