diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 799163a8ed7..e088a8a6e26 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -621,7 +621,7 @@ def text_visual( ), "The number of txts and corresponding scores must match" def create_blank_img(): - blank_img = np.ones(shape=[img_h, img_w], dtype=np.int8) * 255 + blank_img = np.ones(shape=[img_h, img_w], dtype=np.uint8) * 255 blank_img[:, img_w - 1 :] = 0 blank_img = Image.fromarray(blank_img).convert("RGB") draw_txt = ImageDraw.Draw(blank_img)