diff --git a/tools/infer/utility.py b/tools/infer/utility.py index 8ae8822f760b6e5fb7947ac878ce798ebe22883d..04de23260fe0dfeb3b036a2df9788016647109ae 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)