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

Industries · 6 min read

Machine vision or computer vision on the line, and when each breaks

A threshold rule that died with the old fluorescent tubes, a template that broke on the new variant, and the model that is corrected rather than re-engineered.

Summary

This post sets a threshold rule and a template match beside a learned model on the same stamping line and follows each to the day it broke. It concludes that rule-based machine vision still belongs where the part is fixtured and the light is yours, and that a learned model belongs where the part or the defect varies, because it is corrected from the line's own frames rather than re-engineered. It is written for quality and controls engineers deciding what to put on the next station.

Rob Hickey · Chief AI Officer · Sep 24, 2026

Stamping line, panels passing an inspection station, generated scene with detections from our model

The presence check on the stamping line's inspection station ran for six years on a single rule. Count the dark pixels inside a rectangle where the locating hole should be, and reject the panel if the count falls under the number the integrator set in 2019. It never missed a hole. Then facilities replaced the fluorescent tubes over the line with LED panels on a Friday in June, the hole's shadow changed shape, and on Monday the station rejected every good panel until 9 am.

The electrician had left the old tubes in the bin beside the station. Nobody in quality had been told there was a lighting job, because nobody thought lighting was a quality matter.

A threshold rule works only while the world holds still

Machine vision, in the sense the integrators mean it, is a rule written by a person against a controlled scene. Fixed camera, fixed part position, ring light you own, a rectangle and a number. It is fast, it is cheap to run, and it is explainable to the letter: the panel failed because too few pixels inside the rectangle were dark, and the rule can print the count. When the part, the fixture and the light are all yours, that is the right tool and there is no reason to replace it with anything.

The rule has no idea what a hole is. It knows a count inside a rectangle, and every assumption behind that count, the light, the panel's position, the sheen of the steel, is an assumption nobody wrote down. The June lighting job broke one of them. A different coil supplier with a duller finish would have broken another.

A template match breaks on the first unseen variant

The second station on the same line checked a bracket with a template: a reference image of the good bracket and a similarity score against it. In March the bracket got a second variant with a slotted hole for the export model, and the template scored it as a defect on every panel because the slot was not in the reference. The controls engineer added a second template and a part-number lookup. In September there was a third variant.

Each variant is a re-engineering job. Someone captures a golden image under the station's light, tunes the score threshold, tests it on a shift's worth of parts, and updates the lookup. The work is not hard and it is never finished, because the product roadmap does not consult the inspection station.

Rules belong where the fixture and the light are yours

Presence of a hole in a fixtured panel under a ring light is a rule's job. So is reading a barcode at the end of the line, measuring a gap against a gauge block, or checking that a cap is on a bottle held upright in a starwheel. The scene is engineered, the answer is a number, and a rule gets it right for as long as the engineering holds, which on the stamping line's first station was six years to the Friday in June.

My view, which is not universal among people who build learned models, is that most lines should keep the threshold rule for the presence check and hand the learned model only the questions a rule cannot phrase.

Replacing a rule that works with a model that needs labels is a cost with no return until the day the rule breaks, and that day may not come.

A learned model belongs where part, light or defect varies

The station the line never managed to automate was the surface check. A scratch on a stamped panel has no fixed position, no fixed length and no fixed contrast; it can sit anywhere on the face, run in any direction, and look like a reflection from one angle and a gouge from another. No rectangle and no template describes it. An inspector describes it, by pointing.

A learned model is trained by that pointing. Somebody boxes scratches on a few hundred frames from the station's own camera, the model learns what scratches on this steel under this light look like, and it finds them in positions and orientations no rule anticipated. That is what the manufacturing work behind our numbers is built on, models that hold 99%+ accuracy in production because the training frames came from the line they run on.

What the model gives up is the rule's letter-perfect explanation. It gives back a box and a score, and a person can look at the box.

The learned model is corrected rather than re-engineered

The difference that matters on the floor is what happens when each one is wrong. The template needs an engineer at a terminal with a golden image. The learned model needs an inspector to draw a box on the frame the model got wrong, and that box is the fix.

LexData takes the surface model through its whole life. You type what to look for, Lexi puts a box on every frame, and a person checks each label before anything trains on it. The model then watches the station camera, 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. A new coil finish in October is a week of doubted frames coming back for review, and the version that follows has seen the finish.

The LED job in June would have reached the surface model the same way. Frames from Monday morning come back with a lower score, the inspector confirms the good panels, and the next version has learned the new light. The threshold rule got no such chance, because there is no frame to correct, only a number to re-set.

A tightened tolerance breaks both, and one can be told

There is one change neither tool sees. In August quality tightens the scratch limit from anything visible under the station light to anything longer than a fingernail, because the customer's paint shop has complained. The frames are identical. The rule, if there were one, would carry on. The learned model carries on too, confidently passing panels that were fine last month and are reportable this month.

The drift catalog calls this a spec change, and its first signal is the inspector overriding the model in one direction, week after week, on panels the model passed. That override rate is the number worth logging even when accuracy looks fine. The remedy is a re-label against the new limit and a retrain, and the reason a learned model can be told is that the telling is done in boxes, by the inspector who already knows what the new limit means. The rule would have needed the integrator back, with the tubes.

See it on your own footage.

Start with your footage

More in Industries

Industries · 6 min read

AI visual inspection as the nondestructive testing step a camera can take over

Visual testing is the first NDT gate, its acceptance criteria are already written, and a camera can apply them to every weld instead of one in twenty.

Rob Hickey · Sep 24, 2026

Industries · 6 min read

Appearance inspection systems that judge scratches, chips and burrs the same way on every shift

The station, the light and the written standard matter more than the model. The outlines carry the limit, and a tightened tolerance makes every label wrong.

Rajiya Sultana · Sep 24, 2026

Industries · 7 min read

Automated pallet accounting from the camera over the staging zone

A polygon on the frame, every pallet tracked so it is counted once, entries and exits as the ledger, and a wash-down that nudges the camera as the failure.

Andreas Ohrvall · Sep 24, 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