Home / Blog / Handwritten invoices and bills: the training data gap in document AI
Handwritten invoices and bills: the training data gap in document AI
Most public document AI datasets are printed receipts and forms, so models see few handwritten bills, phone photos taken at an angle, or crossed-out lines. Training on real handwritten documents, labelled at the line-item level with decisions recorded for corrections and ambiguous entries, closes much of that gap.
A lot of commerce still runs on paper: hand-written bills from wholesalers, carbon-copy receipt books, delivery notes with a total scribbled at the bottom. Small businesses photograph them on a phone and send them on. These are exactly the documents bookkeeping and expense tools need to read, and the ones models find hardest.
Why models struggle with them
- Public datasets lean printed. Widely used research sets such as SROIE, CORD and FUNSD are mostly printed receipts or scanned forms. Handwritten commercial documents are scarce in public data.
- Phone photos, not scans. Perspective skew, shadows, folds and blur all change what a model sees.
- Corrections. A crossed-out line might mean an item was returned, never sold, or re-priced. The model needs to learn what the human meant.
- Local formats. Abbreviations, units and number formats vary by trade and region.
- Totals that don't add up. Real bills contain arithmetic errors. Labels must say whether to extract what is written or what is correct.
The labels that matter
For extraction tasks, labels at the line-item level are far more useful than a single total:
Two choices make labels much more useful: record struck-out lines rather than silently dropping them, and keep both the written total and any corrected total if they differ.
De-identification for business documents
Business documents contain personal and commercial identifiers: names of sole traders, phone numbers, tax registration numbers, bank details and signatures. These should be redacted in both the image and the text labels, and redaction should be checked on a sample by a person, because a missed number in a corner of a photo is easy to overlook.
Building the dataset
- Agree with the businesses that hold the documents, in writing, that they can be used for AI training.
- Photograph or scan them the way real users would, so the images match production conditions.
- Transcribe and label line items, then check against the original.
- Redact identifiers in image and text.
- Document coverage in a dataset card: trades, handwriting styles, image conditions and known gaps.
See the format
Datadhara licenses real invoices and bills from the businesses that issue them, labelled at the line-item level. See the document data page or download the free synthetic invoice sample.
Questions
Why is handwritten invoice extraction hard for AI?
Public training data is mostly printed documents, and real handwritten bills add phone-photo distortion, corrections, local abbreviations and arithmetic errors that models rarely see.
What labels should an invoice dataset have?
Line-item fields (description, quantity, unit price, amount), header fields such as date and invoice number, totals as written, and explicit flags for struck-out or corrected lines.
How do you de-identify invoices?
Redact names, phone numbers, tax and bank details and signatures in both the image and the text labels, then check redaction on a sample by hand.
Tell us what your models are missing
A few lines is enough: the domain, the format, and roughly how much.
Request data →