AI Anomaly Detection for Surface and Assembly Defects
Anomaly detection finds defects hard to define by rule, by learning normal appearance and flagging deviation. Suits low-volume, many-variant parts.
Solution Overview
AI vision anomaly detection: for appearance anomalies that are hard to enumerate exhaustively, it learns the normal state to establish a datum and identifies anomalous regions that do not match the normal state; it applies to appearance problems such as scratches, dirt, deformation and short shot. The solution consists of three parts, imaging, algorithm and interlocking, and the judgement threshold must be biased according to the asymmetric costs of escapes and false rejections, and is subject to the results of a measured sample trial.
Traditional visual inspection relies on "writing the defect features down clearly", but on site you often encounter Defects That Cannot Be Fully Described: occasional scratches, sporadic dirt, local deformation that is hard to describe. Such scenarios are well suited to an anomaly detection approach — instead of listing defects, establish a normal-state baseline and judge anything clearly inconsistent with it as an anomaly.
The advantage of this approach is No need to enumerate every defect type, and the cost is a stricter definition of "what counts as normal": the normal samples must cover the reasonable variation of real incoming material (batch, surface state, illumination), otherwise the equipment will treat normal variation as an anomaly as well.
inspection Content
The items that "AI visual anomaly detection" actually verifies on site, listed by common case
Surface Scratches
- Shallow scratch
- Abrasion
- Abnormal striation
- Scrape Mark
Dirt and adhered matter
- oil stain
- Dust
- Fingerprints
- Foreign matter adhesion
Localized Deformation
- dent
- deformation
- Compression Marks
- Edge damage
Short shot and anomalies
- Localized Short Shot
- Burr anomaly
- Overflow
- Excess Material
Abnormal Surface Condition
- Uneven Color
- Burn Marks
- Oxidation
- Coating anomaly
Problems That Are Hard to Name
- Hard to describe but clearly wrong
- Low-Frequency Sporadic Anomalies
- New Unknown Defects
- Compound anomalies
inspection Method
From trigger and acquisition to result output, how the judgement is produced
- 01 Workpiece-in-Place Trigger
- 02 image acquisition
- 03 Compare with the normal datum
- 04 Anomaly Region Detection
- 05 Anomaly Severity Quantification
- 06 Judged by threshold
- 07 Anomaly Location Marking
- 08 Output OK / NG
- 09 PLC interlocking
The key to implementing anomaly detection lies in Coverage of normal samples: the normal samples provided during the training (or modeling) stage should cover the reasonable variation that occurs in actual production, including different batches, different surface conditions, and illumination fluctuation. If the samples are too uniform, the equipment becomes overly sensitive.
It is also recommended to combine anomaly detection with rule-based algorithms Used in combination: Items with clear acceptance criteria (such as presence/absence, count, characters) continue to use rule-based algorithms, and only items whose criteria are hard to enumerate are handed over to anomaly detection. This keeps clear-cut items stable while still covering unknown anomalies.
judgement and Interlocking
How results are judged and passed to the production line
| Anomaly Detection Status | judgement | Recommended Action |
|---|---|---|
| No significant anomaly detected | OK | release |
| Anomaly detected and threshold exceeded | NG | Isolate and archive the abnormal image |
| Anomaly detected but severity close to the threshold | To Be Determined | Recommended for manual review and continuous threshold adjustment |
Threshold adjustment is an ongoing process. In the initial period after launch it is recommended to keep a proportion of re-inspection samples, collect data for a period of time and then converge the threshold based on actual performance, rather than fixing it once.
For anomaly detection, The cost of false calls and escapes is often asymmetric, the threshold should be biased toward whichever side the site cares about more, and this needs to be confirmed together with the quality department.
Related Inspection Objects
View more specific object characteristics, acceptance criteria and optical notes by object
Applicable Industry
Scenarios in These Industries That Already Have Corresponding Inspection Needs
Common Question
Questions most often asked during selection and implementation
How many normal samples does anomaly detection require?
There is no universal number; it depends on how much the product surface itself varies. The more a product varies, the more samples are needed to define the boundary of "normal." In practice we usually start with a few dozen to a hundred real production samples and then add more based on the actual false calls.
Do defect samples need to be collected?
Anomaly detection does not in principle depend on defective samples, but when known defective samples are available we recommend including them in the validation set: use them to check "whether the known defects can be detected" and avoid discovering escapes only after going live. This is a validation step, not a requirement for building the model.
Can anomaly detection distinguish between defect types?
It usually can only answer "this area is abnormal", not directly "this is a scratch". If the defect type must be output, an extra classification step is required, and known defect samples of that type must be available to train the classifier.
Can lighting changes cause false calls?
It does have an effect, and this is one of the most common sources of false calls on site. Lighting conditions should be stabilized as far as possible (fix the light source, block ambient light, check the light source for decay regularly), and normal-range lighting fluctuations should be included in the modelling samples.
How are the acceptance criteria for this solution defined?
Threshold adjustment is an ongoing process. In the initial period after go-live, it is advisable to keep a certain proportion of samples for re-inspection, and after collecting data for a period, converge the threshold based on actual performance rather than fixing it once and for all. For anomaly detection, the cost of a false call and of an escape is often asymmetric, and the threshold should be biased toward the side the site cares about more; this must be confirmed together with the quality department.
What is the inspection method?
The key to deploying anomaly detection is the coverage of normal samples: the normal samples provided in the training (or modeling) stage should cover the reasonable variation that occurs in actual production, including different batches, different surface states and illumination fluctuations. If the samples are too uniform, the equipment becomes overly sensitive. It is also advisable to combine anomaly detection with rule-based algorithms: items with clear acceptance criteria (such as presence/absence, count, characters) should continue to use rule-based algorithms, and only items whose criteria are hard to enumerate are handed to anomaly detection. This guarantees the stability of clear items while covering unknown anomalies.
Which Inspection Objects Is This Solution Applicable To?
View the object characteristics, acceptance criteria and optical considerations for each object; it covers 8 common object types including PCB component presence/absence inspection, label presence/absence inspection, connector presence/absence inspection and terminal presence/absence inspection.
Can this solution replace manual labor?
What visual inspection replaces is repetitive visual judgement, not manual labor for everything. The typical division of labor is: vision performs part-by-part full inspection and judgement, while people handle re-judgement of borderline samples, changeovers and exceptions, and maintenance of the optics and tooling. How many people are actually involved depends on the degree of automation and the re-judgement strategy.
How do you verify that this solution is feasible?
Please provide several samples of normal products (covering different batches and surface states) as well as any known defective samples you can obtain; the engineer will assess the feasibility of anomaly detection and the direction of the threshold setting.
Submit sample testing
Please provide several samples of normal products (covering different batches and surface states) as well as any known defective samples you can obtain; the engineer will assess the feasibility of anomaly detection and the direction of the threshold setting.
Submitted successfully
We have received your sample testing request. A solution engineer will contact you within 1 business day via contact you.
Need to assess imaging conditions, defect criteria and cycle time item by item? Go to the Full Requirement Assessment →
Submit Samples to Get a Visual Inspection Solution
Tell us the workpiece, inspection requirements, production line cycle time and your existing PLC / communication method, and our solution engineers will recommend the inspection method, optical configuration and interlocking solution.