← All resources

Getting started

How many defect samples do you actually need?

How many defect images do we have to collect before AI inspection can start?

Five is the norm. Where a product has no defect history, or is too large to bring to us, a model can be built from good samples alone — or from a single image. The assumption that you need thousands belongs to the rule-based era.

Published
Technical review
DSTEK Korea technical support

Why five is enough

Few-sample training extracts multi-dimensional features and weights the informative ones more heavily. Rather than showing the model every variation of a defect, it learns what makes a defect different.

Transfer learning compounds that. Products of the same material and process share characteristics that are already learned, so a new item only has to learn the difference. Over 30 models are currently compatible.

When one image is enough

Large panels, vehicle bodies and large motors cannot practically be shipped to us, so the model is built from a single sample captured on site. Designing the imaging around the actual line is more accurate than moving the part.

When good samples alone are enough

One-class training learns the distribution of good parts and flags anything outside it. It applies when a product is new enough to have no defect history, or when defects are rare enough that collecting them would take months.

If you need defects classified by type — because each type triggers a different action — you do need samples per type. Still on the order of five each.

When this answer does not apply

  • If the defect is not visible to a human either, optics come before sample count. No algorithm can judge what the lighting and lens failed to reveal.
  • If variation between good parts exceeds the defect itself, the standard has to be defined first. That happens during the PoC.
  • If the inspection standard has never been written down and lives in an inspector’s judgement, capturing that judgement as data comes first.

What a PoC actually involves

  • Confirm the part and defect types, and put an NDA in place.
  • Receive samples or images over a secure route.
  • Design the optical configuration and capture.
  • Train the model and report over- and under-detection as a confusion matrix.
  • Size the inspection speed to your line rate and hardware.

Related products and solutions

Tell us the inspection problem. We will start by telling you whether it is solvable.

Contact us