Computer Vision for Defect Inspection: real industrial cases

·

An industrial camera analysing every part at 120 frames per second, with a neural network trained on the real defects of your process, triggering a rejection signal in under 80 milliseconds. That, in essence, is what is now called computer vision for defect inspection on production lines. This is not science fiction, nor technology reserved for large corporations: in 2025 and 2026, Spanish industrial SMEs that have made the move report defect-rate reductions of between 30% and 40%, with return-on-investment periods of under a year.

This article explains how the system works, which sectors it fits best, what results are documented in industry, and which factors determine the success or failure of a project. If your company manufactures metal parts, plastic components, packaging, or food products and still relies on human visual inspectors at the end of the line, here is the information you need to make an informed decision.

What is computer vision applied to industrial inspection?

Machine vision combines image-capture hardware (industrial cameras, stroboscopic lighting, depth sensors) with machine-learning models trained to distinguish conforming parts from defective ones. Unlike classical rule-based vision systems (which look for pixels outside a fixed threshold), today's systems based on convolutional neural networks (CNN) or Vision Transformer architectures learn the concept of "defect" from real examples taken from your own line: scratches, porosity, deformations, oil stains, bubbles, missing material, labelling errors, or assembly faults.

The standard workflow in an implementation project has four stages:

  1. Image capture and labelling: between 200 and 2,000 images of good and defective parts are collected, defects are labelled type by type, and the training dataset is built.
  2. Model training: the network is trained and validated on the dataset. Modern systems with transfer learning need few proprietary images if the defect is visually clear.
  3. Line integration: the model is deployed on an industrial PC or GPU-accelerated hardware (or edge computing) connected to the camera and the line PLC. Inference latency is typically below 100 ms.
  4. Operation and continuous improvement: the system logs every decision, allows review of false positives and negatives, and is periodically retrained with new cases as they arise.

Sectors and most frequent defect types

Computer vision for defect inspection is not a generic system: each sector has its own priority defects and its own speed and lighting requirements. The table below lists the most common use cases in mid-sized Spanish industry:

Sector Typical defects detected Typical line speed Documented accuracy
Metal and stamping Scratches, cracks, porosity, swarf, geometric deformations 30–120 parts/min 95–99%
Plastic injection Bubbles, sink marks, flash, out-of-range colour, burn marks 10–60 parts/min 96–99%
Food industry Foreign bodies, visual freshness, cutting defects, visual weight, incorrect labelling 100–400 units/min 94–98%
Packaging Poorly sealed caps, skewed or missing labels, incorrect printing, fill level 200–800 units/min 97–99.7%
Electronic components Cold solder joints, missing components, visible short circuits, inverted polarity SMT cycle time 99–99.9%
Wood and board Knots, chipping, varnish scratching, missing machining 20–80 m/min 93–97%

Accuracy depends strongly on the quality of the lighting system, the training dataset, and process variability. A well-executed project with good lighting and sufficient labelled data can exceed 99% accuracy; a poorly planned one may stall at 85% and prove unusable in production.

Documented real-world results in industry (2025–2026)

Market data available for 2025 and 2026 paint a clear picture of the real impact of these systems:

An important caveat: between 70% and 88% of AI pilots in manufacturing never make it past the prototype phase, according to various market analyses (IDC, 2025; McKinsey, 2024). The main cause is not the technology, but data quality: poorly labelled images, inconsistent lighting, or training sets that are too small. That is why the difference between a project that launches in production and one that is abandoned lies not in the algorithm, but in the rigour of the prior design.

If your company wants to avoid that 77% failure rate, the first step is a technical assessment that determines whether the variability of your defect is systematic enough to be learned by a model. The machine vision team at Summum IA carries out that feasibility assessment before committing any implementation budget.

Typical technical architecture for an industrial SME

A computer vision system for defect inspection in an industrial SME consists of the following main components:

Capture hardware

The industrial cameras most commonly used in this context are greyscale or colour cameras with resolutions between 5 and 20 megapixels, capable of up to 200 fps. Lighting is critical: stroboscopic LED lighting systems (coaxial, telecentric, or dark-field depending on the defect type) eliminate reflections and ensure reproducible images across shifts and varying plant temperature conditions. For three-dimensional defects (bulging, deformations) depth cameras or structured-light projection are added.

Processing unit

In most SME projects, processing is performed on an industrial PC with integrated GPU (NVIDIA Jetson Orin for edge computing, or RTX series 40 cards in a floor rack). The inference model runs locally: there is no dependency on internet connectivity or network latency. The connection to the line PLC is made via digital signal (industrial I/O) or OPC-UA protocol for more modern lines.

