space ocr
ArticlesDocs
verification

Validate OCR output with bounding boxes

A confidence score tells you a model is unsure; a bounding box tells you where to look. Here's how to use per-field boxes and match ratios to validate extracted data instead of trusting it blind.

5 min read· 2026-06-25

Validating OCR usually means re-reading the document yourself — slow, and exactly the work you were trying to avoid. Bounding boxes change the loop: instead of comparing two columns of text, you let your eye jump to the spot on the image where each value was read from. Right or wrong becomes obvious in a glance.

Source receipts with extracted-field bounding boxes
Verified fields
KINSHO · 合計 2,045
ライフ · 合計 4,286

Every value carries a verified on-page location — bbox + 4-point vertices + match_ratio — on a 0–1000 normalized grid (0,0 top-left → 1000,1000 bottom-right), the same shape the live API returns. Hover a field to trace it back to the pixels it came from.

Two signals that travel with every value

space-ocr returns more than text on each field:

  • A bounding box + oriented verticeswhere the value was read. If the box sits on the wrong part of the page, the value is suspect even if it looks plausible.
  • A match_ratio (0–1)how much of the value's characters were actually located on the page. The engine treats ≥ 0.85 as a confident match; lower values are your queue of fields to eyeball.

Together they turn validation into triage: sort by match ratio, look only at the low ones, and confirm each by its box.

DemoHover across cells — the source highlight follows live, so spot-checking a batch takes seconds.
Hover across cells — the source highlight follows live, so spot-checking a batch takes seconds.

Why the box can be trusted

The boxes don't come from the language model. The model returns the value and the word-token IDs it used; the engine resolves those tokens to regions the vision OCR actually detected. So a box is evidence the text exists on the page — not a guess drawn around where it should be. For the full reasoning, see Document OCR with an audit trail.

  1. Pull the result with boxes
    Call GET /view (boxes are included by default) or POST /ocr/fields — every value carries a bbox and match_ratio.
  2. Sort by match ratio
    Surface fields below 0.85 first; those are the values most worth a human glance.
  3. Confirm by location
    Click or hover a flagged value to see the exact region it was read from on the source image.
  4. Override and move on
    Correct any miss inline; the original OCR value is kept for the record.
How do bounding boxes help validate OCR?
A box shows the exact region a value was read from, so you verify by looking at one spot instead of re-reading the whole document. Combined with the match ratio, you can triage: check only the low-confidence fields and confirm each by its location.
What match ratio counts as reliable?
space-ocr treats a match_ratio of 0.85 or higher as a confident match; 1.0 means every character of the value was located on the page. Treat anything below 0.85 as a field to review.
Do I need to re-run OCR to validate?
No. Boxes and match ratios are part of the standard response, and querying a stored sheet with GET /view never re-runs OCR or costs a scan.

Validate your own scans

Free tier — 100 scans a month, no credit card.

Related