|
|
@@ -21,10 +21,9 @@ load_dotenv(override=True)
|
|
|
|
|
|
# 复用你现有的输入获取与保存工具
|
|
|
from ppstructurev3_utils import (
|
|
|
- get_input_files,
|
|
|
save_output_images, # 支持保存 result.img 中的可视化
|
|
|
)
|
|
|
-from utils import normalize_markdown_table
|
|
|
+from utils import normalize_markdown_table, get_input_files
|
|
|
|
|
|
def html_table_to_markdown(html: str) -> str:
|
|
|
"""
|
|
|
@@ -293,9 +292,15 @@ if __name__ == "__main__":
|
|
|
print("🚀 启动 table_recognition_v2 单管线处理程序...")
|
|
|
if len(sys.argv) == 1:
|
|
|
# 演示默认参数(请按需修改)
|
|
|
+ # demo = {
|
|
|
+ # "--input_dir": "/Users/zhch158/workspace/data/流水分析/A用户_单元格扫描流水.img",
|
|
|
+ # "--output_dir": "/Users/zhch158/workspace/data/流水分析/A用户_单元格扫描流水/table_recognition_v2_Results",
|
|
|
+ # "--pipeline": "./my_config/table_recognition_v2.yaml",
|
|
|
+ # "--device": "cpu",
|
|
|
+ # }
|
|
|
demo = {
|
|
|
- "--input_dir": "/Users/zhch158/workspace/data/流水分析/A用户_单元格扫描流水.img",
|
|
|
- "--output_dir": "/Users/zhch158/workspace/data/流水分析/A用户_单元格扫描流水/table_recognition_v2_Results",
|
|
|
+ "--input_file": "/Users/zhch158/workspace/data/至远彩色印刷工业有限公司/2023年度报告母公司.img/2023年度报告母公司_page_004.png",
|
|
|
+ "--output_dir": "/Users/zhch158/workspace/data/至远彩色印刷工业有限公司/table_recognition_v2_Results",
|
|
|
"--pipeline": "./my_config/table_recognition_v2.yaml",
|
|
|
"--device": "cpu",
|
|
|
}
|