產業導入

Deploying AI quality inspection in manufacturing: from AOI to deep learning

Traditional AOI can identify 'foreign material,' but it can't determine whether something actually is a defect. That's where most production lines get stuck when trying to deploy AI quality inspection. This isn't about smart manufacturing broadly; it focuses on one scenario: quality inspection. From data annotation through model training to line integration, this covers the complete path and identifies the actual obstacles at each step.

By

Tenten AI 交付團隊

產業交付

Published

November 24, 2025

Read time

6 分鐘

AI品檢智慧製造深度學習瑕疵檢測AOI製造業AI導入前線部署工程

One SMT production line was running rule-based AOI. The plant manager's complaint was direct: false positive rates were so high that two operators spent entire shifts in the rework area reviewing rejected parts, while actual defects still reached customers. His question was simple: "Can AI replace this AOI?"

The answer is no and yes. Not a replacement, but a tool for what rule-based systems do poorly. Understanding AI quality inspection starts here.

What AOI handles and what deep learning handles

AOI (automated optical inspection) is fundamentally rule-based matching. You tell it where a component should be, how bright a solder joint should be, what dimensional tolerances apply, and it measures against those rules. For these kinds of problems, it's fast and reliable. But it has limits. Anything that requires judging whether something actually looks like a defect lands in a gray area where you can't write complete rules. Wood grain, fabric patterns, metal surface scratches, color shifts, dirt. The same defect type appears a hundred different ways. A rule-based system can only widen tolerances (which misses actual defects) or tighten them (which creates false positives), and neither solves the problem.

Deep learning addresses this limitation. Instead of requiring people to write rules, it learns what defects look like from large volumes of annotated images.

DimensionRule-Based AOIDeep Learning Defect Detection
Decision basisManually set thresholdsFeatures learned from annotated images
StrengthsPosition, size, presence/absenceAppearance, texture, ambiguous defects
WeaknessesLoses control with many defect variationsNeeds data, compute, annotation cost
Adjustment for false positivesChange parameters, everything shiftsAdd samples, retrain
Implementation speedFastSlow, but much higher ceiling

In practice, most plants use both. AOI does rough screening first, and deep learning handles the ambiguous cases that require rework review. This keeps computational cost focused and avoids replacing all existing equipment at once.

Step 1: Data annotation

Most people assume the hard part of deploying AI quality inspection is the model. It's not. It's the data.

A defect detection model that can go into production typically needs hundreds to thousands of labeled images per defect type. The problem is straightforward: the higher your production line's yield, the fewer defect samples you have. A critical defect might appear just three times a month. The contradiction is real: the data you need most is hardest to find.

There are three ways to source this data. First, mine history: most AOI systems have already stored years of rework-area images. This is readily available data, just not organized. Second, add instrumentation to actively save and categorize images of rejected parts. Only if you cannot get enough should you turn to data augmentation or synthetic defect generation.

Annotation itself has critical pitfalls. Inconsistent definitions are the primary problem: inspector A sees a scratch, inspector B sees a reflection, and the model learns contradictory patterns. Before touching the model, meet with the quality manager to establish an annotation standard. Write down: What counts as a defect? What's the minimum size in millimeters? Are edge cases included? Then calibrate against a few hundred images. Skip this step and all downstream work is wasted.

Step 2: Model training

During training, the key decision isn't which network architecture to choose. It's whether you fear missing defects more than false alarms.

These create a tradeoff. Raise the threshold, you miss fewer defects but false positives increase and rework labor rises. Lower it and the opposite happens. There's no universal answer, only choices. In automotive or medical devices, missing even one defect could trigger a recall; you'd accept more false alarms. Consumer goods work the opposite way: too many false positives slow your line speed. Where to set this line is a business decision made by quality and production together, not a data scientist working alone.

The approach is to generate a precision-recall curve, spread it on the conference table, and have the customer point to their choice: 'If you want to sit at this operating point, your cost is this many extra rework decisions per day.' Stating the tradeoff clearly upfront prevents arguments after launch.

Step 3: Line integration

Getting 99% accuracy on a laptop is not the same as working on a production line.

Cycle time is the first constraint. If your line moves three boards per second, inference must complete in 300 milliseconds. This means deciding whether to compress the model or add an edge GPU. Lighting and fixtures are the second constraint. Training data lit one way and shop floor lighting even slightly different will collapse accuracy. Imaging conditions must be fixed before starting. The third constraint is often overlooked: MES integration. After the model flags a part as NG, what happens next? Does the signal return to the system? Do bad parts auto-reject? Does the data feed into reports? Without this wiring, AI is just an expensive display.

The fourth constraint is people. Whether operators trust the system determines whether it gets used or bypassed. Real examples: systems with strong accuracy numbers got quietly disabled three months after launch because the review interface wasn't designed well. The loop after go-live matters most: model makes a call, operators correct it if needed, corrected data feeds back to retrain. This continuous feedback drives yield improvements over time, not the launch-day number.

Deploying AI quality inspection is not about buying software. It's about getting data, models, equipment, and workflows aligned on the same production line. This requires engineers embedded on-site, staying with the line until launch and staying until the people running it will actually use it. A good demo doesn't count. Results happen when someone on the floor is using it and yield is moving.

One stuck workflow
is enough to begin

Tell us what the team does today, where it breaks down, and what a better working day should look like.