Perimattic
How AI Defect Detection Works on a Production Line
ManufacturingAI

How AI Defect Detection Works on a Production Line

5 min read
AI#Intellyx

Key Takeaways

  • Machine vision turns images into repeatable inspection decisions at a defined point in the process.
  • The camera is only one part of the system: optics, lighting, part presentation, trigger timing, model training, and reject handling all matter.
  • A model must be tested on representative good and defective parts, including variation across shifts, suppliers, finishes, and operating conditions.
  • AI inspection supports quality teams; escalation and human review remain important for borderline cases and changing processes.

A plain language look at cameras, lighting, model training, inspection decisions, and the human checks that make a vision system useful.

Workers in blue uniforms at an assembly line in a large factory

From visual check to machine vision

Woman inspecting fabric in a factory setting

A human inspector can recognise context, adapt to new products, and weigh ambiguous evidence. But repetitive checks under time pressure can vary by person, fatigue, shift, and line speed. Machine vision is useful when the inspection task can be expressed as visible, repeatable criteria: presence or absence, dimensions, surface marks, print quality, assembly orientation, or fabric defects.

A typical system captures an image, locates the region of interest, compares it with learned or programmed criteria, and returns a pass, fail, or review decision. The production line then records that decision and, where designed to do so, diverts or flags the part.


The pieces behind a reliable inspection

Touchscreen control panel on an industrial manufacturing machine
Camera and lens:Resolution, field of view, working distance, and shutter speed determine what detail can be captured on a moving part.
Lighting:Lighting reveals the feature being inspected. Diffuse, angled, back, or structured lighting can make scratches, edges, colour differences, and surface geometry easier to distinguish.
Part presentation:A part that shifts, rotates, reflects light, or arrives inconsistently creates image variation. Fixtures and triggers may matter as much as model choice.
Edge computer and software:Images are processed close to the line when latency or network reliability matters. The result should connect to operator guidance and traceable records.
Reject and escalation path:A correct prediction has little value if the wrong part is rejected or a failed inspection does not stop, flag, or route the item as intended.

How an AI model learns what to detect

A supervised vision model is trained on labelled images: examples of acceptable parts and examples of each defect class. The system learns visual patterns associated with those labels. For a new deployment, the team collects representative images, labels them with quality experts, trains a candidate model, and evaluates it on images that were not used for training.

Perimattic’s deployment page says a Vision QC project may need 50–100 known defective parts per defect type plus conforming samples. That is a vendor-stated starting guideline, not a guarantee of adequate coverage. The required dataset depends on defect rarity, visual variation, product families, camera setup, and the consequences of a miss.


False positives and missed defects

A false positive marks a conforming part as defective. It can create unnecessary rework, line interruption, or operator distrust. A false negative passes a defective part. Its cost may be much higher for safety- or compliance-critical characteristics.

Thresholds therefore reflect a trade-off. Teams should test sensitivity and specificity against labelled examples, review borderline cases, and monitor performance after launch. A model should be re-evaluated after changes to lighting, tooling, materials, supplier lots, surface finish, or product design. Never infer plant-specific accuracy from a generic marketing percentage.


A practical deployment sequence

  1. Choose a bounded use case: Pick a defect with a clear visual definition, meaningful cost, and stable inspection location.
  2. Study the process: Observe speed, vibrations, part orientation, environmental light, takt time, and how operators handle exceptions.
  3. Install and tune optics: Capture representative images across normal process variation before locking the camera position and lighting.
  4. Label and train: Have quality personnel define defect classes and acceptance rules. Keep training and validation sets separate.
  5. Run in shadow mode: Compare model decisions with existing inspection before allowing automated rejection.
  6. Agree the response: Define who reviews uncertain items, how failures are contained, and how an inspection event links to the part or batch.
  7. Monitor drift: Audit samples periodically and retrain only through a controlled change process.

Where it helps, and where it does not

Hands using a digital caliper to measure a metal part

Vision is a strong fit for high-volume, repeatable checks where the relevant feature is visible and consistently presented. It may be a poor fit when the defect is hidden, the product changes constantly, the acceptable appearance is inherently subjective, or the inspection requires touch, smell, or material testing. In those settings, vision can still screen or document, but it should not be treated as the sole quality gate.

Human review remains valuable for ambiguous cases and for investigating why defects cluster. The goal is to move skilled inspectors away from repetitive pass/fail work when appropriate, not to remove quality judgement from the process.


Conclusion

AI defect detection works when the imaging setup, data, acceptance criteria, and response workflow are designed together. Begin with one inspection point and a clear quality problem, then validate performance against real parts on the actual line.

Learn more about Intellyx Vision QC and discuss whether your product and inspection conditions suit machine vision.


Sources and further reading

Share this article:
Frequently Asked Questions

Got questions? We have answers.

What is AI defect detection on a production line?

It is the use of machine vision to turn images into repeatable inspection decisions at a defined point in the process. A typical system captures an image, locates the region of interest, compares it with learned or programmed criteria, and returns a pass, fail, or review decision. The line then records the decision and, where designed to do so, diverts or flags the part.

What kinds of defects can machine vision detect?

Machine vision works best when the inspection task can be expressed as visible, repeatable criteria, such as presence or absence, dimensions, surface marks, print quality, assembly orientation, or fabric defects.

Is the camera the most important part of a vision inspection system?

No. The camera is only one part of the system. Optics, lighting, part presentation, trigger timing, model training, and reject handling all affect whether an inspection is reliable. Fixtures and triggers can matter as much as the choice of model.

How many defective parts are needed to train a vision model?

Perimattic's deployment page gives a starting guideline of 50–100 known defective parts per defect type, plus conforming samples. This is a vendor-stated guideline, not a guarantee of adequate coverage. The dataset actually required depends on defect rarity, visual variation, product families, camera setup, and the consequences of a miss.

What is the difference between a false positive and a false negative?

A false positive marks a good part as defective, which can cause unnecessary rework, line interruptions, or operator distrust. A false negative lets a defective part pass, and its cost can be much higher for safety- or compliance-critical characteristics. Setting thresholds means balancing the two.

What does running a vision system in shadow mode mean?

In shadow mode, the model makes inspection decisions alongside the existing inspection process, and the results are compared before the system is allowed to reject parts automatically. This lets the team check performance on real parts without risking production.

When should a vision model be re-evaluated?

A model should be re-evaluated after changes to lighting, tooling, materials, supplier lots, surface finish, or product design. Teams should also audit samples periodically to catch drift and retrain only through a controlled change process.

Does AI inspection replace human quality inspectors?

No. AI inspection supports quality teams. Human review remains valuable for ambiguous cases, borderline decisions, and investigating why defects cluster. Vision may also be a poor fit when a defect is hidden, the product changes constantly, the acceptable appearance is subjective, or the check requires touch, smell, or material testing. The aim is to move skilled inspectors away from repetitive pass/fail work, not to remove quality judgement from the process.

Related Articles

Swipe to explore →