复杂PDF布局解析方案
VOP采用DocLayout-YOLO技术解决元素错位问题,具体操作:
- preprocessing::
- utilization
--layout_analysis high
参数启用增强布局检测 - 对扫描件先进行
unpaper
纠偏(需自行安装)
- utilization
- Modular processing::
- 第一阶段用
ocr_stage1.py --mode layout
生成元素热力图 - manual check
temp/detection_visualize.jpg
- pass (a bill or inspection etc)
--element_margin 15
调整元素间距阈值
- 第一阶段用
- output control::
- 对学术论文推荐
--format json
保留坐标信息 - increase
--semantic_block
启用逻辑段落重组
- 对学术论文推荐
注:遇到跨栏排版时,建议先用pdf2image
转换为600DPI单页PNG再处理。
This answer comes from the articleVOP: OCR Tool for Extracting Complex Diagrams and Math FormulasThe