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

// MANUFACTURING

Date Code OCR Verification

Date Code OCR Verification. What it takes to run it.

The date code boxed on a bottle's curved neck, read by LexInsight and checked against the plant's own format and the shift order.

Start with your footageBook a demo →All of manufacturing →

// 01 · The question

“Which bottle left the packing station carrying a date code that does not match today's order?”

// 02 · Why it is hard

A reading on its own is never the verdict. A laser etch under the wrong angle, or a reflection crossing the middle of the code, produces a plausible wrong character, a three read as an eight, rather than an obvious failure, and the two mistakes a plant makes from that are not equal: a correct bottle held for a second look costs an operator a glance, a coder that reset overnight and etched last year's date onto a full shift costs a recall.

// 03 · What the labels have to be

Bounding box

Decided before the first frame

The neck is curved and the code lands at a different height and rotation on every bottle depending on how it sat in the star wheel under the laser, so the first job is a box on the code wherever it is, not a crop at fixed coordinates that only catches the well-behaved bottles. Everything downstream, the reading and the format check, works on the crop inside that box, which is why the geometry this question needs is the same simple box a dozen other packing-line questions use, not a mask or a point.

This is the decision that is expensive to reverse. The geometry has to match what the answer contains, and finding out it does not means labelling the set a second time.

// 03a · What it finds

The date code's own box

on the bottle's neck, wherever it landed depending on how the bottle turned in the star wheel under the laser

The characters inside that box

read as a string by LexInsight off the same crop the box drew, not assumed from a fixed position

A reading the plant's format rejects

the day's own coder fault, a string that does not fit six digits as day, month and year or whatever the plant's own format is

A bottle the model doubts

glare across the code, or a neck turned further than the model has seen, held for the operator before it is scored either way

// 03b · What it checks

  1. 01

    The reading against the plant's own date format before a string becomes a date, since this is where most of the wrong readings are caught.

  2. 02

    The format-checked date against the shift's own production order; a match closes the case, a mismatch or a format-rejected string holds it.

  3. 03

    The hold rule's own severity and cooldown, approved before it goes live, so a critical mismatch on the active line reaches the line controller rather than sitting in a dashboard nobody is watching.

  4. 04

    The format rule itself against a new coder or a new market's date order, since a changeover makes every bottle wrong the same way rather than some of them.

// 03c · What the line provides

  • The camera already over the packing station, seeing the neck at line speed; no new camera, no new hardware.
  • Frames from this line's own coder and bottle material, since a frosted laser etch on clear PET reads differently from the same code on amber glass.
  • The plant's own date format and the shift's production order, in the operator's hands, not assumed from a template.
  • Someone to confirm or correct the bottles the model holds, the same operator who used to pull one bottle from every case.

// 04 · How we run it

Three parts of one loop, on this job.

LexAnnotate

Defect Annotation

Pixel-level defect annotation for surface scratches, cracks, dents, weld faults, and assembly misalignments. Multi-sensor alignment for multi-camera inspection systems.

LexInsight

Line Performance

Ask which shift or which line is producing the most of one defect class, and get an answer with the frames behind it, graded against the plant's own written standard.

LexAlert

Quality Alerts

Monitor defect detection accuracy across changing production conditions. Detect when lighting shifts, new materials, or equipment aging degrades model performance. Auto-retrain to maintain 99%+ accuracy.

How the loop fits together →

// 05 · What breaks it after launch

Concept drift

The spec changed

→Concept drift →

A new laser etches a slightly different font in a slightly different place, or a customer market asks for the date written month first instead of day first. On the day of the change every bottle is correct and the detector, the reader and the format rule are each looking for something that is no longer there, which is why the first sign of this drift is the review queue filling with bottles the operator keeps overriding rather than any drop in a count.

It is not the only one that can get this use case, it is the one that usually gets it first. All ten conditions.

// 06 · In manufacturing

Defect Detection at Scale

Full write-up ↓Every case study →

