将尺寸扩充到a4提高识别效果

This commit is contained in:
2024-07-12 09:09:36 +08:00
parent e1beedec96
commit 846c83bf93

View File

@@ -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 = []