Aristek Systems

AI Visual Inspection for Defect Detection: From Pilot to Production

Preview
Published:October 19, 2026
Edited by:
  • Written by:
    Image of author
    Tech lead, MLE, Manufacturing Data Scientist at Aristek
  • Edited by:
  • Key takeaways

    • AI-powered visual inspection handles surfaces that vary from part to part, such as castings, welds and textiles. Rule-based machine vision measures dimensions, checks for missing components and reads codes more reliably.
    • No single accuracy figure applies across production lines. Measure escape rate and false reject rate for each station and defect class, against your current inspectors.
    • Pilots usually stall on lighting, incomplete training data, unclear defect definitions or a missing PLC connection, and far less often on the model itself.

A defect detection model does not inspect a product. It inspects an image captured under specific lighting, from a specific camera position, at a specific point in production.

Change those conditions, and the model may produce different results even when the part itself has not changed. That constraint often becomes visible when AI visual inspection for defect detection moves from a pilot to production.

The system captures images and uses computer vision to classify defects, locate them, or flag suspicious parts for further inspection. Reliable operation depends on consistent imaging, representative training data, validation against the existing inspection process, and a defined production response to each prediction.

Deloitte’s AI in Manufacturing 2026 report shows why quality receives so much attention: it leads AI deployment across the manufacturing value chain at 62%, while 84% of respondents report measurable value from AI. Yet only 20% of use cases reach scale, with 79% citing operational disruption risks compared with 15% citing system or model reliability risks.

AI visual inspection in manufacturing therefore requires attention beyond model accuracy. Supplier changes, surface variation, lighting shifts, camera movement, and new product versions can all affect inspection results.

Read our article to learn how to move AI visual inspection from a promising pilot to a production-ready system, with a focus on imaging, data, validation, and integration.

How AI visual inspection detects defects

AI visual inspection detects defects through a fixed sequence on the line: a camera captures each part under controlled lighting, software prepares the image, a model scores it, a threshold turns the score into a decision, and the line acts on that decision while the result goes into the inspection record.

What the camera has to see

The industrial camera needs enough resolution to place several pixels across the smallest defect in the catalog, so a 0.2 mm scratch on a 200 mm part already narrows the choice of sensor and lens. An encoder or photoelectric sensor triggers the capture, which keeps every part in the same position within the frame.

Lighting design often decides which defects appear in the image at all. On machined or painted metal, a diffuse dome light suppresses the glare that hides shallow dents, while low-angle light raises the contrast of scratches and surface texture. Line speed adds a further limit: at higher speeds, exposure time has to drop to avoid motion blur, and the lighting has to get brighter to compensate.

Preprocessing and model inference

The captured image may be cropped to the inspection area and normalized for factors such as brightness or scale. A deep learning model, often a convolutional neural network (CNN), then processes the image and produces a score or defect classification.

Decision thresholds and the uncertain band

The model output needs a threshold that matches the quality requirements of the process. A high-confidence result can trigger a pass or reject decision, while cases close to the threshold can enter an uncertain band for human review.

This human-in-the-loop approach allows operators to assess ambiguous images and provides additional examples for later model evaluation.

Production action and record

When a reject decision reaches the line controller, the PLC can trigger a reject gate or another defined response. The inspection result, captured image, model version, timestamp, and relevant part information can then be stored in an MES or QMS, creating a record that supports traceability and quality analysis.

There is also a physical limit to what visual inspection can detect. AI can only assess what the captured image reveals. Internal porosity, cracks beneath a surface, or other hidden defects may require X-ray or CT inspection, which moves the process into non-destructive testing (NDT).

The process of detecting defects by AI visual inspection
The process of detecting defects by AI visual inspection

How is AI visual inspection different from rule-based machine vision?

Rule-based machine vision checks each image against criteria an engineer programs, such as an edge position, a pixel count or a blob size.

Artificial intelligence visual inspection learns from labeled examples what acceptable and defective parts look like, which lets it handle variations that nobody can write a rule for.

Rule-based machine vision AI-based visual inspection
How it decides Programmed rules and tolerances Patterns learned from labeled images
Setup requires Fixed part position, stable lighting, an engineer to write and tune rules A labeled image set that covers each defect class and the acceptable variation
Strongest at Dimensions in mm, presence or absence of a component, barcode and text reading Scratches, dents, weld irregularities, textures that differ from part to part
Fails when Defects vary in shape, or acceptable variation resembles a defect Material, lighting or product changes go beyond the training data
Explaining a reject The rule and the measured value that triggered it A score and a heat map, which take more effort to trace

Many production stations combine both. For example, rules can verify a component’s dimensions or confirm that a feature exists, while an AI model evaluates scratches, discoloration, or other cosmetic defects.

