ocr配置的cls只能区分0度与180度,不符合需求,更换为paddleclas中的图片方向识别模型

This commit is contained in:
2024-06-25 14:13:43 +08:00
parent e8dd62e1f5
commit fc0c54fbd2
3 changed files with 69 additions and 62 deletions

View File

@@ -1,5 +1,4 @@
from paddlenlp import Taskflow
from paddleocr import PaddleOCR
from config.keys import SETTLEMENT_LIST_SCHEMA, DISCHARGE_RECORD_SCHEMA, COST_LIST_SCHEMA
@@ -37,6 +36,3 @@ DISCHARGE_IE = Taskflow("information_extraction", schema=DISCHARGE_RECORD_SCHEMA
# 费用清单
COST_IE = Taskflow("information_extraction", schema=COST_LIST_SCHEMA, model="uie-x-base",
task_path="config/model/cost_list_model", layout_analysis=LAYOUT_ANALYSIS, batch_size=IE_BATCH_SIZE)
# OCR
OCR = PaddleOCR(use_angle_cls=True, lang="ch", show_log=False)