diff --git a/deploy/utils/draw_bbox.py b/deploy/utils/draw_bbox.py index 9c0bcf61bfc84d5dbb217f1f317dc084bbd5f975..8daae96ecaae7f82945693f5ab0bd3f25f61bb55 100644 --- a/deploy/utils/draw_bbox.py +++ b/deploy/utils/draw_bbox.py @@ -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)