Skip to main content

How to Use Computer Vision and AI for Anomaly Detection in Industrial Processes: Practical Analysis, Architectures, and Use Cases

star ellipse

AI /

How to Use Computer Vision and AI for Anomaly Detection in Industrial Processes: Practical Analysis, Architectures, and Use Cases

Guide to Industrial Computer Vision: How AI and hybrid models detect anomalies in real time, reducing scrap and line downtime in compliance with ISO and NIST standards.

logo Smart Shaped

Smart Shaped

ago 8 min.

Computer Vision and AI for industrial anomaly detection serve to identify and prevent defects, scrap, line downtime, and non-compliance, rather than just "seeing" errors. In production, the best results come from hybrid architectures: supervised models for known defects and unsupervised models for unknown anomalies, integrated with MLOps, traceability, and continuous monitoring.


What is anomaly detection in industrial processes using Computer Vision and AI?

Anomaly detection in industrial settings refers to the use of Computer Vision (automated image/video analysis) and AI (machine learning models) to identify deviations from the expected behavior of a process or product. In regulated contexts (such as ISO 9001, GMP, and IATF 16949), the goal is not merely to "find visible defects," but to mitigate risks: scrap, rework, batch holds, and audit findings.

La letteratura moderna distingue famiglie di metodi supervised, semi-supervised e unsupervised, spiegando perché la detection di difetti sconosciuti richiede approcci non supervisionati o ibridi (2023) (Anomaly Detection in Computer Vision: A Survey). Nella pratica, noi iniziamo spesso dalla tassonomia dei difetti e dalla disponibilità dati; per un approfondimento delle tecniche, vedi anomaly detection con tecniche di Computer Vision.

Modern literature distinguishes among supervised, semi-supervised, and unsupervised method families, explaining why the detection of unknown defects requires unsupervised or hybrid approaches (Anomaly Detection in Computer Vision: A Survey). In practice, we often start from defect taxonomy and data availability; for a deeper dive into these techniques, see anomaly detection using Computer Vision techniques.

Operational Objective Typical Visual Signal Production Decision Recommended Output
Prevent scrap Micro-defects, texture Correct parameters Alarm + root cause
Reduce downtime Progressive drift Targeted maintenance Trend + thresholds
Avoid non-compliance Dimensional deviations Hold batch Traceability + evidence

Why Automated Quality Control Outperforms Manual Inspection in Regulated Environments

Manual quality control fails primarily when it comes to repeatability and traceability: fatigue, operator-to-operator variability, and the lack of structured evidence make it difficult to prove how and when a part was evaluated. Conversely, a computer vision system (industrial cameras + controlled lighting + AI inference) generates versioned logs, images, and decisions that are highly valuable during audits and CAPA (Corrective and Preventive Action) workflows.

According to guidelines from the NIST (National Institute of Standards and Technology), AI deployments in manufacturing must be treated as lifecycle systems with continuous monitoring, validation, and governance, rather than as "one-shot" deliveries (NIST AI RMF Playbook for Manufacturing).

AI systems in manufacturing must be designed for governance, risk management, and continuous monitoring throughout the full lifecycle.

— NIST, U.S. National Institute of Standards and Technology

To link inspection and compliance, particularly regarding serialization and audit trails, it is highly effective to integrate the use of digital twins for traceability and compliance (Digital Twins acting as an "operational log" of both product and process).

How a Real-Time Industrial Anomaly Detection System Works on the Production Line

A real-time anomaly detection system is an operational chain: acquisition (Basler/FLIR camera or vision sensor), pre-processing (normalization, ROI), inference (NVIDIA GPU or edge CPU), and decision-making (Siemens/Beckhoff PLC or MES). The critical element is end-to-end latency: on many lines, the budget is in the range of 50–200 ms so as not to impact the takt time.

In architecture, we always separate inference (modeling services) from orchestration (events, queues, retries) and OT/IT integration. This approach reduces downtime risks and facilitates the adoption of national infrastructures: see Italian investments in supercomputers and AI Factories for the context of compute and industrial AI in Italy.

Block Typical Owner Risk if Missing Traceable Artifact
Image acquisition Automation Engineer Unusable data Camera specs + setup
Edge inference AI Engineer High latency Model version + hash
PLC/MES integration OT/IT Lead Unactionable alarms Event log + timestamp
Governance & validation Quality Manager Audit non-compliance Validation protocol

Supervised vs. Unsupervised Models: Which Approach Better Detects Known Defects and Unknown Anomalies?

Supervised models (supervised learning) classify known defects because they learn from labeled examples: "under-extrusion," "skipped layers," scratches, or missing components. They perform well when a reliable historical dataset exists and the defect taxonomy is stable. Unsupervised models (unsupervised anomaly detection) learn what is "normal" and flag statistical or geometric deviations, making them better suited for new defects, process drift, and material changes.

The survey on arXiv reaffirms that anomaly detection covers supervised, semi-supervised, and unsupervised settings, and that in industry it is often beneficial to combine them (2023) (arXiv survey).

Anomaly detection in computer vision spans supervised, semi-supervised, and unsupervised settings, and industrial applications often benefit from combining them.

— Survey authors, Research paper authors

In production, a hybrid approach reduces both false negatives on known defects and false positives on acceptable variations. We implement it as: (1) a supervised classifier for recurring errors, (2) an unsupervised model trained on the "golden sample," and (3) escalation rules to the operator and Quality team for borderline cases.

