|
|
@@ -18,16 +18,38 @@ preprocessor:
|
|
|
enabled: false
|
|
|
|
|
|
# ============================================================
|
|
|
-# Layout 检测配置 - 使用 PP-DocLayoutV3
|
|
|
+# Layout 检测配置 - 智能路由器(按场景直接选择模型)
|
|
|
# ============================================================
|
|
|
layout_detection:
|
|
|
- module: "paddle"
|
|
|
- model_name: "PP-DocLayoutV3"
|
|
|
- model_dir: "PaddlePaddle/PP-DocLayoutV3_safetensors"
|
|
|
- device: "cpu"
|
|
|
- conf: 0.3
|
|
|
- num_threads: 4
|
|
|
- batch_size: 1
|
|
|
+ module: "smart_router"
|
|
|
+ strategy: "scene" # 按场景直接选择模型,不走ocr_eval
|
|
|
+
|
|
|
+ # 场景策略:指定场景直接选用的布局模型
|
|
|
+ scene_strategy:
|
|
|
+ bank_statement:
|
|
|
+ model: "docling"
|
|
|
+ financial_report:
|
|
|
+ model: "paddle_ppdoclayoutv3"
|
|
|
+ default_model: "docling"
|
|
|
+
|
|
|
+ # 配置多个模型
|
|
|
+ models:
|
|
|
+ docling:
|
|
|
+ module: "docling"
|
|
|
+ model_name: "docling-layout-old"
|
|
|
+ model_dir: "ds4sd/docling-layout-old"
|
|
|
+ device: "cpu"
|
|
|
+ conf: 0.3
|
|
|
+ num_threads: 4
|
|
|
+
|
|
|
+ paddle_ppdoclayoutv3:
|
|
|
+ module: "paddle"
|
|
|
+ model_name: "PP-DocLayoutV3"
|
|
|
+ model_dir: "PaddlePaddle/PP-DocLayoutV3_safetensors"
|
|
|
+ device: "cpu"
|
|
|
+ conf: 0.3
|
|
|
+ num_threads: 4
|
|
|
+ batch_size: 1
|
|
|
|
|
|
# 后处理配置
|
|
|
post_process:
|