Manual visual inspection doesn't scale past a certain line speed, and human inspectors fatigue in ways cameras don't. For a multi-plant manufacturing client running high-speed production lines, the goal was a vision system that could catch sub-millimeter defects at full line speed without becoming the bottleneck itself.
Why This Is Harder Than a Standard Classifier
Off-the-shelf defect classifiers tend to fall apart in production for a few consistent reasons:
- Class imbalance โ genuine defects are, by definition, rare, which starves a naively trained model of positive examples
- Lighting and surface variation โ the same defect looks different under different lighting, camera angles, and material finishes across plants
- Latency constraints โ a model that can't keep up with line speed forces a choice between slowing the line or skipping inspection, neither acceptable
Architecture
The system runs inference at the edge, next to the line, rather than routing frames to a central cloud service:
- Edge inference nodes co-located with each camera, running a lightweight but accurate segmentation model tuned per station
- Synthetic defect augmentation during training to address class imbalance, generating realistic defect variations on top of a small set of real labeled defects
- Active learning loop โ low-confidence predictions are routed to human reviewers, and their labels feed back into the next training cycle rather than sitting unused
- Central aggregation layer that rolls up plant-level quality metrics for engineering and operations teams, without adding inspection latency
Handling Plant-to-Plant Variation
A model trained on one plant's data degraded meaningfully when deployed to another โ different camera hardware, different ambient lighting, different material batches. We addressed this with per-plant calibration: a short fine-tuning pass on a small local dataset before a model goes live at a new site, rather than assuming a single global model would generalize cleanly.
Results
Across the deployed lines, the system reached 99.2% defect detection accuracy while processing roughly 50,000 parts per hour, with false-positive rates low enough that the system didn't require constant human override to keep the line moving.
Lessons Learned
- Synthetic data closed the class-imbalance gap faster than waiting to accumulate more real defect examples
- Edge deployment was non-negotiable โ even modest network latency to a central cloud service was enough to break real-time inspection at full line speed
- The active learning loop mattered more than any single architecture choice โ a static model degrades as materials, lighting, and product variants change over time