Layout Parser

Layout Parser

★ 4 🔖 2500 saves 💰 Free GitHub

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.

Overview

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.

Key Features

  • One unified API for document layout detection across many pretrained models
  • Model zoo with models for papers, forms, newspapers, tables and more
  • Detectron2-powered detection with support for custom-trained models
  • Structured layout objects with filtering, sorting and coordinate operations
  • OCR integration to turn detected regions into text pipelines
  • Visualization tools to render detected layouts onto page images

💳 Pricing

Layout Parser is completely free and open source under the Apache-2.0 license.

Who Is It For

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.

🚀 Visit Layout Parser Official Site

🚩 Report an issue