• myhloli's avatar
    refactor(pdf_parse_union): integrate LayoutLMv3 for block orderingReplace the... · 1efebe42
    myhloli authored
    refactor(pdf_parse_union): integrate LayoutLMv3 for block orderingReplace the heuristic-based block ordering algorithm with LayoutLMv3 model predictions toimprove the accuracy of block ordering on PDF pages. Additionally, refactor the span
    handling during block filling to ensure spans are correctly assigned.
    
    - Introduce LayoutLMv3ForTokenClassification from 'hantian/layoutreader' to predict block
      order.
    - Implement span replacement strategy to use pymu spans for non-OCR content.
    - Enhance cleanup process to free GPU memory more effectively after model use.
    - Adjust block ordering logic to use median line index for text, title, and interline equation blocks.
    - Refactor page parsing core logic for better maintainability.
    
    BREAKING CHANGE: The integration of LayoutLMv3 changes the internal block handling and
    ordering mechanism, which may affect downstream systems relying on the previous
    implementation. Ensure to test thoroughly before deployment.
    1efebe42
Name
Last commit
Last update
..
dict2md Loading commit data...
filter Loading commit data...
integrations Loading commit data...
layout Loading commit data...
libs Loading commit data...
model Loading commit data...
para Loading commit data...
pipe Loading commit data...
post_proc Loading commit data...
pre_proc Loading commit data...
resources Loading commit data...
rw Loading commit data...
spark Loading commit data...
tools Loading commit data...
v3 Loading commit data...
__init__.py Loading commit data...
pdf_parse_by_ocr.py Loading commit data...
pdf_parse_by_txt.py Loading commit data...
pdf_parse_union_core.py Loading commit data...
pdf_parse_union_core_v2.py Loading commit data...
user_api.py Loading commit data...