What is AI visual inspection? A practical definition for 2026

AI visual inspection is the use of machine learning models to detect, classify and grade product defects from images, usually in real time on a production line. That is the one-sentence version. The rest of this post is the version you need when someone on the floor asks whether your new inspection tool is "real AI" or just a camera with a rules engine behind it.
The short answer is that the two are different in how they're built, what they can catch and how long they stay useful. The long answer is below.
How does AI visual inspection work in practice?
You put a camera over a product. The camera feeds images to a machine learning model. The model has been trained on labelled examples of good parts and bad parts. For every new image, it outputs a decision: pass, fail or flag for review. That decision gets sent to a PLC, an MES or an operator screen. The whole loop runs in under a second on modern hardware, and it keeps working without code changes when the product has small natural variations the old rules engine could never handle.
That is AI visual inspection. Everything else in this post is either a detail of how the model is trained or a detail of how the inspection fits into the factory.
How is AI visual inspection different from traditional machine vision?
Traditional machine vision (also called rule-based vision) works by writing code that says things like "the logo must be black, centred within 0.5 mm of this point, and no brighter than 30% grey." The rules are precise. They also break the moment the product drifts, the lighting changes or a new variant is introduced.
AI visual inspection replaces most of those hand-written rules with a trained model. Instead of describing the rule, you show the model 50 to 500 examples of "good" and "bad" parts and let it figure out the pattern. The trade-off is that you need labelled examples (the training data), but you get a system that handles variation far better and that you can retrain on the line when something new shows up.
In practice, most real factories use both. Rules still work beautifully for precise geometric measurements: "is this hole 4.2 mm in diameter?" AI earns its keep on the messy, visual, subjective defects: scratches, colour bleed, surface finish, contamination, assembly errors. For a deeper look at how that mix plays out, our machine vision systems guide breaks down the architectures you'll encounter.
What types of AI models are used in visual inspection?
Vendors use a lot of interchangeable marketing words. The underlying models usually fall into one of three buckets.
Classification works when defect types are known in advance and you have labelled examples of each. The model says "this part is defect type A, B or good" and assigns it to one of those classes.
Anomaly detection trains only on good parts and flags anything that looks different, without knowing what kind of defect it is. It is useful when you cannot enumerate every possible defect, which is most real factories. We have a full post on anomaly detection that goes deeper on when each type wins.
Segmentation draws a pixel-level mask around the defect. It is useful when you need to measure defect area, count individual defects or route the part based on where the defect is. Labelling for segmentation is more expensive than the other two approaches.
Most real deployments are a combination. Anomaly detection catches the unknowns, classification sorts the knowns and segmentation handles the cases where you need precise measurement.
What defects does AI visual inspection catch best?
Five defect categories where AI consistently outperforms both humans and rule-based vision:
- Subtle surface defects. Micro-scratches, colour variation, glaze inconsistencies, contamination. Humans tire on these and rules cannot describe "looks off."
- Variable products like natural materials (wood, stone, ceramic), products with intentional variation (hand-finished parts) and parts where every batch looks slightly different.
- Assembly verification questions like is the right bolt there, is the label on straight, are all 12 components present? These are hard to write as rules but easy to show as examples.
- Rare defects that show up once every 10,000 parts. Humans miss them from boredom, rules cannot be written because nobody has seen enough examples and anomaly detection flags them without needing a catalogue.
- Cross-checking against prints or specifications. New models can compare a part against its engineering drawing and flag deviations, which was a research problem as recently as 2023.
And five where AI is not the right tool:
- High-precision dimensional metrology. Calipers, laser scanners and tactile probes still win for micrometre-level measurement.
- Single well-defined defect on a stable product. If you have one rule that works and the product never changes, a rule engine is simpler and cheaper.
- Very low volumes. Under a few hundred parts per shift, a person with good lighting is often faster and cheaper.
- Transparent or mirror-finish parts without specialist lighting. AI struggles with glare the same way humans do. The fix is lighting, not a better model. Our guide to lighting for machine vision covers this in detail.
- Defects that are only visible in non-visible wavelengths. AI works on the image it receives. If the defect only shows up in X-ray, thermal or ultrasound, you need the right sensor first and AI second.
How do you deploy AI visual inspection on a line?
A simple, realistic workflow for a first deployment:
First, you collect 200 to 500 images of good parts and 20 to 200 images of bad parts, ideally spread across shifts, operators and batches. This is the hardest and most underestimated step. If the training data is narrow, the model is narrow.
Second, you label the images. For classification, you tag each image with its defect type. For anomaly detection, you only need the good ones. For segmentation, you draw around the defects. Modern tools do a lot of this semi-automatically.
Third, the model trains. On modern hardware this takes minutes to hours, not days.
Fourth, you deploy. The model runs on an edge device next to the line (fast, offline) or in the cloud (easier to manage, needs connectivity). Both are valid. What matters is that the latency budget fits your cycle time.
Fifth, and the one most teams skip, you monitor and retrain. Products drift, lighting changes and new defects appear. A good AI inspection tool makes retraining a 10-minute job, not a 2-week engineering project. If yours does not, that is the feature gap that will hurt you six months in. Our buyer's guide for visual inspection software walks through the six features that separate tools that age well from tools that do not.
Where Enao Vision fits
We built Enao Vision around anomaly detection first, with classification and segmentation layered on top, because that is the order most SME manufacturers actually need them. Inspection runs on an iPhone at the line, images stay local by default and retraining is a few taps on a tablet. Our founding story explains why we built it this way instead of selling another 80,000 euro smart camera.
How do you know you're ready for AI visual inspection?
Three checks:
You have a defect that costs real money (scrap, rework, customer returns) and your current inspection catches less than you want.
You can collect a few hundred images of the defect without rebuilding your line.
You have someone on the floor, QA or ops, who can spend two hours labelling and running a first training round. Not a data scientist, not a vendor engineer. An actual person on your team.
If all three are true, a pilot deployment in one to two weeks is realistic. If one of them is false, the bottleneck is operational, not technical, and no AI tool will fix it for you.
Frequently asked questions
How accurate is AI visual inspection?
Day-one accuracy on a well-defined defect lands at 80 to 90 percent. After a few weeks of feedback loops on production data, it climbs to 95 to 99 percent. The number you actually get depends on three inputs: lighting, training data and the size of the defect relative to the sensor's pixels. Vendor claims of 99.9 percent accuracy without a defined defect set, training-data size and lighting setup are the most common red flag in pitches. A useful spec quotes accuracy per defect class on a held-out test set.
Can AI visual inspection run on a smartphone?
Yes, for most surface, assembly and presence-or-absence defects on parts above 5 mm. A modern iPhone has a 48-megapixel sensor and a Neural Engine that runs Core ML models at frame rate, so inference happens locally with no internet round-trip. For sub-pixel metrology or production lines above 1,000 parts per minute, dedicated industrial sensors with global shutter still win. Most SME factories sit in the first bucket, which is why Enao Vision runs on iPhone in the first place.
How much training data do I need to start?
Thirty to one hundred good images and ten to fifty bad images per defect class is the usable starting point. You then expand the dataset with production samples in the first weeks of operation. Anomaly detection only needs the good images, which speeds up the first deployment when bad parts are rare. A few hundred images sounds like a lot, but most factories already have them sitting on a phone or a quality-team folder.
How does AI visual inspection differ from anomaly detection?
AI visual inspection is the broader category. It covers any inspection setup that uses machine learning to decide pass, fail or flag from images. Anomaly detection is one model type used inside that category, where the system trains only on good parts and flags anything statistically different. Most real deployments combine anomaly detection (to catch unknown defects) with classification (to label known ones).
Key takeaways
- AI visual inspection runs camera images through a trained model that decides pass, fail or flag in under a second.
- It catches subtle, variable and rare defects that rule-based machine vision and tired human inspectors miss.
- The three model types are classification, anomaly detection and segmentation. Most factories combine them.
- Day-one accuracy on a defined defect lands at 80 to 90 percent and climbs to 95 to 99 percent with retraining.
- A pilot is realistic in one to two weeks once you can collect a few hundred images and have one person to label and retrain.