From 846c83bf938ee9ff4aba937f7a9a7e352f07aa77 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Fri, 12 Jul 2024 09:09:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=B0=BA=E5=AF=B8=E6=89=A9=E5=85=85?= =?UTF-8?q?=E5=88=B0a4=E6=8F=90=E9=AB=98=E8=AF=86=E5=88=AB=E6=95=88?= =?UTF-8?q?=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_mask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/photo_mask.py b/photo_mask.py index de1dc61..7260a0f 100644 --- a/photo_mask.py +++ b/photo_mask.py @@ -309,7 +309,7 @@ def get_mask_layout(image, contents): try: # layouts = get_ocr_layout(OCR, temp_file.name) try: - layouts = DOC_PARSER.parse({"doc": temp_file.name})["layout"] + layouts = DOC_PARSER.parse({"doc": temp_file.name}, True)["layout"] except TypeError as te: # 如果是类型错误,大概率是没识别到文字 layouts = []