#layout #document #analysis #deep-learning #computer-vision

layoutparser-ort

A simplified port of LayoutParser for detecting layout elements on documents

1 unstable release

0.1.0 Jun 3, 2024

#528 in Images

Download history 64/week @ 2024-05-28 112/week @ 2024-06-04 6/week @ 2024-06-11

182 downloads per month

Apache-2.0

52KB
1K SLoC

layoutparser-ort

A simplified port of LayoutParser for detecting layout elements on documents. Runs Detectron2 and YOLOX layout models from unstructured-inference in ONNX format through onnxruntime (bindings via ort). Check out the examples for a quick start!

License

layoutparser-ort mirrors its API from LayoutParser and includes preprocessing code derived from unstructured-inference, both licensed under the Apache License 2.0. Likewise, layoutparser-ort is licensed under the Apache License 2.0.

Appendix: Similar libraries

  • surya: OCR, layout analysis, reading order, line detection in 90+ languages
    • SegFormer (transformers: SegFormer), Donut (transformers: Donut), CRAFT (pytorch)
    • License: GPLv3.0 (code), cc-by-nc-sa-4.0 (models)
      • cc-by-nc-sa-4.0: noncommerical but author "waive[s] that for any organization under $5M USD in gross revenue in the most recent 12-month period."
  • unstructured-inference: hosted model inference code for layout parsing models
    • Models: Detectron2 (LayoutParser-PubLayNet-PyTorch, LayoutParser-PubLayNet-ONNX), YOLOX (probably trained on DocLayNet, Quantized, ONNX), Table-Transformer (transformers: Table Transformer), Donut (transformers: Donut)
    • License: Apache 2.0
  • LayoutParser: A Unified Toolkit for Deep Learning Based Document Image Analysis

Dependencies

~13–29MB
~265K SLoC