WhatDidYouDoWithAILoading
Back to the forum
A desk with scanned invoices and a simple validation table

Invoice line-item sanity check with local OCR

A small checker for invoice line items that catches obvious OCR drift before export.

I had about 1,200 invoice photos from four vendors, all scanned badly and half cropped at the edges. The goal was not full automation; I just wanted a cheap sanity check before anyone exported numbers into the accounting sheet.

I used Whisper for the handwritten notes on a few receipts, then switched to a local OCR pass for the line items. The first version looked fine until it started merging two rows into one whenever the paper had a fold near the subtotal.

The annoying part was that the same vendor had three layouts. One uses a big VAT line, another buries it in a footer, and one prints totals in a tiny gray font. I ended up building layout-specific rules instead of pretending one model could handle everything.

There was also a dumb bug where negative adjustments were read as positive because the minus sign got lost in compression. I only noticed it after comparing 17 test invoices by hand and seeing one month off by 6.40.

What still doesn't work: duplicate invoices with different filenames. Matching by amount and date helps, but the coffee-stain cases still need a human to click through. For now that's acceptable, just not elegant.

5 replies

Rohit Mehta#1 · 2026-08-24

Layout-specific rules are painful but usually beat a one-size-fits-all OCR pipeline.

Nora Miller#2 · 2026-08-25

The minus-sign bug is exactly the kind of thing that slips through until month-end.

Lily Tan#3 · 2026-08-25

Did you keep the OCR confidence score in the export? That helped us a lot.

Emma Liu#4 · 2026-08-25

Yes, but only after the second pass. First pass was too noisy to be useful.

Marc Stone#5 · 2026-08-25

At 1,200 photos, I’d still rather hire one person than trust the merge logic completely.