Two approaches to automated visual inspection
Defect complexity, not release date, governs the choice between rule-based machine vision and neural-network-driven computer vision in automated quality control.
Rule-based machine vision uses fixed camera positions, controlled lighting, and deterministic algorithms (edge detection, blob analysis, template matching) to detect defects. It is fast, predictable, auditable, and fails completely on defects it wasn’t programmed to find.
AI-based visual inspection uses trained neural networks to learn defect representations from labelled examples. It handles novel defect types, tolerates lighting variation, and generalises across product variants — but requires validated training data that matches production variability.
When each approach wins
| Criterion | Rule-based machine vision | AI-based inspection |
|---|---|---|
| Defect types | Known, geometrically definable (scratch length > 2mm, hole diameter ± 0.1mm) | Complex, variable, texture-based (surface anomalies, discolouration, cosmetic defects) |
| Setup effort | Days to weeks (lighting + algorithm tuning) | Weeks to months (data collection + labelling + training + validation) |
| False positive rate | Near-zero when properly tuned | 1–5% typical (observed-pattern across our manufacturing engagements; not a benchmarked rate), requires ongoing calibration |
| Adaptability to new products | Requires reprogramming per product variant | Requires retraining or fine-tuning (hours to days with sufficient data) |
| Auditability | Fully deterministic — same input always produces same output | Probabilistic — confidence scores vary, edge cases exist |
| Regulatory acceptability | High (deterministic, documentable) | Variable (requires validation documentation per regulatory framework) |
Training data must span the full range of production variability—material batches, ambient conditions, wear states—or learned models will flag novel-but-acceptable parts as defects. That “matches production variability” requirement is where most deployments underperform: models trained on a few hundred defect images from a controlled sample run degrade when production introduces lighting drift, material batch variation, or conveyor speed changes that shift the image distribution. This is an observed pattern across our deployments, not a property of any specific framework — PyTorch, TensorRT, or ONNX runtimes will all faithfully execute a model that no longer matches its input distribution.
Hybrid approaches outperform pure plays
Hybrid architectures that route simple checks to deterministic algorithms and reserve learned models for texture grading or novel-defect screening consistently outperform single-technology deployments, as detailed in our comparison of machine vision and computer vision for manufacturing inspection. Hybrid deployments use rule-based vision for geometric tolerances (measurable, auditable) and AI-based vision for cosmetic defects (variable, learned) — running both pipelines on the same camera feed with separate pass/fail logic. We see this pattern regularly when teams need the auditability of deterministic measurement on safety-critical features and the flexibility of learned models on cosmetic surfaces in the same line.
The capital investment for AI-based inspection equipment includes not just the camera and compute hardware (often a CUDA-capable inference box or a TensorRT-optimised edge appliance), but the ongoing cost of maintaining the training dataset, revalidating after product changes, and monitoring for accuracy drift — costs that rule-based systems do not incur. Procurement decisions that ignore this maintenance tail tend to underbudget the AI-based path by a factor that only becomes visible after the first product revision. Our Computer Vision R&D practice page covers how to budget for that maintenance tail before the procurement decision is made.