|
|
@@ -125,9 +125,16 @@ def process_images_with_table_pipeline(
|
|
|
try:
|
|
|
outputs = pipeline.predict(
|
|
|
img_path,
|
|
|
- use_doc_preprocessor=True,
|
|
|
+ use_doc_orientation_classify=False,
|
|
|
+ use_doc_unwarping=False,
|
|
|
use_layout_detection=True,
|
|
|
- use_ocr_model=True
|
|
|
+ use_ocr_results_with_table_cells=True,
|
|
|
+ use_table_orientation_classify=False,
|
|
|
+ use_wired_table_cells_trans_to_html=True,
|
|
|
+ # 新增:关闭单元格内拆分,整格识别以保留折行文本,
|
|
|
+ # 修改paddlex/inference/pipelines/table_recognition/pipeline_v2.py
|
|
|
+ # get_table_recognition_res传入参数self.cells_split_ocr=False,保证单元格内换行不被拆分
|
|
|
+ use_table_cells_split_ocr=False,
|
|
|
)
|
|
|
cost = time.time() - start
|
|
|
|