This hybrid setup can keep precise measurements under deterministic control while assigning appearance-based judgments to the model.

The distinction also matters in non-destructive testing (NDT).

Visual testing (VT) refers to the formal NDT method for examining surfaces and accessible features through visual inspection.

Assisted defect recognition (ADR) has a different role: the term describes AI-assisted analysis used in radiography and CT inspection, where the system helps identify defects in volumetric or radiographic data. ADR should therefore remain an NDT-specific term rather than a general synonym for AI-based visual inspection.

  • Preview

    Learn how our team helped a UK vehicle inspection company working with several car manufacturers cut its inspection errors in half.

    Key results:

    • 95% coverage of every vehicle during inspection.
    • 50% reduction in inspection error
    Read how we did it

Which inspection method fits your defect type?

Choosing AI-enabled visual inspection for defect detection starts with the decision the station has to make: whether a defect exists, what type it is, where it sits, or how large it is.

Each of those questions points to a different method and a different kind of training data.

What the station must determine Method Training data Example
Whether anything looks wrong Anomaly detection Mostly images of acceptable parts Rare defects that take unpredictable forms
Which type of defect it is Defect classification Labeled examples of each defect class Sending scratches and dents to different rework steps
Where it is and how many there are Object detection Bounding boxes drawn around each defect or component Missing clips, wrong connectors, extra fasteners
How large it is Semantic segmentation Pixel-level outlines of each defect Comparing a coating void’s area with a tolerance
Exact dimensions Rule-based metrology Camera calibration, no model training Hole diameter, gap width, thread pitch

Anomaly detection can be useful when defective examples are scarce or the range of possible defects is difficult to define. The model learns the appearance of acceptable parts and flags deviations, but it generally cannot tell an operator whether the deviation comes from a scratch, dent, stain, or another defect type.

The labeling burden generally increases as the inspection requires more precise information. Classification needs image-level labels, object detection requires bounding boxes, and semantic segmentation requires pixel-level annotations that trace the defect area.

A golden sample can help define acceptable appearance, particularly for anomaly detection, but it does not replace representative production data.

The choice should follow the station’s actual decision. If the line only needs to separate acceptable from suspicious parts, anomaly detection may be sufficient. If the system must locate defects, count components, or measure their area, a more detailed method may be required.

How accurate can AI visual inspection be?

There is no universal accuracy figure for AI visual inspection. Each station needs to be measured against its current inspection baseline, with results separated by defect class and inspection condition.

Two errors that matter

For production quality, two measures usually matter more than a single accuracy score.

  • Escape rate measures missed defects: the number of defective parts accepted divided by the total number of actual defects.
  • False reject rate measures good parts rejected by the system: the number of acceptable parts rejected divided by the total number of good parts. In semiconductor manufacturing, excessive false rejects are often described as overkill.

These measures also give practical meaning to recall and precision. Recall answers, “Of all actual defects, how many did the system catch?” Precision answers, “Of all parts the system rejected, how many were actually defective?” A station can have high recall and poor precision if it rejects too many good parts.

What errors matter more than accuracy
What errors matter more than accuracy

Why “99% accuracy” can mislead

Consider a line where only 0.5% of parts contain a defect. A model that accepts every part achieves 99.5% accuracy because 99.5% of the parts are good. It catches zero defects. The accuracy figure looks strong while the inspection provides no protection against defects.
This is why model results should include defect prevalence, recall, precision, escape rate, false reject rate, and the number of samples tested. Vendor claims also need context: “99% accuracy” has little meaning without knowing which metric was measured, on which defect classes, and under what production conditions.

Human inspection needs its own baseline

Human inspection also produces misses and false rejects. Performance can vary by shift, fatigue, inspector experience, and how clearly a defect can be distinguished. A fair comparison uses the same parts, defect definitions, and acceptance criteria for both methods. Section 7 will cover attribute agreement analysis as one way to measure this baseline.

Thresholds reflect the cost of each error

A critical defect escaping detection may cost far more than rejecting an acceptable part. At the same time, excessive false rejects reduce first pass yield and add rework or inspection costs. Threshold selection should reflect this trade-off and the cost of poor quality rather than a generic target such as 99%.

In ASQ’s 2025 Cost of Quality report, only 31% of respondents said they fully understand how quality costs affect their financial performance. Without that understanding, a team has no financial basis for deciding how many false rejects it can accept in exchange for fewer escapes.

Why do AI visual inspection pilots stall before production?

Most visual inspection AI pilots stall because the conditions, data, definitions or integration around the model fail to match the production line. The Deloitte figures in the introduction point the same way: far more manufacturers name operational disruption as a risk than name model reliability.

The symptoms below usually trace back to a specific cause, and each cause has a different fix.

