Why Machine Vision AI and Deep Learning Are Not Always the Answer

Why Machine Vision AI and Deep Learning Are Not Always the Answer

Almost every machine vision enquiry now opens with the same word. AI. The assumption is that deep learning can inspect anything. It is treated as the modern way to solve any inspection problem. Traditional machine vision, the rule-based kind, gets treated as something from the last decade. The reason is understandable. The marketing around AI in vision is relentless. Some of it is deserved. Deep learning has solved problems that were genuinely out of reach a few years ago.

The trouble is that the hype now leads people to reach for deep learning on jobs where it is slower, more expensive and less reliable than a rule-based approach that would take an afternoon to set up. This is a straight account of when AI is not the answer, from a company that builds both kinds of system and has no reason to sell the more complicated one. None of it is anti-AI. It is about matching the tool to the task.

Two different tools, not old versus new

The first thing to clear up is the framing. Rule-based vision and deep learning are not old and new versions of the same thing. They are two different tools that solve different kinds of problem. The best systems often use both together.

Rule-based machine vision works by explicit instruction. You tell it exactly what to measure or look for, a dimension, an edge, a barcode, a specific pattern. It applies that rule the same way every time. Deep learning works by example. You show it many labelled images of good and bad. It learns to tell them apart on its own. The rule-based system knows only what you told it. The deep learning system knows only what it saw in training. Each is powerful in its place. Each has a place where it is the wrong choice.

Where rule-based vision still wins

For a large share of the inspection work we see, a rule-based approach is the better answer. These are the cases where reaching for AI adds cost and risk for no gain.

Measurement and gauging. If you need to measure a dimension, check a distance or confirm a position to a known tolerance, rule-based vision does it precisely, repeatably and with a number you can trust. Deep learning is the wrong tool for a precise measurement. A rule measures. A learned model estimates.

Reading codes and defined text. A barcode, a data matrix, a clearly printed date code. These are solved problems for rule-based tools, quickly and with high reliability. You do not need a neural network to read a barcode.

Presence, position and counting. Confirming a component is present, correctly placed or counted is bread and butter for rule-based vision. The feature is defined, the rule is simple, the result is certain.

Anything with a clear, consistent feature. When the thing you are inspecting has good contrast and does not vary much, a rule-based tool handles it faster and cheaper than deep learning. It does not need a single training image to do it.

The common thread is that when a problem can be defined, defining it explicitly beats teaching a model to guess at it. Deep learning earns its place on the problems that cannot be cleanly defined. That is a real and important category, just a narrower one than the hype suggests.

The training data problem

The single biggest thing the hype leaves out is what deep learning needs from you before it works at all. It needs data, usually a lot of it.

A deep learning model learns from labelled examples. Someone has to collect images of your parts, including examples of every defect you want to catch. Each one has to be labelled correctly. For a reliable model that often means hundreds or thousands of images. Crucially, it means enough examples of the defects. That is the catch on a good production line. If your process is any good, real defects are rare. Gathering enough defective samples to train on can take weeks or months, or it means deliberately producing bad parts. A rule-based system needs none of this. You set the rule and it runs. When people discover the data burden partway into an AI project, it is often the moment the rule-based option starts to look sensible.

Explainability and why it matters on a line

This is the one that gets overlooked until it causes a problem. A rule-based system is fully explainable. When it rejects a part, you can see exactly why. It measured a value that fell outside a limit you set. You can trace every decision, defend it to a customer and prove it to an auditor.

A deep learning model is far harder to interrogate. It gives you a result. The reasoning sits inside a network of learned weights that does not translate into a simple reason. For many applications that is fine. In a regulated industry, in food, pharmaceutical or medical device manufacturing, where you may have to justify to an auditor exactly why a part passed or failed, that opacity is a genuine problem. When you have to stand behind every decision the system makes, a tool that can show its working has real value that no accuracy figure captures.

Where the cost really sits

On paper the hardware for either approach can look similar. The true cost of deep learning shows up elsewhere. It is easy to miss when you are dazzled by what the technology can do.

There is the cost of collecting and labelling the training data. That is real engineering time. There is the training itself, plus the iteration when the first model is not good enough. Deep learning often needs more processing power to run. That can mean a more capable and more expensive system than a rule-based tool that runs happily on a smart camera or a modest PC. Then there is the ongoing side. If your product changes, or a new defect appears that was not in the training set, you may have to gather more data and retrain. A rule-based system is often a quick adjustment. For a full picture of the costs that show up after purchase, our guide to the true cost of machine vision goes into detail. The point here is that the cheapest-looking AI project is rarely the cheapest once the data and retraining are counted.

The edge cases that catch people out

The most important difference between the two tools is how they behave at their limits. This is where an over-enthusiastic AI deployment can quietly go wrong.

A rule-based system fails predictably. It has a defined limit. When a part falls outside what the rule can handle, it flags it in a way you can anticipate and plan for. A deep learning model can fail in less predictable ways. Faced with something genuinely unlike anything in its training data, a new variant, an unusual lighting change, a defect type it never saw, it can give a confident answer that is simply wrong, with no obvious signal that it is out of its depth. On a production line that matters. A system that fails in a known way at a known boundary is often safer than one that is more capable in the middle of its range but unpredictable at the edges. This is not a reason to avoid deep learning. It is a reason to understand how it behaves before you trust it with a decision that matters.

The two approaches side by side

Here is the comparison in short. It is a guide to which tool suits which job, not a verdict that one is better than the other.

  Rule-based vision Deep learning
Best for Defined features, measurement, codes Natural variation, complex defects
Training data None, you set the rules Hundreds to thousands of labelled images
Explainability Full, every step is traceable Limited, it is a learned model
Setup cost Lower Higher, data and training time
Runs on A sensor or modest PC Often needs more processing
When it fails Predictably, at a known limit Less predictably, on unseen cases

When deep learning is exactly the right tool

None of this is an argument against AI. It would be a strange one coming from a company that builds deep learning systems. There is a category of problem where deep learning is not just useful but the only practical answer. It is worth being just as clear about that.

When the thing you are inspecting varies naturally in a way you cannot write a rule for, deep learning shines. Think of natural products with endless natural variation, cosmetic surface defects that never look quite the same twice, or complex assemblies where good and bad differ in ways that are obvious to a trained eye but very hard to specify. In these cases a rule-based approach struggles. You cannot enumerate every acceptable variation. This is exactly where a well-trained model earns its keep. The skill is recognising which kind of problem you actually have.

Use the right tool, not the loudest one

AI and deep learning are a real advance. They have earned their place in the machine vision toolbox. They have not replaced rule-based vision. They were never going to. A great many inspection problems are defined problems that a rule solves better, cheaper and more transparently. The manufacturers who get the best results are not the ones who chase the newest technology. They are the ones who match the tool to the task. They work with someone willing to tell them when the simpler tool is the better one.

This is the conversation Clearview has with customers across Europe every week. It is one we are always happy to have. If you have an inspection challenge and you are not sure whether it calls for a rule-based system, a deep learning one, or a combination of the two, talk to us. We will give you a straight answer. We have no reason to sell you anything other than the approach that works.

Talk to our experts about the right approach: tell us about your inspection

Get in touch: info@clearview-imaging.com | +44 (0)1844 217270

Related: Machine vision software   |   The True Cost of Machine Vision   |   Smart vision cameras   |   Pricing

Retour au blog >