Updated July 2026 · 7 min read · Adente Vision Engineering Team
What problem does anomaly detection solve on a production line?
The defect that hurts most is the one nobody planned for: a hairline crack, a short-shot, a contamination mark that appears once in ten thousand parts and was never written into an inspection rule. Traditional checks look only for defects someone described in advance, so a first-seen flaw walks straight through to the customer, and the escape is found in the field instead of on the line.
Anomaly detection inverts the problem. Instead of describing every way a part can go wrong, it learns what a good part looks like and treats anything different as suspect. That is why quality and production teams reach for it when the defect list is open-ended and the escapes are the ones they cannot predict. The job is not to match a known fault, it is to notice that this part is not like a good one.
How does anomaly detection differ from rule-based vision and classification?
Three inspection approaches answer three different questions. Rule-based vision asks "does this part match a rule I wrote," classification asks "which known category is this part in," and anomaly detection asks "is this part different from normal." The first two need you to know the failure in advance; the third does not.
| Dimension | Rule-based vision | Classification (supervised) | Anomaly detection |
|---|---|---|---|
| What it needs | Hand-written rules per feature | Many labelled good and bad images | About 20 good images only |
| Catches unknown defects | No, only what a rule describes | No, only classes it was trained on | Yes, flags any deviation from normal |
| Best for | Barcodes, fixed dimensions | Known, repeatable defect types | Rare, first-seen, varied defects |
| Data to start | None, but engineering per rule | Hundreds of labelled defects | Good parts, no defect catalogue |
| Output | Pass/fail on the rule | Class label plus confidence | Anomaly score against a threshold |
Rule-based vision is fast and fully explainable, and it is the right tool for a barcode or a fixed dimension. Classification is strong when you have many labelled examples of each defect type you expect to see. Anomaly detection is the approach that covers the long tail: the rare, the varied and the never-before-seen, which are exactly the defects that escape a fixed rule and are the hardest to collect examples of.
How does the "learn normal, flag the rest" mechanism work?
Anomaly detection builds a statistical picture of a good part from a set of good images, then scores each new part by how far it strays from that picture. A part that sits inside the learned range of normal passes; a part that falls outside it is flagged with an anomaly score, and a threshold turns that score into a pass/fail signal your controller can act on.
The practical payoff is the data requirement. Because the model trains on good parts only, you never collect, stage or label a catalogue of defects to begin. About 20 good reference images are enough to define normal, and model training completes under 48 hours, so a new part becomes a two-day task rather than a multi-month data-collection project. What matters is that the 20 images carry the natural variation of a genuinely good part, so ordinary spread in colour, texture or position is not mistaken for a defect.
The threshold is the one knob that shapes the result. Set it tight and the unit flags more parts, catching more real defects but also questioning good parts that sit at the edge of normal. Loosen it and fewer good parts are questioned, but a subtle defect can slip under. On a real deployment you set that operating point to the cell's actual cost of an escape versus a false reject, not to a default.
Where does anomaly detection earn its place on a real line?
Anomaly detection earns its place wherever defects are rare, varied or unspecified. On a delivered cap-inspection line, an edge-AI unit running anomaly detection rejects broken, unclosed and hinge-damaged caps live, reaching a 99.65% F1-score with a 0.69% false-negative rate at about 30 ms per part. The false-negative rate is the number a quality manager watches, because it is the rate of defects that escape, and 0.69% is the checkable proof that the method holds on a real line rather than a benchmark.
The same property that makes anomaly detection hard to fool also makes it broad. A surface scratch is never in the same place twice, a contamination mark has no fixed shape, and a new failure mode can appear the week after commissioning. A model that scores deviation from good handles all three without a new rule, which is why it suits surface, texture and assembly checks where the defect list is genuinely open.
Adente Vision is an edge-AI visual inspection unit built by ADENTE Advanced Engineering Technologies, part of the Aden Group, sold through automation system integrators. It runs four inspection modes, Anomaly, Defect, Counting and Quality, and combines classical computer vision for measurement with AI inference for judgement, so a flagged part comes with a score you can audit rather than a black-box verdict. The measured 30 ms is a field result on that specific line; the number you can commit to for your own parts and cycle needs an application-specific measurement.
When is anomaly detection the wrong tool?
Anomaly detection is not the answer to every check. When the feature is a known symbol or a precise, well-defined measurement, a barcode, a date code, a fixed dimension on a fixtured part, a rule-based check is faster, cheaper and fully explainable. When you must sort parts into named categories and you already have many labelled examples of each, supervised classification is the better fit.
The strongest lines rarely choose only one. A rule-based pre-filter handles the clear cases at deterministic speed, and anomaly detection covers the grey zone and the rare defect the rules were never written for. For the full decision framework on when to use each, see the sibling guide on rule-based versus AI machine vision, and for the mechanism behind training from 20 good parts, see the few-shot anomaly post.
This post is a spoke of the pillar guide on AI visual inspection; to see where anomaly detection sits among the tasks the unit runs, browse the real applications.