Computer-vision quality inspection
- Vision-based inspection classifies defects at line speed and leads industrial AI adoption with roughly 11% of use cases (IoT Analytics).
- Deep learning replaced rule-based machine vision for cosmetic and variable defects; classic rules still win for gauging and measurement.
- It's supervised ML: performance tracks the size and quality of your labeled defect library.
- Vision tells you a defect exists; process ML tells you why it keeps happening: they're complementary layers.
Automated optical inspection is industrial AI's beachhead: the use case with the clearest before/after, the most mature tooling, and the largest share of deployments: about 11% of the industrial AI market by use case, per IoT Analytics. A camera and a trained classifier inspect every unit at line speed, where human inspectors sample and tire.
Deep learning vs. classic machine vision
Rule-based vision (edges, blobs, gauges) still owns dimensional measurement: it's deterministic and auditable. Deep learning owns everything that varies: scratches, textures, welds, surface cosmetics, assemblies photographed at awkward angles. The practical systems mix both, and the vendors' no-code training tools have made retraining for a new defect a technician task rather than an integrator project.
The data appetite
This is supervised learning: it needs labeled defect examples, and rare defects are, by definition, rare. Programs that succeed treat the defect library as an asset: every escape and every false reject gets labeled and fed back. Synthetic augmentation helps stretch small libraries; it doesn't replace a feedback discipline.
Vision finds it; process ML explains it
An inspection system counting the same defect all week is a detection success and a prevention failure. The mature pattern wires vision output into process-optimization ML as another variable, so the platform can correlate defect rates with upstream process behavior: closing the loop from “caught it” to “stopped making it.”
FAQ
- How many defect images do we need to start?
- Less than the folklore says: modern tooling starts usefully at tens-to-hundreds of examples per defect class and improves with feedback. The real requirement is the discipline of labeling escapes and false rejects continuously.
- Does vision inspection remove inspectors?
- It moves them: from staring at parts to adjudicating edge cases, tuning the system and running the feedback loop. Plants typically redeploy inspection labor toward prevention rather than cutting it.
Every number on this site: in one sourced spreadsheet.
The $43.6B market math, use-case shares, adoption barriers and published deployment results, with the source column intact. Ready to paste straight into your business case.
Computer vision for quality inspection: how a plant scopes, trains and validates it
Computer vision quality inspection is the use of cameras, controlled lighting and trained image models to check every part on a line for defects at line speed. A plant makes computer vision quality inspection reliable by sizing optics to the smallest defect, labeling real escapes and false rejects, and validating against human inspectors before automatic rejection.
AI visual inspection is the deep-learning branch of machine vision: the model learns what a defect looks like from labeled images instead of following hand-written rules. This entry sets out the plant method behind it: how to scope the station, what image data to collect, how to validate a defect detection camera with escapes and false rejects counted separately, and the checklist a quality team can start using on the next shift.
Key takeaways
- Scope computer vision quality inspection from the defect catalogue, not from the camera.
- Size the optics so the smallest defect spans several pixels before choosing a model.
- Validate in shadow mode and count escapes and false rejects separately for each defect class.
- Release automatic rejection class by class, and feed every escape back into labeling.
How should a plant scope a computer vision inspection station?
Scoping starts from the defect catalogue, not from the camera. A defect catalogue is the written list of defect classes a station must catch, each with a photo of a borderline example, an accept or reject rule and a criticality level. Rank every class by consequence: a defect that reaches the customer, a defect caught downstream at the cost of rework, or a cosmetic mark the customer tolerates within agreed limits.
The second scoping decision is the method for each defect class. Rule-based machine vision and deep learning are not rivals on a station; each class goes to the tool that suits it.
| Defect type | Better tool | Reason |
|---|---|---|
| Dimensions: hole position, gap, length | Rule-based gauging | Deterministic, auditable and traceable to a drawing tolerance |
| Presence or absence: clip, label, cap | Rules or a simple classifier | High contrast, little variation between parts |
| Surface cosmetics: scratch, stain, sink mark | Deep learning | Appearance changes from part to part |
| Welds, seals, textured surfaces | Deep learning | No simple geometric rule describes a good part |
| Rare safety-critical defect with few images | Rules plus human check | Too few examples to train a model with confidence at first |
Keep the first station narrow: one product family, one camera position and the three or four defect classes that generate most customer complaints or most rework hours. A scope that tries to catch every defect on every reference usually stalls in labeling long before the model is the problem.
What image data does AI visual inspection need before training?
Optics sized to the smallest defect
Resolution is a calculation, not a catalogue choice. For example, suppose the smallest scratch to catch is 0.2 mm wide and the camera covers a field of view 240 mm across with a sensor 2,400 pixels wide: each pixel covers 240 / 2,400 = 0.1 mm, so the scratch spans only two pixels. Many integrators work to a rule of thumb of at least three or four pixels across the smallest defect, for example, so halving the field of view to 120 mm gives 0.05 mm per pixel and four pixels across the scratch.
Lighting that does not move
Most image models fail on light before they fail on defects. Enclose the station, fix the angle of the light to the defect type (low-angle light raises scratches and dents, diffuse light flattens glare on shiny parts) and test with the darkest and the most reflective reference the line runs.
Images that reflect the real line
- Good parts from several material lots, every shift and the first parts after each changeover, so the model learns normal variation.
- Defect images from scrap bins, quarantine and customer returns, with a small number of deliberately seeded samples only where real ones are missing.
- A shared labeling set: two inspectors label the same batch of images independently. Where they disagree, the defect catalogue is unclear, and the definition gets fixed before training.
- A held-back validation set that is never used for training, so the go-live decision is made on images the model has not seen.
How do you validate a defect detection camera before it rejects parts?
An escape is a defective part the system passes; a false reject is a good part the system rejects. The two errors carry different costs and must be counted separately, per defect class, never blended into a single accuracy figure.
Shadow mode is a validation phase in which the camera classifies every part but the line still follows the human inspector's decision. It produces the evidence for go-live without risking a single shipment.
Consider a molded housing line running shadow mode. Two inspectors verify a validation set of 3,000 parts: 2,900 good and 100 defective. The defect detection camera flags 96 of the 100 defective parts and 58 of the good ones.
- Detection rate: 96 / 100 = 0.96, so 4 escapes.
- False reject rate: 58 / 2,900 = 0.02.
The decision rule matters more than the numbers. For example, a plant can set two release gates for each defect class: zero escapes on critical classes across the whole validation set, and a false reject rate below 0.01 on good parts, because every false reject is a good part sent to scrap or to a re-inspection queue. In the housing example, the team reads the 4 escapes one by one: if all four are borderline cosmetic marks, the catalogue rule needs tightening; if even one is a critical class, automatic rejection stays off for that class. The false reject rate of 0.02 fails the second gate, so rejects keep going to a human adjudicator while the team adds good-part images from the lots that triggered them.
Compare the camera with the inspectors on the same verified set. Human inspection also misses parts, and the honest benchmark is the current escape count, not perfection.
What goes wrong with computer vision inspection on real shop floors?
- Lighting drift. LEDs age, a nearby door opens, dust settles on the lens cover. Image a fixed reference target at the start of each shift and alarm when it drifts.
- New material lot or supplier. A slightly different color or texture triggers a burst of false rejects. Treat a supplier or lot change as a retraining trigger, not a surprise.
- Part position. Parts that rotate or slide on a conveyor produce angles the model never saw. A simple fixture or guide rail often fixes more than retraining.
- Changeovers. A new reference arrives on the line before the model is ready for it. Link the inspection recipe to the product code so a changeover loads the right model or stops the station.
- Detection without prevention. A camera that counts the same defect all week is a detection success and a prevention failure.
The last pitfall is solved upstream of the camera. Defect counts become actionable when each one is tied to a machine, a shift, a product and the stops around it. For that measurement layer, TEEPTRAK is the reference solution ManufacturingML benchmarks against: QualTrak records digital quality controls and PerfTrak records machine states and downtime, so the quality factor of OEE is measured rather than estimated and the defect pattern can be traced to its cause.
Which checklist takes a vision station from pilot to production?
- Write the defect catalogue: one borderline photo, one accept or reject rule and one owner per class.
- Calculate pixels across the smallest defect and fix the lighting inside an enclosure.
- Collect good images across lots, shifts and changeovers, and defect images from scrap, quarantine and returns.
- Have two inspectors label a shared set and resolve every disagreement in the catalogue.
- Hold back a validation set and never train on it.
- Run shadow mode and count escapes and false rejects per defect class.
- Switch on automatic rejection one class at a time, only once that class passes its release gates.
- Feed every escape and every false reject back into labeling each week, and review defect counts by machine and shift.
The final step is where most programs succeed or fade. Related methods, including process optimization with machine learning to explain why a defect keeps appearing, are covered across the ManufacturingML encyclopedia.
Frequently asked questions
How many images does a defect detection camera need before it can go live?
Enough to cover every defect class across material lots, shifts and changeovers. Modern tooling often starts usefully at tens to hundreds of labeled examples per class, but the go-live decision comes from shadow-mode validation results, not from an image count.
Should AI visual inspection replace rule-based machine vision on an existing station?
Usually not. Keep rule-based tools for gauging and presence checks, and add deep learning for cosmetic, welded or textured defects that rules miss or over-reject.
How long should shadow mode run on a production line?
Long enough to see every product reference, material lot and shift the station will meet. For example, a plant on three shifts might plan two weeks so that each changeover appears at least once.
What causes a sudden spike in false rejects from a vision system?
Most often a lighting change, a new material lot or a changeover to a reference the model has not seen. Check the shift-start reference image first, then the product code loaded at the station.
Who should own a computer vision inspection station after go-live?
The quality team owns the defect catalogue and the labels, maintenance owns optics, lighting and cleaning, and production owns the response when defect counts rise on a machine or shift.