What happens in the pilot Likely cause What to check
Performance drops on night shift or after maintenance Ambient light, a moved camera, or a dirty lens Lighting levels, camera position, lens condition, calibration
Defects appear after a supplier or material change Training data does not cover the new variation Material lots, suppliers, surface finishes, product versions
The model performs well in testing but poorly on the line Test images do not represent production conditions Shift coverage, image quality, line speed, product mix
Inspectors disagree with the model’s result Defect definitions or acceptance criteria are unclear Defect taxonomy, limit samples, inspector agreement
New product variants produce unreliable results The model has limited examples of the new variants SKU coverage, retraining rules, release process
The system cannot keep pace with the line Inference latency or unsuitable compute placement Processing time, camera throughput, edge/cloud location

Two causes deserve particular attention because they can remain hidden during a technical pilot.

Unclear defect definitions create a problem before training even begins. If inspectors disagree about whether a mark qualifies as a scratch or whether a surface variation requires rejection, the training labels contain that disagreement. The model can learn patterns from inconsistent decisions, yet no increase in model accuracy can resolve an acceptance rule that people have not defined consistently.

Missing system connections create a different failure. A model can correctly detect a defective part while the part continues through production because its result has no connection to the PLC, reject gate, operator station, or quality system. A detection becomes useful only when the production process has a defined response to it.

A pilot should also account for maintenance, product changes, image storage, monitoring, and model version control before production release.

For a broader view of what changes when AI moves from pilot into daily factory work, read our article on how AI is being used in manufacturing.

Planning a pilot and would like to define its scope, data requirements and success criteria before development starts?

Our whitepaper on the Discovery Phase for AI projects explains what this stage should cover.

Download for free

How do you validate AI inspection before production?

Validate the system against the inspection process it replaces or supports, rather than against the test set used during model development.

A production validation plan needs to show whether the AI can make the required decisions under real operating conditions and at an acceptable cost of errors.

1. Defect catalog and acceptance criteria

Start with a defect catalog that gives every class a clear description, severity level, and reject rule. “Scratch” needs a measurable definition if different inspectors can interpret the same mark differently. Physical limit samples can define the boundary between an acceptable and rejectable part.

These samples give both inspectors and the AI system a concrete reference for borderline cases.

2. Golden test set

Build a golden test set that remains completely separate from training data. It should contain every relevant defect class, limit samples, product variants, and material lots. If production runs across multiple shifts or suppliers, the test set should reflect those conditions as well.

Gartner sets the same requirement for AI data in general: the data has to represent the use case, including its patterns, errors and outliers. Gartner predicts that through 2026, organizations will abandon 60% of AI projects unsupported by AI-ready data. For an inspection station, the rare defects, borderline parts and unusual material lots belong in the golden set, because those cases show how the model will perform on the line.

A small, clean dataset can show whether a model learned the training examples; a representative golden set provides stronger evidence of how it may perform on the line.

3. Human baseline with attribute agreement analysis

Before comparing AI with people, measure how consistently people make the inspection decision. Attribute agreement analysis can compare inspectors with each other and with a reference standard.

If inspectors agree with one another only 85% of the time, labels based on those judgments place a practical limit on the consistency that the model can demonstrate. The inspection criteria need clarification before model performance can be assessed fairly.

4. Shadow run

Run the AI beside the existing inspection process without allowing it to trigger rejects. During this human-in-the-loop stage, compare AI predictions with actual inspection decisions and collect uncertain cases for review.

Define the shadow run by coverage rather than an arbitrary number of calendar weeks. The required coverage may include all shifts, relevant SKUs, major material lots, suppliers, and expected operating conditions.

5. Comparison against acceptance thresholds

Set acceptance thresholds for each defect class. A critical defect may require an escape rate approaching zero, while a cosmetic defect may require a different balance between missed defects and false rejects.

Review recall, precision, escape rate, false reject rate, and first pass yield together. The
threshold should reflect the actual quality risk and production cost attached to each type of error.

6. Uncertain-case handling

Define what happens when the model cannot make a confident decision. A human-in-the-loop process may route the image to an inspector, who records the final decision and the reason when required. Those cases should be stored separately so the team can identify recurring patterns, assess threshold settings, and select useful examples for future model updates.

The review process also needs an owner, response time, and clear rule for releasing the part.

Validation design belongs in the project plan from day one, alongside the wider requirements for AI development for manufacturing. When these checks are defined early, the production decision has a measurable basis: the team knows what the system must detect, how people perform against the same criteria, which errors are acceptable, and how uncertain cases are handled.

How do you deploy AI visual inspection on a production line?

Deployment moves through five stages: one station, validation, line integration, production monitoring, and then additional stations.

