Quality Control and Automation

The Role of Artificial Intelligence in Industrial Quality Control: A Case Study

A clearly hypothetical walk-through of adding AI inspection to a production line, with made-up numbers to show the steps, trade-offs and cautions involved.

On this page
  1. Read this first
  2. The imagined situation
  3. Step 1: Establish a baseline
  4. Step 2: Fix the imaging
  5. Step 3: Collect and label examples
  6. Step 4: Train and test on separate data
  7. Step 5: Run in shadow mode
  8. Step 6: Weigh the trade-off
  9. Step 7: Go live carefully, then keep watching
  10. What this example does and does not show

Read this first

Everything below is a hypothetical illustration. The plant, the product, and every number are invented to show how an evaluation might be reasoned through. None of it is a real result, and real lines will differ, sometimes a lot. Treat it as a way to understand the steps, not as evidence of what AI inspection achieves.

The imagined situation

Picture a small plant that makes plastic housings for consumer devices. Parts come off a molding machine and move along a conveyor to a station where two people look for visible defects: scratches, short shots (incomplete filling), flash (thin excess plastic at the edges) and discoloration. At the end of a shift, supervisors notice that customers occasionally report cosmetic defects that slipped through, and inspectors say the work is tiring near the end of a shift.

The plant considers adding a camera-based inspection system using a trained model. The goal is not to remove people but to make the visual check more consistent. The general technique is described in the article on AI quality inspection.

Step 1: Establish a baseline

Before changing anything, the team measures what the current process does. In this invented example, a shift produces 10,000 parts. A careful audit of the output, reviewed by several experienced people, concludes that about 2% are truly defective, which is 200 parts.

The audit also estimates that the manual inspection catches about 80% of those defects. That gives:

  • defects caught: 200 x 0.80 = 160
  • defects escaping to customers: 200 - 160 = 40

These figures are made up. In real life, estimating the true defect rate is hard, and many teams find it takes a significant effort.

Step 2: Fix the imaging

The team installs a camera with controlled lighting in an enclosure to block ambient light. They test whether each defect type is actually visible in the images. Flash shows up clearly, but a faint discoloration does not under the first lighting setup, so they adjust the angle and color of the light. This stage often takes longer than expected, because a model cannot detect what the images do not show.

Step 3: Collect and label examples

Over several days, the line saves images. Experienced inspectors label them, using a written defect guide so that borderline cases are judged the same way. Disagreements are discussed, and the guide is updated. Rare defects are a concern, so the team deliberately sets aside time to collect more examples of those.

Step 4: Train and test on separate data

A portion of the labeled images is kept aside and not used in training. The model is evaluated on that held-out set, and then again on a fresh batch from a different day.

Step 5: Run in shadow mode

For a trial period, the system makes decisions but does not control the reject gate. People continue inspecting as usual, and the system’s calls are compared against theirs. Suppose, on one invented shift of 10,000 parts, the comparison shows:

  • defects caught by the model: 200 x 0.95 = 190, leaving 10 missed
  • good parts wrongly flagged: 9,800 good parts x 0.01 = 98

(There are 9,800 good parts because 200 of the 10,000 are defective.)

Step 6: Weigh the trade-off

On those invented numbers, the model misses fewer defects than the manual check (10 versus 40) but flags 98 good parts. Whether that is acceptable depends on costs. If a defective part reaching a customer is expensive and a good part sent for re-inspection costs little, the trade may be worthwhile. If flagged parts are scrapped without review, the 98 may be a real loss.

A common compromise is to have the system flag suspect parts to a person at the station instead of rejecting automatically. A reviewer then confirms or overrides. That reduces the cost of false alarms while still benefiting from the consistent first pass.

The threshold can also be changed. A stricter setting would likely catch more defects and flag more good parts; a looser one would do the opposite. In practice the team would test several settings and see how each performs on held-out data.

Step 7: Go live carefully, then keep watching

Before relying on the system, the plant would document the validation and train operators on what to do when the system flags a part. After launch:

  • a sample of accepted parts is periodically checked by a person
  • flagged and overridden images are saved
  • changes to resin, mold, lighting or camera trigger a re-check of performance
  • cameras and lights are cleaned and maintained on a schedule

If a new defect type appears, the model may not recognize it, which is why human checks continue.

What this example does and does not show

It shows a typical order of work: baseline, imaging, labeling, held-out testing, shadow mode, threshold choice and monitoring. It also shows that two kinds of error exist and must be weighed together.

It does not show that AI will reach any particular catch rate on a real line. Real outcomes depend on the product, defects, imaging, data quality and discipline in running the trial. Anyone planning a project should involve qualified engineers and quality staff, follow the equipment documentation and applicable regulations, and treat vendor claims, or any numbers in an illustration like this one, as things to verify on their own line.

The complete guide to quality control and automation

The Role of Industrial Automation in Enhancing Quality Control
Read the guide

Keep exploring

Guides from other topics

All topics →