|
|
@@ -502,11 +502,11 @@ output = pipeline.predict(
|
|
|
)
|
|
|
|
|
|
for res in output:
|
|
|
- res.print()
|
|
|
- res.save_to_img("./output/")
|
|
|
- res.save_to_xlsx("./output/")
|
|
|
- res.save_to_html("./output/")
|
|
|
- res.save_to_json("./output/")
|
|
|
+ res.print()
|
|
|
+ res.save_to_img("./output/")
|
|
|
+ res.save_to_xlsx("./output/")
|
|
|
+ res.save_to_html("./output/")
|
|
|
+ res.save_to_json("./output/")
|
|
|
```
|
|
|
|
|
|
在上述 Python 脚本中,执行了如下几个步骤:
|
|
|
@@ -766,6 +766,8 @@ for res in output:
|
|
|
|
|
|
- `input_path`: `(str)` 待预测图像的输入路径
|
|
|
|
|
|
+ - `page_index`: `(Union[int, None])` 如果输入是PDF文件,则表示当前是PDF的第几页,否则为 `None`
|
|
|
+
|
|
|
- `model_settings`: `(Dict[str, bool])` 配置产线所需的模型参数
|
|
|
|
|
|
- `use_doc_preprocessor`: `(bool)` 控制是否启用文档预处理子产线
|
|
|
@@ -846,11 +848,11 @@ output = pipeline.predict(
|
|
|
)
|
|
|
|
|
|
for res in output:
|
|
|
- res.print()
|
|
|
- res.save_to_img("./output/")
|
|
|
- res.save_to_xlsx("./output/")
|
|
|
- res.save_to_html("./output/")
|
|
|
- res.save_to_json("./output/")
|
|
|
+ res.print()
|
|
|
+ res.save_to_img("./output/")
|
|
|
+ res.save_to_xlsx("./output/")
|
|
|
+ res.save_to_html("./output/")
|
|
|
+ res.save_to_json("./output/")
|
|
|
|
|
|
```
|
|
|
|
|
|
@@ -1163,17 +1165,17 @@ SubModules:
|
|
|
module_name: table_structure_recognition
|
|
|
model_name: SLANeXt_wired
|
|
|
model_dir: null # 替换为微调后的有线表格结构识别模型权重路径
|
|
|
-
|
|
|
+
|
|
|
WirelessTableStructureRecognition:
|
|
|
module_name: table_structure_recognition
|
|
|
model_name: SLANeXt_wireless
|
|
|
model_dir: null # 替换为微调后的无线表格结构识别模型权重路径
|
|
|
-
|
|
|
+
|
|
|
WiredTableCellsDetection:
|
|
|
module_name: table_cells_detection
|
|
|
model_name: RT-DETR-L_wired_table_cell_det
|
|
|
model_dir: null # 替换为微调后的有线表格单元格检测模型权重路径
|
|
|
-
|
|
|
+
|
|
|
WirelessTableCellsDetection:
|
|
|
module_name: table_cells_detection
|
|
|
model_name: RT-DETR-L_wireless_table_cell_det
|
|
|
@@ -1210,7 +1212,7 @@ SubPipelines:
|
|
|
thresh: 0.3
|
|
|
box_thresh: 0.6
|
|
|
unclip_ratio: 2.0
|
|
|
-
|
|
|
+
|
|
|
TextRecognition:
|
|
|
module_name: text_recognition
|
|
|
model_name: PP-OCRv4_server_rec
|