AI & Machine Vision

Automated Visual Inspection: From Feasibility to Line Deployment

A promising demo is not an inspection station. This note follows the path from "can a camera see this defect?" to a system that runs on the line, that operators trust and that quality teams can sign off.

Inspection projects tend to fail on definitions, handling and ownership before they fail on algorithms. This guide is for manufacturing and quality leaders as much as engineers. For optics, sensors and algorithms in depth, read our companion note on machine vision engineering.

This describes a method, not a report on a named client. Numbers are worked examples.

Stage 1: define the defect and the money

  • Build a defect catalogue with photographs, severity and accept/reject boundary samples agreed by quality.
  • Record how often each class occurs and what an escape or a false reject costs.
  • Measure how consistently current inspectors agree. That is your real baseline.
  • State line speed, part presentation, variants, environment and available space.

Stage 2: feasibility on real parts

Image good, bad and borderline parts under several lighting geometries and resolutions. The output is a go, conditional go or no-go for each defect class. If an expert cannot see the defect in the images, change the imaging before touching the model.

Stage 3: write acceptance criteria

Agree the numbers before building, along with the sample sizes behind them. A useful guide for zero observed misses is the "rule of three":

0 misses in n independent defective samples
-> 95% upper bound on miss rate ~ 3 / n

n =  100  ->  about 3%
n = 1000  ->  about 0.3%

A clean result on thirty defects therefore says much less than it appears to. Repeating the same part does not create independent samples.

CriterionDefine
Miss rate per classLimit, sample set and who adjudicates truth
False reject rateLimit on representative good production
Cycle timeWorst case from trigger to result
RepeatabilityAgreement across repeated presentations and shifts
AvailabilityBehavior and recovery when a camera, light or computer fails

Stage 4: design the station

  • Handling: fixtures and presentation that limit pose variation.
  • Imaging: enclosed lighting, protected optics, cleaning access and a reference target.
  • Triggering: a sensor or encoder driving exposure and strobe in hardware.
  • Control: digital I/O or protocols such as OPC UA, Modbus TCP, PROFINET or EtherNet/IP; see industrial protocol integration.
  • Safety: reject mechanisms, guarding and light sources assessed by qualified people.

Never lose track of a part

The result must reach the correct part at the reject point. Tag each trigger with an ID, track it by encoder position and define a safe default:

on trigger:      id = next_id(); queue(id, encoder_now)
on result:       store(id, verdict)
at reject gate:  if verdict(id) != PASS:   # FAIL, unknown or late
                     divert(id)

Stage 5: validate

  • Blind test on lots the developers have not seen.
  • Challenge set of known good and bad parts, rerun after every change.
  • Attribute agreement study comparing system, inspectors and adjudicated truth.
  • Soak across shifts, temperature, vibration and dirty-optics conditions.
  • Fault injection: unplug a camera, dim a light, flood triggers.

Stage 6: go live in steps

PhaseSystem authorityExit when
ShadowLogs verdicts onlyDisagreements are reviewed and explained
AssistedFlags parts for human decisionCriteria are met on production data
Automatic with reviewRejects clear cases, routes uncertain onesStability holds over an agreed period

Stage 7: sustain it

  • Run challenge parts at shift start.
  • Trend reject rate, score distribution and image brightness and sharpness.
  • Version model, thresholds, camera settings and calibration together, with rollback.
  • Name owners for threshold changes, labeling and retraining; see fleet retraining.
  • Keep traceable records according to your quality system.

Estimating the return

Use your own figures: escape cost avoided, inspection labor redeployed and scrap caught earlier, set against equipment, integration, false-reject handling and ongoing support. Run a pessimistic case. A project that only pays back with a perfect model is not ready.

Common questions

How many defect samples do we need?

Enough to cover how each defect class actually varies, and enough to support the confidence you want in the miss rate. Rare classes may need deliberately collected or created samples.

Will it replace manual inspectors?

That depends on the task and the evidence. A common arrangement is automated screening with people reviewing uncertain parts.

Can it work with our existing PLC and MES?

Usually integration is possible through digital I/O or industrial protocols. We confirm the interfaces and timing on your equipment during feasibility.

What happens when we introduce a new product variant?

It goes through a defined changeover: sample collection, verification against acceptance criteria and a versioned release.

Let's build

Have a defect you need caught? Send us the problem.