# AI on the factory floor: vision inspection and predictive quality
A single spot weld failure on a body-in-white line can trigger a warranty claim years later, when a customer hears a rattle or, worse, when a structural joint underperforms in a crash. The body-in-white (BIW) is the welded steel or aluminum shell of a car before paint, doors, and trim go on. A typical passenger vehicle has 3,000 to 5,000 spot welds holding that shell together. Miss a bad one, and the cost does not stay on the factory floor. It follows the car for a decade.
This lesson walks that weld line and shows where computer vision now catches defects human inspectors miss, then does the math on why it pays.
Picture the weld station. Robots fire spot welds at a rate of roughly one every few seconds. A human quality inspector cannot check every weld on every body. So plants have traditionally used sampling: pull one body per shift, cut it apart (a destructive test called a teardown), and inspect the weld nuggets under magnification.
The problem is obvious once you say it out loud. You destroy a good car to learn about welds that already happened, and you learn nothing about the thousands of bodies in between.
Common defects the line worries about:
A human on a moving line, under factory lighting, catches the big ones. The subtle ones, a nugget that is 10 percent undersized or a hairline crack, are exactly what slips through.
Computer vision is AI that interprets images the way a trained inspector does, but on every part, every second, without fatigue. On a modern weld line it typically works like this:
1. Cameras (often paired with structured-light or laser sensors that add 3D depth) capture each weld or panel.
2. A trained model classifies the image: pass, or a specific defect type.
3. Out-of-spec parts get flagged in real time and routed for rework before the next station adds value on top of a bad joint.
The model is usually a convolutional neural network (CNN), a type of AI well suited to finding visual patterns. It learns from labeled examples: thousands of "good weld" and "bad weld" images that quality engineers tag.
The shift is from sampling to 100 percent inspection. Every weld, every body, checked. That is the thing humans physically cannot do and AI can.
🎬 [VIDEO: "Deep Learning for Automated Optical Inspection" — youtube.com — how vision models are trained to spot manufacturing defects on production lines]
Factories have used machine vision for decades, but older systems were rules-based: "flag anything darker than threshold X in region Y." Those break the moment lighting shifts, a panel reflects differently, or a new part variant appears.
Modern deep learning models generalize. Show them enough examples of acceptable variation (different lighting, slightly different panel finishes) and they learn what actually distinguishes a defect from normal noise. That is why vision inspection scaled across automotive in the last several years: the models finally tolerate the messiness of a real plant.
For a solid primer on the underlying methods, the NIST guidance on AI in manufacturing is a free, credible starting point.
Catching a defect is good. Predicting it before it happens is better.
Predictive quality uses the same data streams plus process data (weld current, electrode force, cycle time, electrode wear count) to forecast when quality will drift. If electrode wear correlates with undersized nuggets, the model flags the electrode for replacement before it starts producing bad welds.
This connects to predictive maintenance, the practice of servicing equipment based on its actual condition rather than a fixed calendar. The two reinforce each other: healthy equipment produces fewer defects, and defect trends reveal equipment problems.
Here is the logic in simplified pseudocode:
# Flag welds AND predict electrode replacement
for weld in production_line:
prediction = vision_model.classify(weld.image) # pass / defect_type
if prediction != "pass":
route_to_rework(weld)
log_defect(weld, prediction)
# Predictive layer: watch the trend, not just the part
recent_defect_rate = rolling_defect_rate(weld.electrode_id)
if recent_defect_rate > threshold:
schedule_electrode_change(weld.electrode_id) # act before failureThe point is not the code. It is that the same image data doing pass/fail inspection also feeds a trend that triggers maintenance. One data stream, two payoffs.
Now the part MBAs care about. Why fund this?
Two savings buckets:
1. Yield and rework. Catching a defect at the weld station means fixing one joint. Catching it after paint, trim, and final assembly means tearing down a nearly finished car or scrapping it. In manufacturing this is the classic escalating cost of a defect: the later you catch it, the more value you have already added on top of it.
2. Warranty and recall avoidance. A structural defect that ships can become a warranty claim or, in a worst case, a safety recall. Recalls are enormously expensive, and automotive recall data is public through the NHTSA recalls database if you want to see the scale.
Let us build a simple, transparent model. These are illustrative assumptions, not real company figures. Use them as a template and plug in your own plant's numbers.
Assume:
Annual cost of late defects, baseline: 1,000 x $800 = $800,000.
With vision, 700 defects now caught early at $50 (cost $35,000) and 300 still escape at $800 (cost $240,000). New total: $275,000.
Estimated gross annual saving: about $525,000 on this line alone, before counting avoided recalls, which are lumpy but can dwarf everything else.
Against that, weigh the cost: cameras and sensors, integration, the model training effort, and ongoing labeling and monitoring. A single-line vision deployment is often in the low-to-mid six figures to stand up, plus recurring cost. On the numbers above, payback lands inside a year or two, which is why these projects clear capital committees.
The honest caveat: your escape rate, blended cost, and catch rate are the swing variables. Get those from your own quality data before you promise a number.
Vérification des acquis
1. What is the fundamental limitation of the traditional teardown sampling approach to weld inspection?
2. Why is a spot weld defect described as a cost that 'follows the car for a decade' rather than staying on the factory floor?
3. Why is computer vision particularly well-suited to replace or augment human inspection of spot welds?
4. Select ALL correct answers. Which of the following are defects that a weld line is concerned about?
Sélectionnez toutes les réponses correctes.
5. Select ALL correct answers. Which statements accurately contrast subtle versus obvious weld defects and their detectability?
Sélectionnez toutes les réponses correctes.
The math looks clean. Deployment is not. The recurring failure modes:
Bad labels, bad model. The model is only as good as the "good" and "bad" examples engineers tag. If your best inspectors disagree on borderline welds, the model inherits that confusion. Invest in a clear labeling standard first.
Data drift. A new steel supplier, a different coating, a fresh camera angle after maintenance, any of these can shift the images enough that a once-accurate model degrades. Someone has to monitor performance and retrain. This is an ongoing job, not a one-time install.
False positives erode trust. If the system flags too many good welds, operators start ignoring it, and you have bought expensive cameras that everyone tunes out. Tuning the pass/fail threshold is a business decision: the cost of missing a defect versus the cost of unnecessary rework.
Integration with the MES. The Manufacturing Execution System (MES) is the software that tracks production. Vision results have to flow into it so a flagged body actually gets pulled and traced. A model that flags defects into a spreadsheet nobody reads changes nothing.
In practice, success needs three groups aligned: quality engineering (defines what a defect is), manufacturing/operations (owns the line and the response), and a data/AI function (builds and maintains the model). The projects that stall are usually the ones handed to one group alone. The non-technical leader's job is to make sure all three are in the room from day one.