Industrial AI
Computer Vision in Industrial Quality Control
- Author
- Deploint Engineering
- Published
- Reading time
- 6 min read
- Sections
- 07
Visual inspection is one of the most practical applications of AI in manufacturing. The problem is well bounded, the value of catching defects early is easy to explain and modern models can learn defect types that are hard to describe with rules. Yet many inspection projects stall after a promising pilot. The usual causes are not the model. They are lighting, data, integration with the line and the absence of an operating model once the system is live.
01Begin with the inspection question
Before choosing cameras or models, define the decision precisely. Which defects matter? What is the smallest defect that must be caught? What happens to a rejected part, and what does a false reject cost compared with an escape? How long does the system have to decide before the part reaches the next station?
These answers shape everything downstream. A cosmetic scratch on a visible surface and a crack in a structural weld are different problems with different tolerance for error. Write defect definitions down with quality engineering and collect annotated examples of each, including borderline cases that inspectors disagree on. Disagreement between experienced inspectors is a sign that the definition, not the model, needs work.
02Optics and lighting decide what is possible
A model can only learn what the image shows. Much of what determines inspection performance is settled before any training: sensor and resolution, lens, working distance and, above all, lighting.
- Match lighting to the defect. Low-angle light reveals surface texture and scratches; diffuse light suppresses glare on reflective parts; backlighting shows edges and holes.
- Control ambient light with enclosures. Daylight through a skylight can defeat a model trained under factory lighting.
- Trigger capture from the line, not on a timer, so every part is imaged in the same position.
- Size resolution so the smallest defect of interest spans several pixels, with margin.
- Plan for cleaning. Dust on a lens or a dimming light changes images gradually, which is exactly the kind of drift that goes unnoticed.
An imaging feasibility study, capturing real parts with real defects under candidate setups, is usually the most valuable early investment. If a trained inspector cannot see the defect in the image, a model will struggle too.
03Choosing a modeling approach
Three families of approach cover most inspection problems, and production systems often combine them.
Supervised detection and classification
When defect types are known and examples exist, supervised models that classify parts or locate defects with boxes or segmentation masks are well understood and give interpretable outputs. Their weakness is defects they have never seen.
Anomaly detection
Anomaly detection models learn what good parts look like and flag departures from it. They need few or no defect examples, which suits lines where defects are rare. The trade-off is that they report that something is different, not what it is, and they can be sensitive to harmless variation such as a new supplier's surface finish.
Rule-based machine vision
For dimensional checks, presence and absence, and alignment, classical machine vision remains fast, deterministic and straightforward to validate. There is no reason to replace a reliable measurement with a learned model.
A common pattern uses classical checks for geometry, a supervised model for known defect classes and an anomaly model as a safety net for the unknown.
04Design for three outcomes, not two
Binary pass and fail decisions force the model to be certain when it is not. A sturdier design has three outcomes: confident pass, confident reject and review. Parts in the review band go to an operator, who sees the image with the model's defect overlay and makes the call.
The thresholds that define the review band are business decisions, not just model settings. Setting them requires agreement on the relative cost of escapes and false rejects, and an honest view of how much review capacity the line has. Revisit them as the model improves.
05Deploying at the edge
Inspection decisions usually have to be made within the line's timing window and must continue during network outages, so inference runs on an edge computer at the station. Practical considerations include:
- Optimizing models for the target hardware, for example by exporting to a portable format and quantizing, then measuring latency on the actual device under load.
- Integrating with the PLC for reject signals using the plant's established I/O conventions, with a safe default if the vision system does not respond in time.
- Writing results to the MES against part serial or batch, so inspection data joins the quality record.
- Buffering images and results locally, and synchronizing selected images to central storage for retraining.
- Managing stations as a fleet: versioned deployments, health checks and remote rollback.
06The operating model after go-live
An inspection system is not finished when it goes live. Parts change, suppliers change, cameras age and new defect types appear. Accuracy is maintained by an operating loop:
- Operators confirm or correct review-band decisions at the line, producing labeled data as a by-product of normal work.
- Quality engineers curate new examples into a versioned dataset and keep a fixed benchmark set for comparing models.
- Candidate models are evaluated against the benchmark, approved through change control and rolled out to one station before the fleet.
- Monitoring tracks image statistics, confidence distributions and review rates per station, so drift and camera faults are caught early.
Ownership matters as much as tooling. Someone in quality engineering must own defect definitions and model approvals, and someone in operations must own station health. Without named owners, the loop stops turning and performance erodes quietly.
07A pilot that can scale
Checklist08 checks
Before you scale beyond one station
- 01Defect definitions are written, agreed and illustrated with borderline examples.
- 02An imaging study shows that target defects are visible under the chosen setup.
- 03The system has run in shadow mode alongside manual inspection, with results compared.
- 04Review-band thresholds reflect agreed costs of escapes and false rejects.
- 05Reject signaling has a defined, safe behavior when the vision system is slow or offline.
- 06Results reach the MES with part or batch traceability.
- 07A benchmark dataset and an approval workflow exist for model changes.
- 08Drift and station health are monitored, with named owners for both.
Computer vision inspection works when it is treated as a manufacturing process in its own right, with specifications, controls and continuous improvement, rather than as a one-off model deployment.