AI vs. Rule-Based Machine Vision: What Changes on the Line
An engineer's view of AI-based visual inspection systems vs. rule-based machine vision: where thresholds break, what changes, and when rules still win.

We’ve spent a lot of time standing next to rule-based vision stations, and most of them do exactly what they were set up to do. They find the part, check the hole spacing, confirm the clip is there and read the code. When a plant asks us about AI-based visual inspection systems, it’s rarely because that camera is broken. It’s because there are still people at the end of the line with a flashlight, catching the things the camera was never able to see.
Almost always, the reason is variation.
What a rule actually knows
A rule-based station is a stack of tools an engineer configures by hand. Pattern matching finds the part. Regions of interest fence off the areas that matter. A threshold splits pixels into light and dark, blob analysis groups the dark ones, edge tools measure what’s left. Then come the limits: reject any blob bigger than some number of pixels, darker than some gray level, inside some region.
Each of those limits is a decision about what “good” looks like, made in advance at commissioning. That’s a real strength. The logic is deterministic, it runs on modest hardware, and when a part fails you can point at the exact tool that tripped.
It’s also the whole problem. The rules describe pixel values, and a pixel doesn’t know what it belongs to. A thin scratch and a thin reflection of the same brightness look identical to a threshold, and so do a flow line and the soft shading on a curved wall.



Film defects that a single brightness threshold struggles to separate from normal variation in the web.
Where the tuning never ends
Take an eyelash on plastic film: a thin streak only slightly lighter than the film around it. To catch it with a threshold, you lower the contrast limit. Then gauge bands, normal haze variation and the light falloff at the web edges start tripping the station too. Operators start overriding rejects, so someone raises the limit again, and the eyelashes go back to slipping through. We’ve watched that tug-of-war go on for years on a single line.
It shows up wherever good parts differ from each other. On glossy molded plastic, highlights move with every small change in how the part sits, and real flow lines look like gentle gradients with no edge to latch onto. Bright or textured steel has grain, mill finish and oil film that all shift local brightness, so a scratch and a polish mark can share a pixel profile. Color lots and surface finish each want their own tolerances, and those tolerances interact. A high-mix line needs a recipe per SKU, which means every changeover is a chance to load the wrong one and every new part is a new tuning job.
The usual end state is a station tuned conservatively to keep false rejects down, a known list of defects it doesn’t try to catch, and a person downstream sorting whatever it lets through.
What changes when the system learns from examples
Deep learning inspection swaps hand-built features for learned ones. You stop telling the system which pixel values mean “defect.” You show it labeled examples of defects and good parts, and it learns what separates them, including all the variation that isn’t a defect.
Tristar starts from a foundation model that already understands materials. It’s learned to look past background, reflections, gradients, shadows, opacity and gloss and to focus on the material. So the eyelash gets recognized as a streak in the film, which is what an inspector sees, rather than as a brightness value that happens to cross a line.
The output is richer, too. You get a class, a location, a size and a confidence, down to a pixel mask when you need it, which makes tolerances like minimum defect area practical. A new defect type or a new SKU becomes a labeling job instead of a programming job, and knowledge transfers across SKUs so a new part doesn’t start from nothing.
What surprised engineers we’ve worked with most is how their own job changes. The vision engineer stops tweaking parameters and starts looking after a validation set, where detections, misses and false rejects are tracked by defect type and reviewed every week. Any change to the model gets measured against that set before it’s allowed to drive a reject. The quality engineer gets tolerances written in plain terms: the model finds and measures, and quality decides which sizes, zones and counts are scrap. A calibration report at install documents how the station performs, and that report has been used in a third-party audit. When something new turns up on the line, the system flags it, and a short weekly review decides what it is and whether it’s a reject.
Here’s the side-by-side view we’d give a colleague:
| Rule-based machine vision | AI-based visual inspection | |
|---|---|---|
| How “defect” is defined | Engineer-set thresholds, regions and tool parameters | Learned from labeled examples |
| Best at | Fixed geometry, high contrast, controlled presentation | Variable appearance, low-contrast and cosmetic defects |
| Gloss, texture, shadows | A common source of false rejects | Learned as normal variation |
| New defect type or SKU | New tools, new recipe, re-validation | New labeled examples, reviewed in the weekly cycle |
| Explaining a reject | The rule that fired | Class, location, size and confidence, plus explicit tolerance rules |
| Upkeep | Periodic re-tuning by a vision specialist | Short weekly review of flagged anomalies |
Plenty of the strongest stations use both at once: the model handles perception, and a few simple, readable rules on its output handle the call, like hole count within range or maximum defect area. The walkthrough of how AI defect detection works follows that split through a real station. If you want to see it on a web material, read AI defect detection for plastic film.
When a rule-based system is still the right choice
We’d leave a working rule-based station alone more often than people expect. Replacing a validated system because the new one is fashionable is poor engineering.
Keep rules where the part is presented identically every cycle, the feature is high contrast and the check is geometric. A clip is either there or it isn’t. A barcode reads or it doesn’t. A hole sits against a hard fixture, and you’re measuring its position. Those stations are deterministic and cheap to run, they’ve already been signed off, and a model adds little to them.
Look at AI when the station shows symptoms like these:
- It gets re-tuned after every material, resin or lighting change.
- Operators routinely override its rejects.
- There are known defect types it doesn’t even attempt.
- People inspect by hand downstream of it.
- Recipe management on a high-mix line has turned into somebody’s full-time job.
If you’ve got a station like that, don’t rip it out. Pull the parts it falsely rejects and the defects it misses, and use them as the test set when you evaluate an AI system. Let both systems watch the same parts for a while, and move the reject signal only once the validation set says the new station meets your tolerance.


