OCR model that handles complex tables, forms, handwriting with full layout.
GitHub RepoImpressions99

OCR model that handles complex tables, forms, handwriting with full layout.

@githubprojectsPost Author

Project Description

View on GitHub

Chandra: An OCR Model That Actually Understands Layout

If you've ever tried to extract text from a scanned form, a complex table, or a handwritten note, you know the pain. Most OCR tools treat a document like a simple stream of words, completely butchering the structure. The result? Data you can't easily use. That's why Chandra caught our eye.

It's an open-source OCR model built to preserve the actual layout of a document. Tables stay as tables. Forms keep their fields aligned. Handwritten notes maintain their spatial flow. It's not just reading text; it's understanding the document's visual grammar.

What It Does

Chandra is a deep learning model for document understanding. It takes an image of a document and returns structured data, identifying not just the text, but also its type (like a header, form field, or table cell) and its precise position on the page. This means you get a hierarchical, semantic representation of the document, not just a flat text file.

Why It's Cool

The magic is in its training and output. Chandra was trained on a diverse mix of documents—including reports, invoices, handwritten notes, and forms—so it's robust across many real-world scenarios. Instead of just bounding boxes around words, it outputs the logical structure.

  • Handles Complexity: Nested tables, multi-column layouts, and form fields with checkboxes don't break it.
  • Preserves Relationships: It understands that "Date:" and the handwritten "01/01/2024" next to it are connected, grouping them as a key-value pair.
  • Open & Hackable: Being on GitHub means you can fine-tune it on your own document types, inspect the code, and contribute improvements. It's a practical tool for developers to build on.

How to Try It

The quickest way to see it in action is through the hosted demo. Head over to the Chandra GitHub repository. The README has clear instructions for running it locally if you want to dive deeper.

For a local test, you can clone the repo and use the provided example scripts. It's packaged as a Python library, so getting started is straightforward:

git clone https://github.com/datalab-to/chandra.git
cd chandra
# Follow the setup instructions in the README

Final Thoughts

In a world flooded with PDFs and scanned documents, tools that can accurately parse structure are a game-changer. Chandra feels like a step towards that ideal—a developer-friendly OCR that actually gives you usable data, not just text. If you're building anything that involves document automation, data extraction from forms, or digitizing archives, this repo is definitely worth a few hours of your time to experiment with. It solves a real, messy problem in a practical way.

@githubprojects

Back to Projects
Project ID: 0ab7462f-616d-4463-a753-f5fee9610912Last updated: March 31, 2026 at 03:34 PM