Layout Parser is a unified open-source toolkit for deep-learning-based document image analysis, giving developers a single, consistent API for detecting and understanding the structure of document pages. It has earned about 5,800 stars on GitHub, with its latest updates in 2024, and is released under the Apache-2.0 license.
Scanned documents and PDFs are just pixels until a layout model identifies their building blocks — titles, paragraphs, tables, figures, captions and reading order. Layout Parser packages that capability into a simple pipeline: load a pretrained detection model (built on Detectron2) trained on datasets such as PubLayNet or DocBank, run it on a page image, and receive structured layout data you can filter, visualize and feed into OCR. A community model zoo hosts layout models for different document types — scientific papers, newspapers, forms, historical documents — and the library provides clean abstractions for layout elements and blocks, coordinate manipulation, and drawing results back onto the page for inspection. The project also emphasizes sharing: researchers can publish their own layout models to the community platform with a few lines of code, growing the zoo beyond the core team’s document types. Layout Parser has been widely adopted in digital-humanities and archive-digitization projects, where page structures vary enormously and off-the-shelf OCR alone is not enough.
Layout Parser is completely free and open source under the Apache-2.0 license.
Layout Parser is for developers and data scientists building document-understanding pipelines — digitizing archives, extracting structured data from forms and papers, or preprocessing pages for downstream OCR and LLM workflows.