Book a free call

AI for Quality Control: How Checks Catch Defects Early

AI quality control checks every item against a standard using cameras, sensors and data rules, catching defects a sample check would miss. Here is how it works.

Hertiv engineering teamReviewed by a senior engineer
6 min read
AI for Quality Control: How Checks Catch Defects Early
On this page

Short answer

AI for quality control is the use of machine learning and computer vision to check products, parts and documents against a standard and flag anything that does not match. Instead of inspecting a sample by eye, the system checks every item, records what it found, and routes defects for review. It works across factories, food lines, pharma packaging and electronics, wherever the same check runs thousands of times a day.

What is AI for quality control?

AI for quality control is the use of machine learning and computer vision to check products, parts and documents against a standard, and to flag anything that does not match. Instead of a person inspecting a sample by eye, the system checks every item and records what it found.

The checks take several forms. A camera watches the surface of a part for cracks, scratches or missing pieces. Sensors measure weight, temperature or pressure and compare the readings with the range a good product should show. Software checks documents and data for missing fields, wrong codes or values outside the expected range.

Check method What it watches Where it is used
Visual inspection Surface defects, marks, missing parts Electronics, food, pharma
Sensor checks Weight, temperature, pressure Bottling, chemicals, filling lines
Data checks Missing fields, wrong codes Forms, labels, records
Sound checks Unusual vibration or noise Motors, bearings, pumps

The point is coverage and consistency. A person gets tired and misses things late in a shift; a model checks the thousandth item the same way it checked the first. For the manufacturing deep dive, see AI quality control in manufacturing.

How does AI check quality?

AI checks quality by comparing each item with a learned picture of what a good one looks like. The system is shown many examples of good and bad items, and it learns which features separate the two groups.

In a vision check, a camera photographs the item and the model marks the regions that look wrong, such as a crack, a stain or a missing label. In a sensor check, the model watches a stream of readings and flags values that drift from the normal pattern, even when no single reading is out of range.

The third pattern is comparison against a reference. The system holds a golden sample, a drawing or a specification, and measures how far each item sits from it. Anything beyond the agreed limit is flagged, and the reason is recorded so the line team can trace it back to a machine, a batch or a supplier.

None of these checks replaces the standard itself. The team still defines what counts as a defect, how strict the limit is and what happens to flagged items. AI only applies those rules faster and more evenly. Computer vision development covers how the camera and model side is built.

Where does AI quality control fit best?

AI quality control fits best where the volume is high, the defect is visible or measurable, and the cost of a missed defect is real. It is weakest where judgement is subjective, such as whether a colour looks right to a customer.

Industry What AI checks Why it fits
Electronics assembly Solder joints, missing parts Tiny parts, high volume
Food processing Pack seals, labels, foreign objects Speed and hygiene
Pharma packaging Batch codes, seal integrity Traceability rules
Automotive parts Surface finish, dimensions Safety and recall cost

The common thread is repetition. If the same check runs thousands of times a day, a model pays for itself quickly. If the check runs once a week and needs taste or judgement, a person is usually the better tool.

How do teams measure whether the checks work?

Teams measure quality checks with two numbers: how many bad items slip through, and how many good items are wrongly flagged. Both matter, because a check that catches everything by rejecting half the good output is not a working check.

The usual measures are the escape rate, the share of defective items that reach the customer, and the false reject rate, the share of good items flagged by mistake. Teams track both over time and set a target for each, such as fewer than 1 in 1,000 escapes and fewer than 2 in 100 false rejects.

Sampling still has a role. A small set of items is checked by hand each day and compared with the AI verdict, which catches drift early. If the hand check and the model disagree often, the model needs retraining or the lighting and camera setup needs a look. This is the same discipline that quality management teams use across the whole system, as AI in quality management explains.

What data and setup does it need?

An AI quality check needs examples of good and bad items, labelled by people who know the product. A few hundred labelled images is a common starting point for a vision check; rare defects need more examples, because the model must see a defect often enough to learn it.

