将尺寸扩充到a4提高识别效果
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user