OCR, Layout and Vision Parsing
In this article
- Decide, page by page, whether native extraction is enough or a page needs OCR, a layout model or a vision-based parser, and name the failed check that sends it up a step.
- Read OCR output as words with a bounding box and a confidence score, and say why a high score does not prove a word is right.
- Check what a vision-based parser writes against independent evidence on the same page, keep the raw page and every block's position, and quarantine a document that fails.
- Terms defined here: bounding box, confidence score, layout model, vision-based parser.
Overview
A customer asks how to restart an older Brightline router. The answer is on page 5 of its manual, but that manual is a scan: the file holds a picture of each page and no characters. A parser that reads stored text returns nothing, so the assistant has nothing to search.
In an invented example, Brightline, a home-internet provider, runs a support assistant on its website that answers customers and can look up an order, issue a refund of at most $50 and hand a conversation to a person on the support team. Its 12 router manuals are PDF files in a file store; 11 are digital, and one older manual, manual-bl-r3, is a scan of a printed manual. The pages, their words and every number below are made up.
The question for each page is which parser reads it, and how far to trust what comes out. The answer is a ladder: native extraction of the stored text, then OCR (software that reads the characters in a picture, met in Multimodal Context) with a model that finds the regions of a page, then a model that reads the page image itself, each slower and less predictable than the one before. A page climbs only when a check on the cheaper output fails, and each step up stays untrusted until its output is checked against the page itself.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Native extraction and the checks on it
- OCR on a scan
- The layout model
- The vision-based parser
- The routing rule
- Checking each step up
- Cost, latency and repeatability
- Common mistakes
- Sources
- Check yourself, 13 questions