The physical setup matters as much as the data. Cameras need steady light, a fixed distance and a clean background, or the model will learn the lighting instead of the product. Sensors need calibration, and the line needs a way to remove flagged items without stopping the whole run.

Teams also need a feedback loop. Every flagged item should be reviewed and the verdict recorded, so the model can be retrained on its mistakes. Without that loop, accuracy drifts and nobody notices until a customer complains.

How do you start with AI quality control?

You start with one check on one line, prove it works, and then extend it. A small pilot avoids the cost of automating a check that turns out to be the wrong one.

  1. Pick one defect that costs money. Mislabelled packs, cracked parts or bad seals are good candidates.
  2. Collect labelled examples. Gather images or readings of good and bad items, labelled by someone who knows the product.
  3. Set up the camera or sensor. Install it in the real line conditions, not in a clean test room.
  4. Run it beside the existing check. Compare the model with the manual check for two weeks before changing anything.
  5. Agree the limits. Decide what counts as a defect and what happens to flagged items.
  6. Put a human review step in place. Log every verdict so the model can be retrained on its mistakes.

Keep the manual check running until the model beats it on both measures, escapes and false rejects. Only then should the manual check step back to a sampling role.

Example (hypothetical): a food line checks every pack

Example (hypothetical): a food packing line fills 10,000 packs a day. The seal defect rate is 0.5 percent, which means 10,000 times 0.005 gives 50 packs with a bad seal each day.

Before AI, inspectors sampled 200 packs a day and caught about 1 bad seal, since 200 times 0.005 is 1. The other 49 bad packs shipped. After adding a vision check, the system inspects all 10,000 packs and catches 48 of the 50, leaving 2 escapes a day.

The check also flags 100 good packs a day by mistake, a false reject rate of 100 out of 10,000, or 1 percent. Those packs are rechecked by hand in about 30 minutes a day, which is far cheaper than the cost of shipping faulty packs and handling the complaints they cause.

What are the common mistakes?

The most common AI quality control mistakes are checking the wrong defect first, training on clean lab images, and letting flagged items pile up without review.

  • Checking the wrong defect first. Pick the defect that costs money, not the easiest one to photograph.
  • Training on clean lab images. The model must learn the real line, with its light, dust and vibration.
  • No human review of flagged items. Unverified flags become noise and staff stop trusting the system.
  • Ignoring false rejects. A check that rejects good output wastes money as surely as one that misses defects.
  • Skipping retraining. Products, packaging and suppliers change, and the model must follow.
  • No traceability. A flag without a batch, machine and time cannot be fixed.

Key takeaways

  • AI quality control checks every item against a standard, not just a sample
  • Vision, sensors and data checks cover different kinds of defect
  • Track escapes and false rejects separately; both numbers matter
  • A human review loop and retraining keep the model honest
  • Start with one costly defect on one line and prove the check beats the manual one

Frequently asked questions

Does AI quality control replace human inspectors?

No. It replaces the repetitive first pass, checking every item the same way. Humans still review flagged items, judge edge cases and decide what counts as a defect. The usual result is fewer inspectors doing higher-value work, not none at all.

How many labelled images does a vision check need?

A few hundred labelled images is a common starting point for one defect type. Rare defects need more examples, since the model must see a defect often enough to learn it. Synthetic defects can help when real examples are scarce.

What is a good escape rate for an AI quality check?

It depends on the product and the cost of a defect reaching a customer. Many teams aim for fewer than 1 escape in 1,000 items, with a false reject rate under 2 in 100. Set both targets before you start, not after.

Can AI quality control work on a slow or small line?

It can, but the case is weaker. The saving comes from volume: the same check thousands of times a day. On a small line, sampling by hand may be cheaper and more flexible.

What happens to items the AI flags?

They go to a review station where a person confirms the verdict. Confirmed defects are removed or reworked, and false rejects go back to the line. Every verdict is logged so the model can learn from its mistakes.

Does AI quality control need new cameras and lighting?

Usually yes, at least for vision checks. Steady light, a fixed distance and a clean background matter more than camera price. A good setup with an ordinary camera beats a costly camera in bad light.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning AI checks for your production line? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Computer Vision service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call