OCR is a pipeline, not a model
When people say OCR they usually mean the part that reads characters. In production that's one step of five. A label on a parcel arrives tilted, partly in shadow, sometimes smudged. Before the reader sees it, the image is straightened and the text lines are found. After it reads, the text has to become structured fields, and those fields have to be checked.
Straighten, find, read
In the figure, the label arrives 7 degrees off and the first station turns it level. A detection step then boxes the three text lines, so the reader only looks where there's text. The reader goes character by character and gives each one a confidence. Most characters come back above 0.9; the tracking number reads 4817 2093 66 with its lowest character at 0.96.
Parse into fields
A string of characters isn't useful yet. Parsing turns it into a tracking number, a postcode, and a weight, each in its own bin, using what you know about the format: how long a tracking number is, which postcodes exist, that weight comes with a unit. This step quietly removes a lot of errors, because many misreads produce values that can't exist.
The check that catches misreads
Many identifiers carry their own check: a check digit computed from the other digits. Press misread in the figure and a smudge turns the second digit into a 3 with a confidence of only 0.41. Every other digit is fine, the string looks plausible, and without a check it would go straight into the system. But the digits now give a check digit of 1, not the printed 6, so the gate rejects it and the label goes to a person.
That's the pattern I use everywhere: let the model read, let the format and the checks decide, and send anything that fails to a human queue instead of guessing.
What I build into OCR systems
- Good capture first: lighting and focus that make text sharp, which beats any model upgrade.
- Field-level validation: formats, check digits, lookups against known customers or postcodes.
- Confidence thresholds per field, with low-confidence reads sent to a review queue.
- A log of every correction a person makes, which becomes the next training set.
- Measuring accuracy per field, not per character: one wrong digit makes the whole field wrong.