← Engineering notebook
Foundations

The inspection pyramid

A defect travels through a long chain before it becomes a decision. The later you catch a problem, the more it costs.

Hover a layer A defect travels down this chain before it becomes a decision. Each step can hide or destroy information - and the further down you discover a problem, the more it costs to fix.
The cost of discovering a problem grows as you move down the chain.

Most people picture inspection as a short, clean path:

Defect -> Camera -> Detection

Reality is a much longer chain, and every link can hide or destroy information. The diagram above is interactive: hover or tap any layer to see what goes wrong there and why it gets more expensive the further down you discover it.

Why the chain matters

A defect has to survive physics, lighting, optics, motion, the camera, the software, the operator, and finally a business decision before anyone acts on it. If the information is lost early (bad lighting, wrong optic) no amount of clever software downstream can recover it.

The key insight: information only flows one way. A scratch that produces zero contrast in the image does not exist as far as the algorithm is concerned. Software can amplify, filter, and classify - it cannot create information that the optical chain never captured.

The expensive direction

The further down the chain you discover a problem, the more it costs to fix:

  • Catch it at lighting: change a light, cost is minutes.
  • Catch it at optics: swap a lens, cost is hours and some budget.
  • Catch it at software: re-tune algorithms, cost is days.
  • Catch it at the operator: retraining and procedures, cost is weeks of inconsistency.
  • Catch it at production: false calls and escapes, cost is reputation and money.

A real walk down the pyramid

A system in the field started missing a defect type it used to catch. The team's first instinct was to retune the algorithm - the bottom of the pyramid. Walking it top-down instead:

  1. Physics: had the defect changed? Yes, slightly - a supplier change made the defect shallower.
  2. Lighting: the shallow version produced almost no shadow under the existing ring light.
  3. Image check: zooming into raw images confirmed it - the defect was simply not visible. Contrast was about 2 gray levels against a noise floor of 4.

No algorithm tuning could have fixed that. A low-angle light brought contrast back to 40+ gray levels and the original algorithm worked again, untouched.

How I use it

When a system underperforms, I walk the pyramid top-down and ask: is the information even present in the image? Most of the time the answer reveals that the problem is far higher up the chain than where people were looking.

A practical habit: before debugging any detection problem, open the raw image and try to find the defect by eye. If a motivated human with full zoom and unlimited time cannot see it, stop debugging software and go fix the imaging.