Skip to content
LexDataLexData
PlatformIndustriesCustomers
DocsThe Field GuideBlogWhy models drift
AboutCareersSecurityContact
Log inStart now
← All posts

Industries · 7 min read

OCR in manufacturing for the date codes and serials the printer did not make easy

Dot-matrix dates on cardboard, label text and etched serials on steel, each found by a detector, checked against the schedule, sent to a person when smudged.

Summary

This post takes the three kinds of print on one packing line, a dot-matrix date on the carton, a label text block and a serial etched into the housing inside, and explains why each is found by a detector before anything reads it. It covers validating the reading against the production schedule, routing smudged prints to a person, reading a worn print head off the review queue, and relabeling when the label is redesigned. It is for packaging and quality engineers.

Rajiya Sultana · Engineering Manager · Sep 26, 2026

Cartons with labels moving past a scanner on a packaging line, generated scene with detections from our model

Line 3 packs a housing into a carton, and by the time the carton is closed there are three pieces of print on it that somebody downstream will need to read. The date and lot are sprayed onto the corrugated flap by a dot-matrix inkjet coder as the carton passes. The label on the side is a printed block of text with the part number and a barcode. Inside, on the housing itself, is a serial etched into the steel by a laser at the previous station. Each one is read by a different person at a different time, and each one goes wrong in its own way.

The inkjet coder is cleaned with a cotton bud at the start of the day shift, and the night shift does not clean it. By 4 am the dots are spreading and the date on the flap is a smear that a person can still read and a reader cannot.

A detector finds each field before any character is read

The reading is the second job. The first is finding the field: the date on the flap wanders as the coder fires early or late, the label sits at a slightly different angle on every carton, and the etched serial is wherever the housing was placed in the fixture. A crop at fixed coordinates catches the well-behaved ones. A detector with three classes, date print, label block and etched serial, puts a box on each field wherever it landed, and the reader works on the crop inside the box.

The package and label inspection use case has the same shape: every check is a region and a rule, and the boxes localise the regions. On line 3 the detector is trained on frames from the packing camera at line speed. You type the three classes, Lexi proposes the boxes, and a person checks them on cartons that were moving when the frame was taken.

Dot-matrix, label text and etched steel are three different reading problems

A dot-matrix date is made of separate dots that a reader trained on continuous fonts has never seen, and the dots spread on corrugated board in a way they do not on a coated carton. The label block is the easy one, printed text on a white label, until the label is printed on a thermal printer whose head has a dead element and every character has a white line through it. The etched serial is bright metal on bright metal, legible only when the lamp is at the right angle, and glare on the housing produces a plausible wrong character rather than an obvious failure.

Three readers, or one reader with frames from all three fields in its set, and either way the frames come from line 3 rather than from a font file. The lesson on what vision can see is worth reading before the project starts: reading a smeared dot-matrix date is a task a person does with context the reader does not have, and the reader will need that context supplied by the next section.

The reading is validated against the schedule, and the schedule is the check

The date on the flap has to be today's or the shift's. The lot has to be the lot on the production schedule for line 3 this shift. The part number on the label has to match the housing the line is packing, and the etched serial has to fall inside the range the laser was issued for this order. Every one of those is a rule the plant already holds, and every one of them catches a misread that the reader would otherwise pass with a plausible wrong character.

On the manufacturing lines we run, the schedule check catches most of the reader's mistakes and all of the coder's. A reading that fails the check is a hold, and the hold carries the crop and what the schedule expected, so the person looking at it can see in a second whether the reader misread a smear or the coder printed yesterday's lot. That is how the 99%+ accuracy maintained in production that our manufacturing work reports holds on a coded line: the rule and the reader together, with the rule doing the part the reader cannot.

Smudged prints go to a person, with the crop and what was expected

The 4 am smear is the case the design has to plan for. The reader returns something, the schedule check fails or the reader's own doubt is high, and the carton is held. The frame goes to the line lead with the crop and the expected lot beside it. She reads the smear, confirms or corrects it, and her call is recorded against the frame. If the smear is a misread she has also just labeled the hardest frame of the shift.

The alternative, letting a plausible read through because most reads are right, is how a carton with yesterday's date reaches a customer with a shelf-life clause. A rule written as a sentence, with a severity and a cooldown, approved before it goes live, is what holds the carton: a date print on line 3 that fails the schedule check is critical and goes to a webhook the line controller reads. An unreadable print is routine and goes to the line lead's list.

A worn print head shows up as a slope in the review queue

This is the part the review queue does that a spot check never did. As the inkjet coder's nozzles clog through the night, each carton's date is a little more spread than the last, and the number of dates sent for review per hour rises steadily from midnight to 4 am. The slope is the coder asking to be cleaned, hours before it stops.

My own view is that the review queue's size per hour, by field, is the best maintenance signal a coded line has, and it costs nothing, because the queue exists anyway. A dead element on the label printer shows as the label block's reviews jumping on one shift. A laser lens fogging shows as the serial's reviews climbing over a week. Nobody has to watch the printers; the queue watches them.

A label redesign needs new frames from the line

The label is redesigned in the spring: a new layout, the part number moved from the top line to the bottom, a smaller font. Every label is correct on the changeover day and the detector's box for the label block lands in the wrong place, because the block it learned is not where the block now is. The drift catalog calls this a spec change, and its packaging form is a redesign on a marketing schedule nobody told the model about.

LexData takes the reading model through its whole life. You type what to look for, Lexi puts a box on every field on every frame, and a person checks each label before anything trains on it. The model then watches the packing camera on line 3, in the cloud, on your servers, or on a runner beside the recorder. Frames it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime.

The redesign is a window of frames from the first day's cartons, labeled and folded in before the run, and versions keep what they were trained on, so the old label still reads on the line that has a pallet of them left.

See it on your own footage.

Start with your footage

More in Industries

Industries · 6 min read

AI crop analysis in the greenhouse, catching tomato disease before it spreads down the row

Lesions boxed by disease with a healthy class, a question of the footage about how far a patch spread since last week, and a model that turns with the season.

Rob Hickey · Sep 26, 2026

Industries · 6 min read

Ceramic defect detection for hairline cracks a fixed-rule camera cannot learn

Edge chips, hairline cracks and pinholes on the tile line after the kiln, masks where the area sets the grade, and the new glaze as the day to relabel.

Esdras Ntuyenabo · Sep 26, 2026

Industries · 6 min read

Chocolate box inspection with a camera over the tray line

Each piece boxed by type, a plain check against the box template, damage as its own class, and the new spring assortment as the day the labels go stale.

Stephen Biswas · Sep 26, 2026

LexData
LexData

Product

  • Platform
  • Industries
  • Use cases

Resources

  • Docs
  • The Field Guide
  • Blog
  • Why models drift

Industries

  • Energy & utilities
  • Oil & gas
  • Agriculture
  • Manufacturing
  • Insurance
  • Retail
  • Robotics

Company

  • About
  • Customers
  • Careers
  • Contact

Trust

  • Security
  • Privacy
  • Terms

Stay updated

What we learn running vision models in production.

See everything.
Miss nothing.

Stay updated

What we learn running vision models in production.

Terms of use & Privacy policy

© 2026 LexData Labs · All rights reserved