By the 5Tech engineering team · Published March 2023 · An educational engineering guide for plant and automation teams. Inspection figures are cited or labelled illustrative; every example is typed (industry example / illustrative), and 5Tech has no published customer results implied here.
AI vision inspection rarely fails because the model can't see the defect. It fails because nobody wrote down what "good" means before deployment, because the lighting drifts by mid-shift, or because a system that flags one good part in twenty gets switched off by an operator who is tired of stopping a healthy line. Machine vision earns its place when you can state acceptance criteria — the precision and recall you need, weighed against the real cost of a false reject versus a missed defect — control the imaging chain that feeds it, and keep the model advisory to the controller rather than wired into the trip. This is a guide for the plant, automation, and quality engineers who have to make those calls.
Start with acceptance criteria, not accuracy
"Accuracy" is close to meaningless on an inspection line, because defects are usually rare. A model that passes everything is 99% accurate on a line with a 1% defect rate — and catches nothing. The two numbers that actually govern an inspection decision are recall and precision:
- Recall — of the parts that are genuinely defective, the fraction the system catches. Low recall means escapes: bad parts reaching the customer.
- Precision — of the parts the system flags as defective, the fraction that really are. Low precision means false rejects: good parts scrapped, and a line stopped for nothing.
You cannot maximize both at once. Moving the decision threshold trades one for the other along a precision–recall curve, so the right operating point is an economic choice, not a technical one. Price the two error types and you can pick it deliberately:
Cost of an escape = warranty / recall / rework downstream + brand and, for safety-relevant parts, liability · Cost of a false reject = scrapped good part + line stop + operator time + eroded trust in the system
A wheel-bolt or airbag component may justify tuning hard for recall — accept more false rejects to let almost nothing escape. A cosmetic trim panel with cheap scrap and expensive downtime may justify the opposite. Write those costs down before choosing a threshold, and make the target explicit — for example, "recall ≥ 99.5% on the defect classes that matter, at a false-reject rate the line can absorb." That sentence, agreed with quality and production, is the specification. Everything else is engineering to hit it.
A system that never lets a defect escape but rejects one good part in twenty can cost more than the defects it was bought to catch.
The imaging chain sets the ceiling — the model only approaches it
The single most common reason an inspection project underperforms is that the team tuned the model while the imaging chain — lighting, optics, part presentation, and their repeatability — was left uncontrolled. No network learns its way around information the camera never captured. If the defect isn't reliably visible in the raw image to a person who knows where to look, the model's job is already lost.
- Lighting is the highest-leverage variable and the most neglected. The geometry (bright-field, dark-field, backlight, dome, coaxial) determines whether a scratch, dent, or edge appears as strong contrast or vanishes. Ambient light bleeding in from a nearby door or a seasonal change in daylight is a classic cause of a model that "worked in the demo" and drifts in production.
- Optics and resolution set the smallest defect you can resolve. A useful discipline is pixels-per-defect: if the minimum defect must span several pixels to be detectable, lens, working distance, and sensor resolution follow from that, not from the camera on the shelf.
- Presentation and repeatability — fixturing, focus, trigger timing, and part-to-part pose consistency — decide whether every image is comparable. Deep learning tolerates more variation than a rule-based tool, but not unlimited variation, and every bit of variation you remove optically is variation the model no longer has to learn from scarce data.
Standardized camera interfaces make this chain buildable from interoperable parts rather than a single vendor's stack. The vision-standards family coordinated through the industry's G3 cooperation — GigE Vision, USB3 Vision, Camera Link, CoaXPress, and the GenICam programming model — is what lets you pair a sensor, cable, and software from different suppliers with predictable behaviour (A3, Association for Advancing Automation).
The imaging chain in practice: fixed-mount camera, controlled lighting, and repeatable part presentation feed an edge inference node, which passes an advisory pass/reject verdict to the line controller.
When rule-based vision beats deep learning
Reaching for a neural network by default is a costly reflex. Classical, rule-based machine vision — thresholding, blob analysis, edge and caliper measurement, template matching, barcode and OCR — is deterministic, needs little or no training data, and is dramatically easier to validate and certify. For a large share of real inspection tasks it is simply the better tool. Deep learning earns its keep when the defect resists explicit specification: variable textures, cosmetic flaws on inconsistent surfaces, or classes you cannot enumerate in advance.
| Consideration | Rule-based / classical vision | Deep-learning vision |
| Best when | Defect is well-defined and measurable: dimensions, presence/absence, alignment, print/label reads | Defect is variable or hard to specify: scratches, stains, cosmetic flaws on varied surfaces |
| Training data | Little or none; you program the rule | Many labelled examples, especially of the rare defects that matter most |
| Explainability & validation | Deterministic and inspectable; straightforward to certify | Statistical; needs a held-out golden set and confusion-matrix sign-off |
| Lighting / presentation | Sensitive; must be tightly controlled | Tolerates more variation, but not unlimited |
| Change management | Edit the rule | Retrain, re-validate, re-approve |
| Compute | Runs on modest hardware | Benefits from GPU/NPU acceleration at the edge |
The two are not rivals. A robust station often uses rule-based tools for part-finding, alignment, and measurement, and reserves deep learning for the judgment call — the cosmetic defect a rule can't capture — so each does what it is good at.
Keep the model advisory to the controller
An inspection model is a source of evidence, not a controller. Where this touches product safety, throughput, or the reject actuator itself, the authoritative decision to accept, reject, or stop belongs to the deterministic control layer — the PLC and any safety controller — with the vision result arriving as an advisory input. This is not a house rule; it is how the field's own information model is written. The OPC UA for Machine Vision companion specification (OPC 40100) describes a vision system as "typically acting under the control and supervision of a machine control system, usually a PLC" — the standard assumes the camera advises and the controller decides.
We deliberately don't re-teach the full control/safety layering here; the short version is that speed and accuracy are not the same as safe. NIST's operational-technology guidance is explicit that real-time timing requirements must be defined, not assumed, and that safety takes priority over availability, integrity, and confidentiality (NIST SP 800-82r3). For an inspection station that means three concrete rules: the model's output passes a validation gate — confidence and range checks — before it is allowed to influence anything; a low-confidence result or a no-read is never a silent pass, but holds the part for manual review or moves to a known-safe state; and the reject actuation stays with the PLC, so a model fault degrades to a controlled hold, not an uncontrolled release.
Reference data flow for a vision inspection station. The AI produces a confidence-scored verdict that passes a validation gate and reaches the PLC as an advisory result over OPC UA; the controller owns the reject actuation, and any low-confidence or no-read result holds the part for review rather than passing it. (Illustrative reference architecture, not a specific installation.)
Deployment is the start of the work, not the end
A model that hit its acceptance criteria on launch day will not stay there. Suppliers change, materials shift shade, a lamp ages, a new defect class appears. Inspection models drift, so re-validation is a standing commitment, and the industrial version is staged and disciplined rather than the casual A/B testing of web apps:
- Shadow mode first — the model runs and logs but does not act, so you can compare its verdicts against the current process before it can stop a line.
- A frozen golden test set with honestly labelled defects — including the rare, imbalanced classes that matter most — as the fixed yardstick every model version must clear.
- Sign-off by a quality or process engineer against the confusion matrix, with change-control records and reproducible, versioned model artifacts.
- Monitoring and rollback — track false-reject and escape rates and image statistics in production; when they move, you need a defined path back to the last approved model while you diagnose.
- Security and lifecycle — signed images, hardware-backed identity, network segmentation, patching, and eventual end-of-life for the node. NIST is explicit that ordinary IT security measures can themselves disrupt OT timing or safety, so treat this as a dedicated OT change-control review, not an IT afterthought.
The vendor edge stacks make the compute side of this tractable — NVIDIA's TAO, DeepStream, and TensorRT on Jetson-class hardware, for instance, cover training, optimization, and low-latency inference at the inspection point. Any throughput or latency figures those vendors publish (frames per second, sub-second detection) are best treated as illustrative, hardware- and model-specific numbers to reproduce on your parts, not specifications for your line.
Make it a number the plant can defend
The justification for an AI inspection cell should be an economic statement, not enthusiasm — and unusually for automation, the dominant risk is on the cost side of the model's own errors:
Annual value = escapes avoided × cost per escape + inspection labour saved + throughput gained − ( false rejects × cost per false reject + cameras/lighting/enclosure + integration + data labelling + re-validation + model maintenance + OT security )
The term that quietly sinks projects is false rejects × cost per false reject. A technically strong model can carry negative value if its false alarms stop a healthy line often enough that operators lose trust and disable it — at which point recall on paper is irrelevant because the system is off. This is why the acceptance criteria, the imaging chain, and the economics are one decision, not three: they all feed the same number.
What to remember
- Write acceptance criteria first: target recall and precision, set by the cost of an escape versus a false reject — not "accuracy."
- The imaging chain (lighting, optics, presentation, repeatability) sets the ceiling; the model only approaches it. Fix the light before tuning the network.
- Prefer rule-based vision for measurable, well-defined defects; reserve deep learning for what genuinely resists explicit rules.
- Keep the model advisory: verdicts pass a validation gate, the PLC owns the reject, and low-confidence or no-read holds the part — never a silent pass.
- Budget for the false-reject cost and a standing re-validation loop; a model people switch off has negative value.
Where to start
Skip the platform search. Take one station and one defect that either escapes today or triggers false rejects today, write down its acceptance criteria and the cost of each error type, control the lighting and presentation, and prove — in shadow mode, on your own parts — that a model moves that number before it is ever allowed to stop the line. One honest pilot on a single station teaches more than any vendor benchmark. If you would like a second set of eyes on the imaging chain, the acceptance criteria, or the control-boundary design, book a free engineering consultation with 5Tech and bring the one defect that is costing you the most.
On the horizon, inspection is standardizing rather than fragmenting: the OPC UA machine-vision companion specification (OPC 40100), first published in 2019 and later extended with a part covering asset management and condition monitoring, is making vision results and device state legible to the rest of the plant in a vendor-neutral way, while the A3/G3 camera-interface standards keep the imaging hardware interoperable. Both trends push the same way: fewer bespoke integrations, more of your effort left for the part that actually pays off — stating what "good" means and proving the system holds to it.
References & further reading
- McKinsey & Company — Smartening up with Artificial Intelligence (2017): the "up to 90% higher defect detection / up to 50% productivity" estimate for image-recognition inspection — a best-case ceiling, cited here with that caveat.
- Interact Analysis via Industrial Safety Review (2026): machine-vision market size, growth, and quality assurance / inspection as the largest application segment.
- OPC Foundation — OPC 40100-1, OPC UA for Machine Vision: vision systems act "under the control and supervision of a machine control system, usually a PLC"; control, configuration, recipe, and result management.
- NIST SP 800-82r3 — Guide to Operational Technology (OT) Security: real-time timing requirements defined not assumed, safety-first priority order, and how IT measures can disrupt OT.
- A3, Association for Advancing Automation — Vision Standards: GigE Vision, USB3 Vision, Camera Link, CoaXPress, and GenICam, coordinated through the industry's G3 cooperation.
- NVIDIA — Industrial defect detection with TAO, DeepStream, and TensorRT: edge training, optimization, and inference tooling; any published throughput/latency figures are hardware- and model-specific.
- Enhanced Vision-Based Quality Inspection: A Multiview AI Framework: peer-reviewed precision/recall comparison of automated versus human inspection under controlled conditions — one study, cited as conditional evidence.
The diagram is an illustrative reference, not a specific installation.
Send 5Tech one workflow, inspection task, sensor problem, robotics challenge, or prototype idea. We will review it and suggest a practical next step. Start My Free First Phase — a free first review of one idea. If it is not practical, we will tell you.