From 51d771ce1998eabc1ed5a9cb642038800d8c9b7c Mon Sep 17 00:00:00 2001 From: zhangxinnan Date: Sun, 4 Sep 2022 12:40:45 +0800 Subject: [PATCH] =?UTF-8?q?import=20random=E6=94=BE=E5=88=B0=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=20=E5=BC=80=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 8ae8822f..04de2326 100644 --- a/tools/infer/utility.py +++ b/tools/infer/utility.py @@ -23,6 +23,7 @@ from PIL import Image, ImageDraw, ImageFont import math from paddle import inference import time +import random from ppocr.utils.logging import get_logger @@ -404,7 +405,6 @@ def draw_ocr_box_txt(image, h, w = image.height, image.width img_left = image.copy() img_right = np.ones((h, w, 3), dtype=np.uint8) * 255 - import random random.seed(0) draw_left = ImageDraw.Draw(img_left) -- GitLab