Anomaly Detection in Industrial 3D Printing: Why a Dual AI Architecture Reduces Errors and Analysis Times

In our experience at Smart Shaped S.r.l. (an Italian enterprise software company founded in 2015), we developed an AI and Computer Vision system to assist quality control in 3D printing (additive manufacturing) by detecting anomalies in real time. The operational goal was to reduce manual post-process analysis and catch defects before they turned into scrap or required rework.

The architecture is dual-layered: a supervised model classifies known errors (e.g., under-extrusion, skipped layers), while an unsupervised model learns the ideal object and flags statistical or geometric deviations. We made the solution modular and production-ready by integrating Anomalib (an open-source library for anomaly detection), chaM3Leon (for ML lifecycle management, tracking, and deployment), and Gradio (a web UI to visualize anomalies in real time). This resulted in a faster triage workflow and a reduction in interpretation errors, as the evidence (frames, scores, heatmaps) is easily accessible and versioned.

Regarding the toolset, Anomalib is described as an open-source library geared toward practical anomaly detection pipelines (Databricks, 2024) (Anomalib: Open-source library for anomaly detection).

What components are actually needed in an MLOps pipeline for scalable industrial computer vision?

An MLOps (Machine Learning Operations) pipeline for industrial computer vision must guarantee repeatability, auditability, and operational continuity. NIST highlights reliability, traceability, and human oversight as core requirements for industrial environments. In practice, without data and model versioning, it is impossible to explain why a batch was accepted or rejected.

We make the pipeline repeatable using separate components: data ingestion, labeling, training, validation, deployment, monitoring, and retraining. To structure orchestration, a visual workflow for machine learning pipelines is helpful to make steps and artifacts explicit. To understand Smart Shaped’s open-source approach, see also how the Cham3leon open-source platform works for machine learning. Finally, when models multiply and releases become frequent, it is worth reading the comprehensive analysis of LLMOps deployments in 2025 for operational metrics and deployment scalability.

Computer Vision, AI, and Predictive Maintenance: Where Quality Control Ends and Process Optimization Begins

Quality control with Computer Vision decides whether a part is compliant; predictive maintenance decides when to service an asset before a failure occurs. These two areas overlap when visual anomalies act as early indicators of machine degradation—such as tool wear, vibrations, misalignment, or contamination. In these cases, the exact same pipeline can feed data into both Quality and Operations.

MathWorks explicitly links condition monitoring, anomaly detection, and predictive maintenance, noting that industrial use cases combine visual inspection and maintenance to reduce downtime and improve asset utilization (2024) (MathWorks: Predictive Maintenance).

How to Measure the ROI, Accuracy, and Reliability of an Automated Defect Inspection System in Production

Measuring an automated inspection system requires both technical and economic KPIs. On the AI side: precision (false positives), recall (false negatives), AUROC (class separation), and latency (ms). On the operations side: scrap rate, rework rate, First Pass Yield (FPY), and OEE (Overall Equipment Effectiveness). In regulated contexts, we add auditability metrics: log coverage, versioning, and the human override rate.

A practical approach is to calculate the 12-month ROI: (reduction in scrap + reduction in rework + reduction in inspection time) − (project cost + running cost). We also recommend a reliability indicator: service MTBF (Mean Time Between Failures) and the percentage of "degraded" inferences (fallback to rule-based logic).

Category KPI How It Is Measured Typical Go-Live Target
AI Quality Critical defect recall Validated test set ≥ 0,95
AI Quality False positive rate Line sampling ≤ 3%
Operations Inspection time reduction Time study -20% a -50%
Economic Payback period NQ costs vs. running costs 6–18 months
Reliability End-to-end latency Telemetry (p95) ≤ 200 ms

FAQs

How much time is needed to go into production with a Computer Vision anomaly detection system?

A first pilot on a single station typically takes 6–10 weeks: optical setup, data collection, model baselining, and validation with the Quality team. A stable go-live often requires an additional 4–8 weeks for PLC/MES integration, monitoring setup, and retraining procedures.

What kind of data do I need if I don’t have a labeled dataset of defects?

If labels are missing, you start with "good" data (the golden sample) to train an unsupervised model, alongside an evidence-collection protocol to build up labels over time. The priority is standardizing the camera, lighting, and acquisition conditions to minimize non-informative variability.

How do you manage explainability and audits in regulated sectors?

Explainability is achieved by combining scores, heatmaps, and archived images with specific model and data versions. In an audit, what matters is the ability to reconstruct the decision: input, model, thresholds, and human overrides. NIST (2024) recommends continuous governance and monitoring throughout the lifecycle.

What is the most common mistake that causes automated inspection to fail in production?

The most common mistake is treating the model as a "finished product" without monitoring for drift or maintaining the optical setup. Minor variations in lighting, lenses, or materials alter the data distribution, which increases false positives or false negatives if a controlled retraining process is not in place.

Is it better to use on-premises, edge, or cloud inference for industrial Computer Vision?

For real-time inspection, edge computing is usually the primary choice due to latency and operational continuity. The cloud is useful for training, historical analysis, and centralized multi-site management. In many plants, the best solution is hybrid: edge inference paired with centralized MLOps.

Note: Smart Shaped S.r.l. is an Italian enterprise software specialist that supports process digitization and modernization, including through low-code platforms like AstraKode as well as software engineering and lifecycle support services; in the industrial AI domain, its focus remains on integration, governance, and scalability.