Before you adopt good-product learning AI, read this

Good-product learning AI: what it is, and what to watch for

What this article covers

If you are thinking of adopting good-product learning, wait a moment. People reading this are split: some have high hopes of good-product learning, and many have the impression — or have been told by a manufacturer — that it is not accurate. What decides whether it runs accurately is, put simply, how fine a defect it can detect. Check that carefully, so that you do not regret the purchase.

What is good-product learning? How does it differ from image processing? Search and you will find any number of articles, and not much difference between them. This one goes a step further, with the state of the industry in view, and is written not only for people about to adopt visual inspection AI but for people already struggling to get accuracy out of AI.

As a newer technology we also offer, alongside good-product learning, zero-shot anomaly detection AI, the industry’s first that needs no training at all. If that interests you, follow the link.

About zero-shot anomaly detection

What good-product learning AI is

What AI is, to begin with

AI, technically, almost always means deep learning. Deep learning has a structure that imitates human neural circuitry, and it is now indispensable — language processing, ChatGPT among it, and the image recognition behind autonomous driving. Visual inspection draws particularly on deep learning for image recognition.

Take an AI that recognises ordinary things like cats and dogs. From a great many images it learns the features common to cats and the features common to dogs. That process is called training.

If you were asked to define why you recognise a cat as a cat, you would find it hard to answer. And yet you can, more or less. Writing an algorithm to tell a cat from a dog in an image, on the other hand, would be very difficult. Deep learning was built, in imitation of human neural circuitry, to make that kind of complicated judgement possible.

Leaving the details aside here: deep learning has a structure that imitates neural circuitry, and by training on pairs of data (input) and the correct answer (output) it can acquire a complicated process — the relationship between input and output — from the data.

A diagram of training: images of cats and dogs go in, and the AI learns what the two have in common

The kinds of AI in visual inspection

The kinds of AI that visual inspection vendors talk about.

・Supervised learning: also called defect learning. Defect data is taught to the AI. Learn the defects thoroughly and classification is accurate, and the defect type can be identified too. But where defects are not plentiful, collecting the data is hard work, and it cannot handle a new defect.

・Unsupervised learning: also called good-product learning, anomaly detection. Good products are learned and everything else is detected. Since good products accumulate as a matter of course the data is easy to collect, and it can handle defects nobody has seen, so more and more projects choose it.

Approach What it is Strengths Weaknesses
Supervised
(defect learning)
Defect data is taught to the AI Accurate classification given enough data Defect data is hard to collect. New defect modes are not covered
Unsupervised
(good-product learning)
Good products are learned; anything unlike them is detected Good-product data is plentiful and easy to train on. Handles unknown defects Classifying defects is difficult. False detections are common

What is actually different between image processing and AI?

At first sight good-product learning AI looks attractive beside defect learning. So how does it differ from the image processing we have always had? Let us look at the image-processing method closest in spirit to good-product learning.

Difference detection (image processing)

If you know image processing, the method that comes to mind is difference detection.

A master image is registered and the inspection image is compared against it. Normally the position is corrected first and then the difference computed. The white areas in the difference image are what has been detected as anomalous, and those are normally treated as the defect.

What is wrong with difference detection

Even when the real defect is, say, damage to a chip, other areas get detected as anomalies too. That is what false detection means.

Why does it happen? Because a product always varies.

Line up good products side by side and you see variation of several kinds:

  • positional shift
  • variation in how parts are mounted
  • variation in the amount of solder
  • variation in the colour of the parts themselves

A difference against a registered image cannot avoid calling that variation an anomaly. Which is why difference detection works best on products that vary least.

Several good products side by side, showing positional shift, mounting variation, solder variation and colour variation

What good-product learning AI can do about it

Is good-product learning AI, then, an effective answer to false detection? The short version: with ordinary good-product learning AI, it is half an answer.

What can a person do in a comparison against good products that image processing cannot? A person watches the products being made, grasps the range of what counts as good — the distribution of the variation — and judges intuitively that this one is different. Difference detection against a master image cannot judge reliably, because no two images are ever identical.

What good-product learning AI aims at is to learn the distribution of variation the way a person understands it, and to call anomalous whatever falls outside it. That makes it possible to detect anomalies while holding false detections down.

The ideal: a learned distribution of good-product variation, with the anomaly falling outside it

Where ordinary good-product learning AI comes unstuck

Differences in how well the distribution is learned

Good-product learning AI is attractive, but there is a problem that actually occurs with many products: the distribution of variation in good products is not learned accurately.

Variation in good products is extremely complicated, with something close to an infinite number of combinations within an image. With the usual approaches it can be difficult, in principle, to learn that distribution accurately. Which is how you end up with tens of thousands of good-product images being required, and with a lot of false detections.

By analogy: a person can tell a Japanese face is Japanese; the AI in this state can only recognise as Japanese a face close to one it has actually seen. The problem is usually not good-product learning itself but the limits of the algorithm, or the wrong technology having been chosen.

A good deal of the market is repackaged imported software, and products that look different often run on the same AI algorithm underneath. That is worth keeping in mind when you compare.

The same chart where the learned distribution is too narrow, so normal variation falls outside it and is flagged

Differences in the heat map

There is a large difference in accuracy in the heat maps that show where the defect is. Three kinds are common:

・1. Classification: an image goes in, and only whether it is anomalous comes out. Used in research; rarely productised.

・2. Semi-segmentation: the approximate position is indicated. Many products do this, but the region cannot be specified strictly.

・3. Segmentation: the anomalous region is specified accurately at pixel level. The shape and the size of the defect can be read off, which makes it the most useful.

We use segmentation, accurate enough to detect fine defects of two or three pixels — a thousandth of the image.

The same flaw in cloth shown three ways: the original, a semi-segmentation heat map, and our segmentation pinpointing it

What our AI solves

Reading variation well

To sum up: holding false detections down depends on being able to grasp variation efficiently, and that is what matters most in good-product learning AI.

What our product does

As a domestic AI company we use the development capability we have built up, with a technique that simulates variation during training, to get past the problem above. These are the characteristics that have led people to choose us when comparing products:

  • Trained on good-product data alone, it detects fine defects of 2 px on complicated products.
  • It can inspect parts that change constantly, such as serial numbers.
  • It detects fine defects a thousandth of the size of the image.

If you are weighing up good-product learning AI, do get in touch.

A comparison of AI approaches, with the detection result from each

Request the brochure

Contact us

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

DownloadsContact