From 9058e002d883fe91114bb4d554c7a5e6cdc34983 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 29 May 2020 15:23:09 +0800 Subject: [PATCH] fix multi-line txt display --- 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 e5efdb67..c3d3b445 100755 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -227,7 +227,7 @@ def text_visual(texts, scores, img_h=400, img_w=600, threshold=0.): first_line = False else: new_txt = ' ' + txt - draw_txt.text((0, gap * (count + 1)), new_txt, txt_color, font=font) + draw_txt.text((0, gap * count), new_txt, txt_color, font=font) txt = tmp[img_w // font_size - 4:] if count >= img_h // gap - 1: txt_img_list.append(np.array(blank_img))