Houjun Lab
Houjun Lab / Reading receipts and images
Research project · vision-language models · document reading

A model that reads Japanese receipts,
and the checks that catch it when it is wrong.

Finance, insurance and accounting teams handle receipts, invoices and forms full of personal and commercial detail. We tested whether an 8-billion-parameter vision-language model, running on one Mac with nothing uploaded, can read them, and what has to surround it before its output can be trusted with money.

Results Code on GitHub CompletedFinal results below · August–September 2026.

The answer, in three numbers

16 / 17strict business fields read correctly on a real Japanese restaurant receipt, locally
~11 sper receipt, end to end, on one Mac Studio
3 × sameidentical runs of a combined method, with the same three fields wrong each time: agreement proves nothing

What this means for real work

The model is a strong first reader, not the last word. The value is in the process around it.

Private pre-processing

Receipts and forms are read on your own machine, so personal and commercial data never leave it. That alone removes the hardest compliance question.

Facts from the model, arithmetic from code

The model reports what it sees: text, numbers and positions. Ordinary software then checks that items add up to the subtotal, that tax and total agree, and that dates and required fields are valid.

People only see the conflicts

Keep the original image, the raw reading, the model output and the checks together. A person reviews only the items where they disagree, with everything needed to decide.

Honest "unknown"

Blurred or hidden values are allowed to come back as UNKNOWN. Forcing a model to fill every field is how confident errors enter the books.

How it works

Fourteen phases, from a single pixel to a real receipt, each with its pass rule written first.

  1. Basics and boundaries

    Small and low-contrast text, rotation, Unicode, image order, and broken or unusual files, including exit codes.

  2. A real Japanese receipt

    Every business field compared strictly with a hand-checked answer key, then the same receipt through four different methods.

  3. Images that need reasoning

    Charts, dashboards, flowcharts, people in photos, occlusion, and a hidden instruction inside an image.

  4. Load and robustness

    Differently worded prompts in Chinese and English, and one, two and four requests at the same time.

Results

In one paragraph

On a real Japanese restaurant receipt, the local model got 16 of 17 strict business fields right in about 11 seconds. Every other method had a different weakness: the fast built-in OCR misread the year with high confidence; a combined method caught that error but repeated three other mistakes identically in every run; and a cloud model filled every field but did not mention the conflict it was handed. The reliable design is not one model, but a model plus ordinary checks plus a person who only sees the conflicts.

How to read the numbers

Fields are scored strictly against a hand-checked answer key: a total, a date, a tax line or a menu item is either exactly right or wrong. The first test scored 17 business fields; the structured tests used a fuller schema of 27. One receipt is a case study, not a statistic.

1. One receipt, four methods

The four methods
MethodRuns whereScoreTimeWhat went wrong
Local vision-language model (Qwen3-VL-8B, 4-bit)This Mac16 / 17 business fields~11.2 sOne field
Apple Vision OCRThis MacText only~0.72 sRead the year as 2086 with high confidence; found no table
Apple Vision OCR + local model, strict schemaThis Mac24 / 27, identical in 3 runs19.6 s first, ~7.9 s afterFixed and flagged the year; missed the brand name, a staff number and the TP marker every time
Cloud model (Gemini 3.6 Flash), same materialCloud, for comparison27 / 27 after Unicode normalisation~5.5 sDid not mention the conflicting year

The most useful findings were not scores. Apple Vision read the year as 2086 and reported high confidence. Given the image and that text together, the local model restored 2026 and wrote the conflict into its warnings. But across three runs it also missed the same three items every time: the shop's brand name, a staff number and the small TP column marker, all of which the OCR had found. Rewording the prompt moved the errors to other fields instead of removing them. Consistency is not correctness. The cloud model, tested on the same material for comparison only, filled every field correctly but did not mention the conflicting year at all. Our ordinary checking program flagged it either way, which is why that program is not optional.

2. Pictures, charts and photos

Dashboards, flowcharts, counting people and judging which way a person faces went well. Two failures were instructive:

  • It read the numbers, then drew the wrong conclusion. On a bar chart it correctly read Q2 = 18 and Q3 = 15, then answered "no" to "did it fall?".
  • It described a contradiction. For one photo it reported a person both clapping and pointing to the right. Asking first for atomic facts (where the arms are, whether the hands touch) fixed it.

The rule that followed: ask the model for facts it can see, such as text, numbers, positions and contact, and let an ordinary program compute trends, totals and consistency. A text instruction hidden inside an image was recognised and ignored, but one case is not evidence of general safety.

3. Speed, and what four users at once costs

A typical single-image structured request took 4.4–4.9 seconds. Four requests at once all came back correct, with no answers crossing between requests and no crash, but the machine does not get faster by sharing: total throughput rose only 8%, and each person waited almost four times as long.

Average wait per request, by requests at once

Average wait per request, by requests at onceBars. One request at a time: 4.55 seconds each. Two at once: 8.72 seconds. Four at once: 16.79 seconds. Throughput rose only from 0.220 to 0.238 requests per second. 0 5 10 15 1 at a time 4.55 s 2 at once 8.72 s 4 at once 16.79 s seconds each person waits · throughput: 0.220 → 0.238 per second
The numbers
Requests at onceAll correctAverage waitThroughputPeak memory
11 / 14.55 s0.220 / s8.17 GiB
22 / 28.72 s0.229 / s8.35 GiB
44 / 416.79 s0.238 / s8.40 GiB

4. A small bug worth reporting

When given a missing or broken image, the standard llama-cli program printed an error but still reported success (exit code 0), so an automated pipeline would carry on as if nothing were wrong. The multimodal tool reported failure correctly. We reduced it to a minimal reproduction and filed it with the llama.cpp project. Inputs such as 1×1 pixel images, transparent PNGs, EXIF rotation, 16-bit, CMYK, wrong file extensions and corrupt files were all tested.

Limits

What these results do not show.

  • One real receipt was scored field by field. It shows the kinds of errors to expect, not an error rate.
  • A JSON schema guarantees the shape of the answer, not its meaning; temperature 0 guarantees the same answer, not a correct one.
  • The receipt image is not published: it is a real document. Only the measurements are.
  • One Mac handles one user well. Parallel requests did not add speed; a busier workload needs more machines or a queue.
  • The cloud model appears for comparison only. Higher accuracy came with sending the document out, which is exactly what private AI avoids.
  • The model weights were deleted after the study; rerunning it downloads them again at the pinned revision.

Code and licence

The study's scripts, test material, raw measurements and phase reports are open source under the Apache License 2.0, as part of the AI-Lab repository. Model weights are not included; each keeps its publisher's licence and is downloaded separately at a pinned revision with a checked SHA-256. See the licence page.