Skip to content
Welf LabsResearch for industrial intelligence.

Guide / Industrial AI

AI visual inspection: From a camera image to a quality decision

Founder & CEO of Welf5 min read
Process overview: AI visual inspection: From a camera image to a quality decision

A scratch on polished metal disappears under a different light. An acceptable surface texture resembles a crack. Before automating visual inspection, the team must make the relevant difference visible and agree what it means. A larger model will not resolve an unsuitable lighting setup.

AI visual inspection analyses images to identify specified features or possible defects. It may assist an inspector or form part of an automated station. Acceptance, further inspection and rejection still require explicit decision rules.

This guide is for manufacturing and quality teams assessing a defined inspection task on an existing production line.

Start with a part family and a defect catalogue

Missing components, incorrect assembly positions and certain surface defects can be useful candidates. The key condition is that the feature can be captured reliably by the chosen imaging method.

Not every task needs machine learning. Stable geometric features may be checked with conventional rules. Learning-based methods may help when acceptable surfaces vary. Anomaly detection flags something unusual; it does not inherently establish that the product violates a quality requirement.

MVTec AD provides industrial image tasks for comparing anomaly detection methods. A result on that benchmark does not validate an installation on your line. The dataset also has a non-commercial licence, so access to it should not be mistaken for permission to use it in production.

Treat lighting and optics as part of the system

Define the smallest relevant feature, the surface material, the part position and its movement. Those requirements inform resolution, optics, illumination and exposure. If the feature is not resolved in the image, the model cannot be expected to reconstruct it reliably.

For reflective metal, compare lighting arrangements using actual good and defective parts. Transparent materials may require a different setup. Choose the arrangement around the feature rather than assuming one camera package will cover every surface.

Define what happens when the lens is dirty, the image is blurred or a light fails. Use a separate “not inspectable” outcome. Such images should not silently become accepted parts or confirmed product defects.

Build a dataset that includes acceptable variation

Collect images from different batches and operating conditions. Include valid variation, not just ideal samples. Otherwise the system may learn a narrow picture of normality and send usable parts for unnecessary reinspection.

Data groupPurposePitfall to avoid
Confirmed good partsRepresent allowed variationSelecting only pristine examples
Confirmed defectsTest relevant defect classesMerging different failure types
Borderline casesResolve the quality decisionHiding disagreement behind a label
Unusable imagesIdentify acquisition problemsCalling a blurred image a product defect

Quality specialists should resolve ambiguous cases or mark them as unresolved. Record the inspection specification and its revision. An algorithm should not be judged on its ability to imitate inconsistent human labels.

Why 99 percent accuracy can be worthless

Consider a hypothetical batch of 10,000 parts containing 100 defects. A system that accepts every part achieves 99 percent overall accuracy. It detects none of the defects. This is an arithmetic illustration, not a measured Welf result.

Measure escaped defects and falsely rejected good parts separately. Add unusable images and cases requiring manual review. Break results down by defect class and product variant. A combined score can hide the failure that matters most to the quality team.

Use later production data and unseen batches for an independent evaluation. Repeated images of the same part should not appear in both training and test sets. Otherwise the test partly measures recognition of familiar examples instead of transfer to new production.

Connect each result to the correct physical part

The model is only one step in the inspection chain. The result must arrive on time, refer to the right item and lead to an acknowledged action. A reliable classifier cannot compensate for rejecting the wrong part.

  1. Identify the part or its position unambiguously.
  2. Check acquisition quality and impose an expiry on the result.
  3. Record the model and inspection-rule versions with the finding.
  4. Apply the agreed acceptance, review or rejection rule.
  5. Treat missing acknowledgement as an operating fault.

Begin in parallel with the existing inspection process. Automatic release requires acceptance of the complete inspection chain by the responsible specialists. Define a fallback for communication loss and system failure. An earlier result must never be reused for a new part.

Assess the complete operating cost

Compare the current process with the proposed one, including manual reviews, cleaning, image curation, software changes and new product variants. Faster inference creates little value if a large share of outputs still needs time-consuming review.

Agree which defect classes are decisive and how much extra scrap or review effort is acceptable before the pilot. A documented failure on representative parts is more useful than a successful demonstration using carefully selected samples.

Infrastructure should support that process. Local processing may be appropriate where response time or disconnected operation matters. A central deployment may simplify other tasks. Our private AI deployment guide explains the trade-offs. If the application also moves or handles parts, consider the additional requirements in physical AI for manufacturing.

Welf develops image analysis and its integration with production and quality teams. Start with a concrete feature and a representative set of good, defective and borderline parts. Discuss your inspection task.