feat(ocr): real-receipt fixture corpus and image preprocessing #76
No reviewers
Labels
No labels
area:backend
area:frontend
area:infra
area:ocr
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
phase:M1
phase:M2
phase:M3
phase:M4
phase:M5
phase:M6
phase:M7
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
TJC/bill-splitter!76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ocr-real-receipt-corpus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ReceiptParserfixture corpus from 7 synthetic seeds to 33fixtures, adding 26 real receipts transcribed from public receipt images
(UK/US/EU: pubs, diners, Lightspeed/Eats365/Kobas tills) with hand-authored
expected.json; the whole corpus is green(VAT breakdowns, "divide by N" hints, payment lines)
4.00 B), per-unit price columns(
2 Bread 2.00 4.00),@ 6.50unit prices,2 @ $35.50detail linesrollups (
8 DRINK,3 FOOD),Total Taxes/AMOUNT/AMT/Balancetotals, Spanish
IVA, VAT-rate breakdown rowsHaveCount(7)corpus assertion with a named-seeds checkautocontrast, upscale, angle classifier; opt-in Otsu binarize) — pure Pillow
so it unit-tests without the numpy/paddle wheels
tools/record_fixture.py, a dev-only helper that POSTs an image at thesidecar and writes
ocr.jsoninto the corpusTest plan
dotnet test BillSplitter.Tests- 85/85 green (33 corpus fixtures + seeds)ruff checkclean on the OCR changes;py_compilecleaninterpreter is missing stdlib so pytest can't run locally, matching the
repo's OCR-is-CI-only setup
Notes
/ocrresponse shape isunchanged, so no
docs/04changeocr.jsonis transcribed from the images (no paddle sidecar in the devcontainer); re-record with
tools/record_fixture.pywhen one is availableDing Dong pizza modifier) parse imperfectly by design - the corpus captures
these as the documented limits of a line-based parser
ReceiptParsertoward a pluggabledetector/rule + scoring + validation architecture (design docs pending)
Closes #75