提交 a29d4896 编写于 作者: G gaotingquan 提交者: cuicheng01

adapt to Pillow new version 10.0.0

上级 1a06cdce
......@@ -39,7 +39,7 @@ def draw_bbox_results(image,
xmin, ymin, xmax, ymax = result["bbox"]
text = "{}, {:.2f}".format(result["rec_docs"], result["rec_scores"])
th = font_size
tw = font.getsize(text)[0]
tw = font.getlength(text)
# tw = int(len(result["rec_docs"]) * font_size) + 60
start_y = max(0, ymin - th)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册