Computer vision on the factory floor: six lessons
Lighting changes, cameras drift, and the operators will move the mount. What we learned deploying defect detection into a plant that runs three shifts a day.
A vision model that scores 0.97 on a curated test set can be useless in a plant. The gap is almost never the architecture — it is everything around the camera.
Lighting is the model
The single biggest accuracy lever we found was a fifty-dollar diffuser. Controlled, consistent lighting removes more failure cases than another ten thousand training images.
Collect from the line, not the lab
Training data gathered in ideal conditions teaches the model an environment it will never see again. Capture from the installed camera, across shifts, across seasons, including the days someone left the bay door open.
Plan for the mount getting moved
It will get moved. Add a fixed fiducial in frame and alert when it shifts — silent recalibration beats discovering a week of bad inferences after the fact.
Latency budget is a hard constraint
If the line moves a part every 800ms, inference plus decision plus actuation has to fit inside that with margin. This decides your model size before accuracy does.
Operators need a reason, not a verdict
A red box on a screen gets ignored by shift three. Show the crop, the confidence, and the nearest known-good example. Give them a one-tap disagree button, and use those disagreements as your labelling queue.
Measure the cost of each error separately
A false reject costs a part. A false accept costs a customer. Tune the threshold against those numbers, not against F1.