Software and AI model

The most widely used frameworks are PyTorch and TensorFlow for training, with inference runtimes such as ONNX Runtime or TensorRT for production. There are also no-code industrial vision platforms (Cognex ViDi, Keyence IV3, Omron FH) that reduce configuration time at the cost of less flexibility. For complex defects or small datasets, transfer learning from models pre-trained on ImageNet or open industrial datasets (such as MVTec AD) allows good metrics to be achieved with 300–500 proprietary images.

Factors that drive project cost

The cost of implementing machine vision for inspection on a production line varies considerably depending on several factors. We do not publish our own fees, but we can provide guidance on the typical market ranges in Spain in 2025–2026:

As a general market reference, single-station inspection projects with standard hardware (camera + lighting + industrial PC + custom model) have an initial investment range of €15,000–45,000 in Spain, depending on defect complexity and integration level. Multi-station projects for complete lines typically fall between €60,000 and €200,000. These are general market ranges; each project requires a specific assessment.

How a well-executed project is structured

Experience in industrial machine vision implementation projects shows that successful projects share a well-defined four-phase structure:

Phase 1: Feasibility assessment (2–3 weeks)

The defect type, process variability, line speed, and current lighting are analysed. It is determined whether the defect is systematically detectable by image and the required dataset size is estimated. This phase avoids investing in hardware before validating that the problem has a viable solution.

Phase 2: Data capture and training (3–6 weeks)

A provisional capture system is installed on the line, or images of good and defective parts are captured from the existing rejection stock. They are labelled, several models are trained, and validation is performed against an independent test set. The minimum production target is typically 95% sensitivity with fewer than 2% false positives (incorrect rejections).

Phase 3: Integration and commissioning (2–4 weeks)

The definitive hardware is installed, connected to the PLC, and a parallel operation period begins alongside manual inspection. This allows thresholds to be adjusted and edge cases where the model classifies with low confidence to be identified.

Phase 4: Operation and continuous improvement (ongoing)

The system logs images of every part with its classification. Borderline cases or new defect types that emerge are periodically added to the dataset and the model is retrained. A good system improves over time rather than degrading.

The EU AI Act and machine vision in production

Since August 2024, the EU Artificial Intelligence Act (AI Act) has been progressively entering into force. Machine vision systems for quality inspection on production lines are not classified as high risk under the AI Act, since they do not make decisions that directly affect natural persons (unlike facial recognition or AI in personnel selection). This means the regulatory burden is low: registration in the EU database and mandatory third-party audits are not required simply for using machine vision in quality control.

However, if the vision system feeds automated decisions about product conformity that could affect consumer safety (food, medical devices, safety-critical components in automotive), it is advisable to document the system, its performance metrics, and human oversight procedures. At Summum IA we support AI Act technical governance so that your vision system meets applicable requirements without unnecessary bureaucracy.

Frequently asked questions

How many images do I need to train a defect detection system?

It depends on the complexity and variability of the defect. For visually consistent defects (missing label, clearly incorrect colour) 200–300 images per class may be sufficient. For subtle defects on reflective surfaces or with high natural material variability, 1,000–3,000 labelled images may be needed. Data augmentation techniques (rotations, brightness changes, noise) allow small datasets to be amplified. Precise labelling is more important than raw volume.

Can a machine vision system detect every type of defect on my line?

Not all of them. Machine vision systems detect defects that have a visual expression: geometry, colour, texture, presence or absence of components. Internal defects (subsurface cracks, non-visible inclusions) require complementary technologies such as X-ray, ultrasound, or thermography. In a well-planned project, the usual approach is to start with the highest-impact defects that do have visual expression, and address the rest with other inspection methods.

What happens when a new defect type appears that the model has not seen?

The system will classify that new defect with low confidence or incorrectly classify it as a good part. That is why it is essential to maintain a rejection-review protocol and, periodically, add new cases to the training dataset and retrain the model. A well-managed project establishes from the outset who is responsible for model maintenance and how frequently it is carried out.

Is computer vision compatible with my current line without stopping it?

In most cases, yes. Installation of the vision system is planned for scheduled downtime or weekends. The camera and lighting are mounted on a lateral support or above the line without modifying the process. The rejection signal is integrated into the existing PLC via standard I/O modules. The parallel operation period (the system detects but does not automatically reject) allows performance to be validated before activating automatic control.