Want AI inspection but cannot collect defects? That is what Zero-Training AI is for

Zero-Training AI: detects what it was never shown, tunes on a handful of defects

What this article covers

AI visual inspection systems have spread quickly in recent years. Plenty of people are still stuck, though: the defect images will not accumulate, or accuracy will not settle down once the system is running.

This article sets out the trouble with conventional AI, then describes the approach we developed — Zero-Training AI — and how it behaved on a real subject.

Where AI visual inspection stands, and what gets in the way

People are using it. And yet.

AI is drawing attention in all sorts of places. In factories in particular — industrial products, food, building materials, across production of every kind — AI visual inspection has spread quickly since around 2020 as a substitute for the human eye.

What most companies find when they actually try it is this: it works where enough data on the defect you want exists, or where the inspection environment can be arranged, but it comes with a lot of constraints. Most visual inspection AI has to learn the defects you want found. Yet daily quality improvement can push some of those defects down to parts per million, and then the defect images the AI needs simply cannot be collected.

Add shortening product life cycles and a wider range of variants, and collecting defect images becomes one of the main reasons AI visual inspection is hard to adopt.

Below we first set out the usual difficulties with supervised learning, the standard inspection AI, and with the AI said to need no defect images at all — the kind that learns only good products (unsupervised learning). Then we introduce Zero-Training AI, which we developed to deal with those difficulties at the root, and show it working.

Supervised and unsupervised learning fail differently

Broadly, AI learns in one of two ways.

  • Supervised learning: defect images are learned, so the AI knows what a defect looks like.
  • Good-product learning (unsupervised): only good products are learned, and whatever departs from the normal pattern is called an anomaly.

Supervised learning is very accurate where the defect you want is clearly defined and there is enough data. On a real floor, though:

  • defects rarely occur
  • defects are hard to produce deliberately
  • products change often, and collecting every defect is difficult

Good-product learning solves those by not needing defects at all, which is a considerable advantage. But it tends to:

  • call slight variation in a good product an anomaly
  • be sensitive to misalignment and to differences in capture conditions, so false detections happen

In other words: supervised learning is accurate but needs defects; unsupervised learning needs no defects but needs care in operation. Where a system has to be stood up quickly, or cover many variants, something else was wanted. Where neither difficulty applies, mind, supervised or unsupervised learning can be more accurate than the zero-training approach described below. It is a question of the right tool.

For more on the AI used in visual inspection, see our other article.

Zero-Training AI, built on the thinking behind generative AI

Zero-Training AI came out of exactly those situations where a system has to start quickly or cover many variants. It applies to inspection the mechanism by which generative AI grasps concepts and context: the AI learns the concept of a good product in the abstract, and judges anomalies from that. Which means it can detect anomalies by itself without knowing the defects.

Concretely: at the outset, having been taught nothing, it holds a concept of normal, and automatically treats regions that depart from it as anomalies. Add a few anomaly images and fine-tune, and the noise falls away and the detection sharpens.

Those two properties — grasping the concept and tuning on very little data — mean that training which took months with conventional AI can in some cases finish in minutes or hours. That speed matters a great deal for standing an inspection system up early and cutting the preparation work.

Because Zero-Training AI holds the concept of what is correct, it also copes flexibly with differences in capture conditions and angle, and can cover several variants and several anomalies with one model.

Zero-Training AI is patented technology of ours.

A worked example: finding contaminants with Zero-Training AI

Taught on green lettuce, and it handles red leaf lettuce too?

Here is what that looks like: finding contaminants — insects — in a food factory.

Fine-tuning Zero-Training AI on lettuce: the input images, the heat maps before tuning, and the heat maps after one minute of tuning on a few examples

Finding insects in green and red leaf lettuce with Zero-Training AI. The rows, top to bottom, are the input images, the detection before any tuning, and the detection after fine-tuning. The three subjects are lettuce with a grasshopper, lettuce with a stink bug, and red leaf lettuce with a larva. Only the grasshopper and the larva on green lettuce were shown during tuning; the stink bug and the red leaf lettuce were not.

The aim was to find grasshoppers, stink bugs and larvae hidden among green lettuce and purple red leaf lettuce. Even with Zero-Training AI straight out of the box, untuned, the insects on both kinds of lettuce came up automatically as something that did not belong. Then a few images of the grasshopper and the larva were shown, and it was tuned for one minute. After that it found not only grasshoppers and larvae on green lettuce but the stink bug it had never been shown, and the larva on red leaf lettuce, with much less noise.

That is Zero-Training AI coping with defects it does not know and with a different background, and covering several variants and several anomalies with one model.

In short: where defects are scarce and the system has to start soon

With earlier AI, every combination of background and target needed its own model. Zero-Training AI, built on the thinking behind generative AI, reaches accurate detection across many variants and several kinds of defect from a handful of examples of the anomaly you want tuned.

“The defects will not accumulate.” “Standing it up takes far too long.” Those are the floors where Zero-Training AI earns its keep.

We support higher productivity and steadier quality through Inspection Designer, the inspection software that carries Zero-Training AI. There is more about Zero-Training AI on its own page.

Contact us

From questions about introducing generative AI inspection to on-site demonstrations, our specialists are here to help.

DownloadsContact