The Challenge

Vision models performed well in pilots but lost accuracy as factory conditions shifted.

Our Execution

Built pixel-level annotated datasets and multi-sensor alignment for reliable defect detection.

The Result

Maintained 99%+ defect detection accuracy across changing production environments. Reduced unplanned downtime.

99%+

Accuracy maintained in production

// 06a · Questions we get asked

Does this just find the date code, or does it read what the code says?

It reads it. LexInsight is asked what the code on this bottle says and answers with the characters and the frame behind them, then checks that reading against the plant's own format before anything is scored. That is the difference from a page that only finds where a field landed for a person to read.

What happens when glare or a turned bottle makes the code hard to read?

The frame is held for the operator rather than guessed. A bevel or a reflection under the wrong angle can produce a plausible wrong character, and those are exactly the frames that come back for a person to confirm or correct before they train the next version.

Can it tell a coder fault from a camera misread?

The format check is what separates them. A reading that does not fit the plant's own date format, or that parses to a date the coder could not have meant, is caught by the format rule before it is ever blamed on the model, which is why the format rule catches more wrong readings than any change to the reader.

What happens when the plant changes coders or a market asks for a different date order?

Every bottle is correct and the model is looking for something that no longer exists, so the fix comes ahead of the changeover: frames from the new coder, a window of them labeled, the format rule rewritten for the new order. The old coder's frames stay in the version for any line that still runs one.

Read next

Expiration date detection on a curved bottle neck, the full walk-through →The same packing line, finding where the date, lot and part fields are rather than reading what they say →The nutrition panel, allergen statement and net weight, boxed as regions on the same kind of label →What a new coder or a new date order does to a format rule tuned on the old one →
Start with your footageBook a demo →

// 07 · Also in manufacturing

Surface Defect Detection→Weld Quality Inspection→Assembly Verification & Error Proofing→Package & Label Inspection→Package Damage Detection→FDA Food Label Compliance→Juice Box Quality Inspection→Diabetes Device Inspection→Date & Lot Code Inspection→Predictive Maintenance→Multi-Sensor Monitoring→Tablet Defect Inspection→Syringe Barrel Defect Detection→Foreign Material Detection→Glass Defect Detection→Semiconductor Wafer Inspection→Strip Surface Defect Inspection→Ceramic Defect Detection→Wood Defect Detection→Pipe & Tube Defect Inspection→Body-in-White Inspection→Contact Lens Defect Inspection→Coffee Bean Defect Inspection→Parts Count Verification→Product Color Inspection→Chocolate Box Inspection→Blister Pack Inspection→Process Compliance Tracking→Pallet Scanning→PCB Defect Detection→IV Bag Fill Level & Leak Detection→Bottle Cap Inspection→Paint Defect Detection→Fall Detection→Orthopedic Implant Inspection→All forty-one→
Surface Defect DetectionWeld Quality InspectionAssembly Verification & Error ProofingPackage & Label InspectionPackage Damage DetectionFDA Food Label ComplianceJuice Box Quality InspectionDiabetes Device InspectionDate & Lot Code InspectionPredictive MaintenanceMulti-Sensor MonitoringTablet Defect InspectionSyringe Barrel Defect DetectionForeign Material DetectionGlass Defect DetectionSemiconductor Wafer InspectionStrip Surface Defect InspectionCeramic Defect DetectionWood Defect DetectionPipe & Tube Defect InspectionBody-in-White InspectionContact Lens Defect InspectionCoffee Bean Defect InspectionParts Count VerificationProduct Color InspectionChocolate Box InspectionBlister Pack InspectionProcess Compliance TrackingPallet ScanningPCB Defect DetectionIV Bag Fill Level & Leak DetectionBottle Cap InspectionPaint Defect DetectionFall DetectionOrthopedic Implant InspectionAll forty-one →

Send us a week of this footage. We’ll show you what comes back.

Start with your footageBook a demo →
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