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

Operations · 6 min read

Industrial machine vision lighting and optical filters decide what the camera sees before any model does

The scratch an inspector finds by tilting the part under a window is invisible under the wrong lamp. Light it once, and treat a lamp change as a new camera.

Summary

This post walks through the lighting choices for an inspection station, from a backlight that turns presence into a silhouette to dark field for scratches, a dome for shiny parts, and polarising and bandpass filters for glare and ambient light. It concludes that a lighting change is a sensor replacement as far as the model is concerned and has to be handled as one. It is for the engineers commissioning cameras on a manufacturing line.

Stephen Biswas · Engineer · Oct 1, 2026

Bottles queued under a fill head with one cap missing, generated scene with detections from our model

The inspector at the end of line 3 finds the scratch on the machined face by holding the part under the north window and tilting it until the light catches. The scratch is there on every part she rejects, and on the camera's frame of the same part, taken under the ring light somebody clipped to the station at commissioning, there is nothing. The model trained on those frames learned that the parts are fine, and they are not.

A camera sees what the light gives it. The model gets what is left.

A backlight turns presence into a silhouette

The simplest question a station asks is whether something is there. A cap on the bottle, a liquid at the fill line, a hole punched where the drawing says. For that, the light goes behind the part, and the camera sees a black shape on a white field. The cap is a silhouette, the fill level is an edge, the hole is a bright disc, and none of it depends on the colour or finish of the part.

On bottling line 1 the backlight behind the queue under the fill head is what makes a missing cap obvious from any distance: the profile is wrong. Labeling on those frames is fast because the reviewer sees the same silhouette the model does, and a person checks every label before the model trains. Nothing about the bottle's label, its glass colour or the glare from the fill head enters into it.

Dark field makes a scratch bright on a dark face

The scratch on the line 3 part is the opposite problem. The face is flat and reflective, and under a light from above it reflects the light straight back, evenly, and the scratch reflects it evenly too. Under a light that comes in low, almost along the surface, the flat face sends the light away from the lens and appears dark. The scratch, being a groove with edges, catches the low light and throws some of it up, and appears as a bright line.

That is what the inspector was doing by tilting the part under the window. Dark field lighting does it on every part, in the same way, at every hour, and the frames from it show the defect the surface defect detection model is meant to learn, at the size and contrast it will meet in production.

A dome takes the glare off a shiny part

A chrome cap or a polished casting under any single lamp shows the lamp: a hard bright spot that sits wherever the geometry puts it, moves when the part moves, and looks to a model like a feature. A dome light surrounds the part with light from every direction at once, and the reflections cancel into an even sheen with no hot spot.

On polished parts the dome is usually the difference between a model that can be trained and one that cannot.

A hot spot lands in a different place on every casting from cell 2, and the model either learns to ignore it, which takes many frames, or learns it as a defect, which takes one unlucky training set.

Filters remove what is not the part

Two things arrive at the lens besides the light the station chose. Glare from any glass or gloss, which a polarising filter on the lens cuts when the light is polarised the other way. And ambient light, from the roof lamps and from the loading door that is open on summer afternoons, which changes the frame through the day without anyone touching the station.

A bandpass filter matched to the station's own lamp passes that lamp's colour and blocks the rest, so the frame at 3 pm with the door open is the same frame as at 3 am. The station stops noticing the weather. The model, which was going to have to learn every hour of the day otherwise, learns one.

The inspector's window faces north because the person who set up the bench forty years ago knew that north light does not move through the day. The bandpass filter is the same idea with a part number.

A lighting change is a camera replacement to the model

Everything the model learned about the scratch, it learned under the dark field rig. Then the lamp fails in the spring, and the maintenance crew fits a ring light because it was on the shelf, and the frames on the monitor look brighter and cleaner, and the scratches disappear again.

The drift catalog files this under a camera was replaced, and the pattern is the same as a sensor swap: one station changes character on the day it was serviced, as a step rather than a slope, while the stations either side hold. The model's boxes still land on parts. The corrections in the review queue for line 3 climb from that date, because the frames the model doubts are now frames where the scratch it was trained on is not visible.

My own view is that the lighting rig should be commissioned before a single frame is labeled, and any frame labeled under a temporary lamp should be thrown away rather than kept for volume. Frames under the wrong light teach the model the wrong thing, and they are very hard to find again once they are in the set.

LexData takes the line 3 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. After the lamp swap, the correction rate on that one camera is the signal, and the fix is a short window of frames under whatever the light now is, or the right lamp put back, which is cheaper.

The inspector keeps the north window. Once a shift a rejected part goes under it, and the frame from the station is put beside what she saw.

See it on your own footage.

Start with your footage

More in Operations

Operations · 7 min read

AGPL-3.0 licensing risk for computer vision teams serving a model

A camera streaming to a served detector is the network interaction the licence was written for. What a legal review will ask, and why to pick the weights first.

Ayman Quadir · Oct 1, 2026

Operations · 7 min read

Cloud vs owned GPU inference for computer vision, worked out per camera hour

A plant on three shifts and a retailer with cameras spread across stores get different answers from one sum, and footage leaving the building is a cost too.

Ayman Quadir · Oct 1, 2026

Operations · 7 min read

Computer vision heatmaps drawn from the aisle cameras a store already has

Footpoints from every tracked box, aggregated over a day and mapped onto the floor plan, show where footfall goes. A camera nudged in cleaning shifts the map.

Rajiya Sultana · Oct 1, 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