Skip to content
Lot-code OCR that only fails on one shift is usually print and lighting—not a ‘model that forgot’
All analysis

Sector · AI · 11 Sept 2026 · 2 min

Lot-code OCR that only fails on one shift is usually print and lighting—not a ‘model that forgot’

Vision systems reading inkjet or thermal codes reject cartons when contrast, placement, or lamp aging moves. Retraining the OCR network without fixing the code quality teaches the model to tolerate a temporary mess.

Traceability rules push plants to verify lot and date codes automatically. A camera and OCR (or similar) model sits after the coder and decides pass or reject. When false rejects climb on night shift, the first ticket is often “retrain the model.” Sometimes the weights really drifted. More often the inkjet contrast dropped, the code walked out of the ROI, or a lamp that was bright at noon is dim at 02:00.

Label-audit disagreements and lighting-drift essays cover related vision problems. This note is narrower: machine-readable lot/date codes on packaging and the habit of blaming the classifier first.

Separate print quality from recognition

Inkjet lot and expiry code on a carton under inspection light

Before opening a training set:

  • Measure code contrast and edge sharpness on failing cartons versus a retained “good” sample.
  • Confirm coder ribbon/ink, head cleanliness, and throw distance—especially after a weekend jam clear.
  • Check that the code still sits inside the taught region of interest at line speed; guide rail nudges move print location.
  • Log illuminance at the inspection plane. Auto-exposure that “looks fine” on the HMI can hide lamp aging.

If the human eye struggles to read the code under the same light, OCR is not the primary patient.

When the model really needs work

New fonts, new substrates (dark corrugate, glossy film), or a code format change (expanded GS1 fields) are legitimate model/recipe updates. Those should be versioned with golden samples—not patched by absorbing bad prints into the “accept” class.

Illustrative scenario (not a claim about a named site)

A line adds a second carton supplier with a darker brown board. Day-shift codes still pass. Night-shift rejects rise because the same ink sits closer to the background. A quick retrain on night rejects “fixes” the rate by accepting lighter bars. Two weeks later a retailer chargeback cites unreadable codes under their scanner lighting. The model did what it was asked. The print-and-substrate MoC never happened.

I would rather keep a small, frozen verification set and a print-quality gate than celebrate a lower reject rate that came from teaching the network to ignore weak ink. Where you cannot get stable print, say so on the line board—and fix the coder before the next training job.

Share

LinkedIn

More in this sector

AI