Each stage depends on the one before it, so a station that has not passed validation stays out of the reject decision.

Each stage also changes how people and systems work around the station: who reviews uncertain parts, how the PLC responds to a reject, and where each record goes. In its cross-industry State of AI 2025 survey, McKinsey found that the organizations reporting the most value from AI, about 6% of respondents, were nearly three times as likely as others to have fundamentally redesigned individual workflows.

Fix the station hardware

For AI visual inspection, manufacturing engineers usually own the camera mounts, lighting enclosures and part fixtures. Once validation passes, those positions get documented and locked, because a camera shifted by a few millimeters or a replaced light source can invalidate the results. A shroud around the station also blocks changes in ambient light between day and night shifts.

Choose where inference runs

Edge inference runs the model on a computer at the station, which keeps the decision time within a few hundred milliseconds or less. Lines that need a decision before the part reaches the reject gate generally require it. Cloud or central servers suit tasks without a time limit, such as retraining, reporting and comparing results across plants.

Connect the decision to the reject gate

AI-based visual inspection automation pays off only when the decision reaches the reject gate in time. The PLC handshake needs a defined signal, a timeout and a fallback, such as stopping the line or rejecting the part when no result arrives. A sensor after the gate confirms that the rejected part actually left the line, so the line has proof of each rejection beyond the PLC signal.

Record every decision

Each inspection record should hold the result, the image, the model version, a timestamp and the part’s serial or lot number. Stored in the MES or QMS, those records provide traceability when a customer complaint arrives months later. Connecting inspection results to MES and QMS falls within standard manufacturing software development work, yet pilots often postpone it until the end.

Add stations one at a time

Start visual inspection with AI at one station, then add others only after each new station passes its own validation. A model trained on one camera and lighting setup can lose accuracy on another, even for the same part.

Version control for models and datasets, together with a repeatable retraining pipeline, should exist before the second station goes live; that work belongs to MLOps.

Five deployment stages, with validation before the first reject decision.
Five deployment stages, with validation before the first reject decision.

If your inspection data currently stays inside the vision system, an AI control tower can connect it with production and quality records across your plant.

Explore the demo

Keeping AI inspection accurate after go-live: Five situations to watch

AI inspection stays accurate after go-live when the team watches a small set of signals and responds to each change in a defined way. Production conditions shift even when the model’s software stays untouched, and the five situations below cover most of what a quality team will encounter.

The reject rate climbs, and nothing in the process has changed.

Look at the station before the model. A moved camera, a dirty lens, a failing light or a new material lot can all raise rejects without any change in part quality. Splitting the results by SKU, shift and material lot usually narrows the cause within a day.

More parts land in the uncertain band.

The model is seeing variation it was not trained on, often from a new coating, surface finish or supplier. Review a sample of those parts with an inspector and record the decisions. The records show whether the variation is acceptable or a new defect type.

Operators override the model more often.

Compare the overrides with the defect catalog. If the overrides follow the catalog, the model is missing a pattern and needs new training examples. If they don’t, the inspection criteria have drifted on the floor, and the catalog needs updating before any retraining.

A planned change arrives: a new supplier, SKU, lighting setup or camera.

Run the current model against the golden test set, plus images from the new conditions, before the change reaches full production. Each of these events starts a defined assessment, and the assessment decides whether retraining is needed.

An updated model is ready for release.

Tie the new version to its validation record: the golden test set results and the acceptance thresholds used for release. Significant changes go through partial revalidation against that test set before the model makes reject decisions again.

In all five situations, human review stays available for critical decisions and uncertain cases. Those reviewed decisions provide continuing evidence of how the model performs and identify the examples that deserve attention during the next retraining.Conclusion

AI visual inspection becomes a production system when the camera captures the right evidence, the data represents the real range of parts and defects, validation reflects the current quality process, and every model decision reaches the right production action.

The practical route starts with one station, proves the complete inspection loop, and then expands with controlled validation at each new station.

The model is only one part of the system

At Aristek Systems, we approach AI visual inspection as a production engineering challenge. Model selection matters, but so do the camera architecture, lighting, edge infrastructure, PLC communication, MES/QMS connections, data flows, monitoring, and the way the system will change as production changes.

Our AI and engineering teams work across these layers to design an architecture that can operate reliably on the factory floor rather than remain a successful model in a development environment.

Our R&D team also continuously tests AI frameworks, computer vision tools, model architectures, and deployment approaches, giving project teams a practical basis for choosing technologies instead of locking into a tool before the inspection requirements are clear.

If you are considering AI visual inspection for a new production station or looking to move an existing pilot toward production,

book a free consultation with our team.

We use third-party cookies to improve your experience with aristeksystems.com and enhance our services. Click either 'Accept' or 'Manage' to proceed.