← Back to BlogPanduan

AI Visual Inspection in Manufacturing: Data, Models, Limits

November 1, 2026

AI Visual Inspection in Manufacturing: Data, Models, Limits

At the end of the line, an inspector checks hundreds or thousands of parts per shift for scratches, dents, stains, misaligned prints, and missing components. In the first hour their eyes are sharp. By the end of the shift small defects slip through, and two inspectors can reach different verdicts on the same part.

AI visual inspection in manufacturing uses cameras and computer vision models to check every part against the same criteria all shift long. This guide covers how it works, the image data you need, how to train and test a model, common accuracy traps, and its limits.

How AI visual inspection works in manufacturing

A system has four parts:

  1. Camera and lighting at a fixed point, such as above a conveyor. A position sensor triggers the camera when the part is directly underneath. For continuous material such as fabric, paper, or film, a line-scan camera usually captures one row at a time.
  2. A computer vision model that decides: pass or fail (classification), where the defect is (detection), or how large the defective area is (segmentation).
  3. An action: a signal to the PLC to reject the part, a warning light, or a flag for a second check.
  4. A record of every result with its image, so defects can be counted by type, hour, or batch.

Models are trained in one of two ways. A supervised model learns from defect images labelled by type. An anomaly detection model only needs images of good parts and flags anything different. The second suits rare defects, but flags harmless variation more often.

Cameras or process data?

Visual inspection is not the only way to cut defects. The other route is predicting defects from process data such as temperature, pressure, and machine speed. They answer different questions:

AspectAI visual inspectionPrediction from process data
What it checksHow the formed part looksProcess conditions while the part is made
When the warning comesAfter the part is formed, unit by unitEarlier, before test results arrive
Best forSurface defects: scratches, dents, stains, labels, missing componentsInvisible defects: moisture, viscosity, joint strength
Training dataLabelled images from the lineSensor and PLC data matched to quality results

Many plants use both: cameras screen out bad parts, and process data helps explain why they appeared.

The image data you need

  • Consistent lighting. It often matters more than camera resolution. Low-angle light makes scratches and dents stand out, diffuse light cuts glare on shiny surfaces, and backlighting suits checks on outlines and holes. Shield the camera from window light that changes through the day.
  • Resolution matched to the smallest defect. The smallest defect must span several pixels. For illustration, a 200 mm field of view captured 2,000 pixels wide gives 0.1 mm per pixel, so a 0.3 mm scratch covers only about 3 pixels. On a fast conveyor, exposure time must also be short enough to avoid motion blur.
  • Consistently labelled defects. Collect images from the real line for every defect type, product variant, and shift. Write a defect catalogue with QC, including boundary samples (parts that just pass and parts that just fail), so everyone labels against the same criteria.

Steps to train and test the model

  1. Pick one product and one to three defect types that escape most often or cost the most.
  2. Install the camera and lighting on the line and collect images for several weeks to capture variation in materials, shifts, and settings.
  3. Label and check agreement. Have two inspectors label the same subset. If they often disagree, fix the defect catalogue first. A model cannot be more consistent than its labels.
  4. Split test data by time or batch, not at random. Images from the same minute are near duplicates, so a random split makes results look better than reality.
  5. Run it alongside inspectors for a few weeks before it is allowed to reject parts.
  6. Set the decision threshold by cost, and retrain when the product, materials, or lighting change.

Common accuracy traps

A single accuracy figure is almost always misleading, because defects are rare. Measure two errors separately: escapes (defects that pass) and false rejects (good parts that fail, often called overkill). Each has its own cost. As an illustration, a line making 10,000 units a day with a 1% false reject rate sets aside 100 good units daily for re-inspection.

Other traps are specific to images:

  • Shortcut learning. If defect samples were photographed on a different table or jig, the model may learn the table instead of the defect. Capture good and bad parts the same way.
  • Quiet drift. A dimming lamp, dusty lens, or slightly knocked camera degrades results unnoticed. Track the daily reject rate and check the camera routinely.
  • New defect types. A supervised model only knows defects it has seen. New ones must be collected, labelled, and trained in.

Limits of AI visual inspection

  • It only sees what the camera sees. Hidden sides, internal flaws, and mechanical properties still need other tests or process data.
  • Shiny and transparent surfaces are hard. Glass, clear plastic, and polished metal need purpose-built lighting, sometimes several camera angles.
  • Mechanical integration is its own project. Automatic rejection needs a PLC signal, a reject mechanism, and safeguards designed with the machine team.
  • Quality responsibility stays with QC. Inspectors move to reviewing borderline cases and keeping labels accurate.

Frequently asked questions

Can we use our existing CCTV cameras?

For small surface defects, usually not. CCTV is mounted far away to watch an area, with no controlled lighting and no trigger as each part passes. It is better suited to video analytics for safety and operations, such as PPE compliance and danger zones.

How many images are needed?

It depends on product and defect variation. What usually matters is the number of examples per defect type, not the total. If defects are very rare, anomaly detection can start from images of good parts. Judge data sufficiency from real samples before promising results.

Where does the model run?

The reject decision must come before the part reaches the reject point, so the model usually runs on a computer next to the line. Only a summary needs to reach the cloud: pass and fail counts per defect type, plus sample images for review.

How does this relate to OEE?

Inspection results feed the quality factor of OEE: good parts divided by total parts. With automated inspection it is available hourly instead of at the end-of-shift tally. See our guide to real-time OEE monitoring.

AI visual inspection with INCLUDE

A visual inspection project should start with a question, not a camera. Through our predictive analytics and machine learning services, the INCLUDE team starts from the decision you want to improve and a review of your data: which defect costs most, whether a camera can see it or process data would flag it sooner, and whether your images are enough. The model is tested on your data and reviewed with your QC team, then runs in the cloud or on an edge device next to the line when decisions must be fast.

Pass and fail counts per defect type can be sent to the INCLUDE platform over MQTT or HTTP and shown on the same dashboards as process data from sensors and PLCs. The reject rate can be given a safe range, with alarms forwarded to Telegram (Pro plan and above). For CCTV watching PPE compliance or danger zones, the INCLUDE ecosystem also has IncludeVision, an AI Vision platform for CCTV.

Are surface defects still slipping past manual inspection?

Tell us about the product, the most common defects, and your line speed. The INCLUDE team will help judge whether cameras, process data, or both make the most sense.

Free consultation on WhatsApp → See predictive analytics & ML services →