Skip to content
ManufacturingMLIoT

Anomaly detection catching defects before they reach QA.

A manufacturing plant was losing $300K+ annually to production defects caught too late. We built an ML-powered anomaly detection system using sensor data and historical patterns that identifies defects in real-time on the production line.

40%Fewer defects
3-weekDeployment time
$300KAnnual savings
200msDetection latency
Executive Summary

The short version.

A precision manufacturing company was catching defects too late, after products had already passed through multiple production stages. By the time QA flagged an issue, materials were wasted, rework was expensive, and occasionally defective products reached customers.

We deployed an anomaly detection system using sensor data from the production line, leveraging our AI development expertise. The system analyzes temperature, pressure, vibration, and visual data in real-time, comparing against historical patterns to flag deviations within 200ms. Defects are caught at the point of origin, not after the fact.

The Problem

Defects detected too late cost exponentially more.

The plant had 40+ sensors on their production line generating data, but nobody was analyzing it in real-time. Quality control was reactive: inspect at the end, scrap what failed:

  • Late-stage detection: defects found in final QA after materials and labor had already been invested; rework cost 5× more than early detection
  • Sensor data unused: 40+ sensors generating gigabytes of data daily, stored but never analyzed in real-time
  • Inconsistent human inspection: visual QA depended on operator experience; miss rates varied from 2% to 15% across shifts
  • No pattern recognition: subtle correlations between machine settings and defect rates were invisible without statistical analysis
  • Customer returns: 0.8% defect rate reaching customers, damaging reputation and costing $120K+ annually in returns

They needed a system that could learn what “normal” looks like and flag deviations before they become defects.

The Solution

Real-time anomaly detection from existing sensors.

We built the system on top of their existing sensor infrastructure, no new hardware required. Following our approach to practical AI integration, the ML models learn from historical sensor data and production outcomes to identify patterns that precede defects:

  • Multivariate analysis: correlates data across temperature, pressure, vibration, speed, and humidity sensors simultaneously
  • Anomaly scoring: each production cycle gets a real-time anomaly score; threshold breaches trigger immediate alerts
  • Root cause hints: when anomalies detected, the system identifies which sensor readings are out of range and suggests likely causes
  • Visual dashboards: Grafana dashboards showing live production health, trend analysis, and historical anomaly patterns
  • Alert routing: critical anomalies to floor supervisors via SMS; trends to engineering via email; executive reports weekly
  • Model retraining: automated monthly retraining as production processes evolve; no data science team needed
Architecture

Stream processing with edge inference.

Sensor data streams through a time-series pipeline to ML models running on-premises for low-latency inference. Results push to dashboards and alert systems in real-time.

40+ SensorsTemp · Pressure · Vibration
TimescaleDBTime-series store
ML InferenceAnomaly detection
Alert EngineSMS · Email · Dashboard
GrafanaLive dashboards
scikit-learnIsolation Forest
Retraining PipelineMonthly auto

Edge inference | 200ms detection latency

The Isolation Forest model was chosen for its ability to detect multivariate anomalies without labeled defect data, critical since the plant had plenty of sensor data but no systematic labeling of what caused past defects. After 3 weeks of learning “normal” production patterns, the system started catching anomalies operators had been missing.

Stack Used
Pythonscikit-learnTimescaleDBGrafana FastAPIRedis StreamsDockerPrometheus On-premisesMQTT
Timeline
Week 1

Sensor Audit

Data quality assessment, sensor mapping, baseline measurement, historical data analysis

Week 2

Pipeline Build

Data ingestion, TimescaleDB setup, stream processing, feature engineering

Week 3

Model Training

Isolation Forest training, threshold tuning, alert rules, Grafana dashboards

Week 4+

Production Monitoring

Shadow mode validation, operator feedback, threshold refinement, automated retraining

Client Feedback
“The system caught a bearing degradation pattern that would have caused a $50K equipment failure. It paid for itself in the first month. Our operators now trust the alerts more than their own instincts.”

Plant Manager, Precision manufacturing company

Delivered under our internal engineering standards. View standards →

Want to catch defects
before they cost you?

We’ll assess your sensor data and show you what predictive models can detect.

Free consultationResponse within 24hNo commitment