Catching the defect at the line, not at the customer

A German engine manufacturer replaced manual visual inspection at end of line with computer vision. Pexon built custom CNNs on Databricks with dual detection covering both classified known defects and unsupervised unknown anomalies, plus a self-service interface with real-time alerting. Downstream cost of defects fell by up to 80%.

Outcome
up to −80%
Downstream cost of defects
toward zero
Reaction time at the line
Known defects and unknown anomalies
Detection modes
Automated, gap-free
Quality record

The engagement at a glance

Written for the plant or quality manager who knows roughly what escaped inspection last year, knows what it cost in transport and rework, and has been told that a vision system needs a labelled dataset nobody has time to build.

CustomerLeading German engine manufacturer, agricultural and off-road markets, international production halls
Use caseEnd-of-line optical quality assurance replacing manual visual inspection
StackPython, OpenCV, custom CNNs, Databricks, cloud infrastructure built greenfield, self-service WebGUI, alerting, anomaly detection, SAP interface
DetectionDual: classification for known defects, unsupervised anomaly detection for unknown ones
ComplianceIndustrial data protection covering production and construction data
Operated byPlant staff, through a self-service interface

Manual inspection scales by hiring, and misses what nobody is looking for

End-of-line quality assurance was a manual visual check. That approach has two structural limits, and neither is about the diligence of the people doing it. Its throughput scales only by adding inspectors, and its consistency varies with shift, fatigue and attention.

The expensive part is not the inspection, it is what happens downstream when something gets through. A defect caught at the line costs a rework station. The same defect caught after shipment costs a recall, transport in both directions and late rework, and it arrives with a customer relationship attached.

The reason this had not been automated already is the reason it usually has not: a classifier needs a labelled dataset of defects, building one is slow, and until it is complete the system detects nothing. Meanwhile the defects that hurt most are frequently the ones nobody has seen before and therefore nobody has labelled.

Two detectors, because a classifier only finds what it was taught

The system detects in two ways at once. A classification path built on custom CNNs recognises known defect types. An unsupervised anomaly detection path flags units that simply do not look like a good one, whether or not that failure mode has ever been catalogued.

The second path is what makes this deployable rather than a long labelling project with a system at the end. A classifier alone passes every failure mode absent from its training set, silently and with full confidence, and those are disproportionately the defects that become recalls. Anomaly detection needs far less labelled data because it learns what normal looks like instead of what each defect looks like, so the system is useful before the label set is finished and keeps covering the gap afterwards.

Custom CNNs were built rather than a general-purpose vision model adapted, because the defects are specific to these products and these production halls, and because the model runs against a fixed camera setup where a purpose-built network is both smaller and more accurate than a general one.

Trade-off: Anomaly detection produces false positives, and every false positive costs an operator a look. Tuning that threshold is a business decision rather than a technical one: too sensitive and the line learns to ignore alerts, too permissive and the second detector stops earning its place. Running both paths also costs more to build and more to maintain than a single classifier, and it was accepted deliberately because the unknown-defect case is where the downstream money is.

Operated by the plant, connected to the production record

Plant staff run the system through a self-service web interface with real-time alerting rather than depending on the team that built it. That was a requirement, not a nicety. Products change, production changes, and a vision system that only its authors can adjust becomes shelfware at the first variant.

Results flow into SAP, so inspection becomes part of the production record instead of a parallel dataset in a separate tool. The automated, gap-free quality record is frequently worth more than the detection itself, because it is what answers a customer or an auditor asking what happened to one specific unit on one specific day.

Computer vision capability was built inside the customer's own team alongside delivery, which is what determines whether the second use case needs a consultancy at all.

  • Classification for known defects, unsupervised anomaly detection for unknown ones
  • Custom CNNs matched to the product and the camera setup
  • Self-service WebGUI with real-time alerting, operated by plant staff
  • SAP interface, so inspection joins the production record
  • Greenfield cloud infrastructure on Databricks
  • Computer vision capability built inside the customer's team

What changed

The downstream cost of defects, meaning recalls, transport and late rework, fell by up to 80%. Reaction time at the line moved toward zero: a flagged unit is flagged as it passes, not discovered in a later batch review.

Manual visual inspection was replaced by an automated and gap-free quality loop. The difference between those two is not only cost. A manual check produces a decision; an automated loop produces a decision and a record, and only the second one is evidence.

What this case study does not prove

The up-to-80% reduction is a reduction in the downstream cost of defects, not in the defect rate. Those are different numbers and conflating them is the most common dishonesty in vision case studies. The system catches more, and catches it earlier, which moves cost from the field to the line; it does not make the production process itself produce fewer defects.

Anomaly detection also has a cost this page has been explicit about: false positives. Every one costs an operator a look, and the threshold that balances that against missed defects is a business decision that has to be owned by the plant rather than set by whoever trained the model. A team unwilling to own that number will end up with alerts everybody ignores, which is worse than no second detector.

And the custom CNNs are specific. They were built for these products, these cameras and these production halls, and they do not transfer to a different line without retraining. What transfers is the dual-detection architecture and the decision to make the interface self-service, because both are about who can keep the system alive after the consultants leave.

Before and after

DimensionBeforeAfterEffect
InspectionManual visual check at end of lineAutomated dual detectionThroughput no longer scales by headcount
Unknown defectsFound downstream or by a customerFlagged by unsupervised anomaly detectionThe expensive class of defect stops escaping
Downstream cost of defectsRecalls, transport, late reworkUp to 80% lowerCost moves from the field to the line
Quality recordDecision without evidenceAutomated and gap-free, in SAPTraceable per unit for customers and auditors

Questions buyers ask about this

How much can automated visual inspection save?

In this deployment the downstream cost of defects, meaning recalls, transport and late rework, fell by up to 80%. That is where the money in quality assurance actually sits: catching a defect at the line is inexpensive, and catching it after shipment is not.

What happens with defects the model has never seen?

They are caught by a second, unsupervised path. Classification handles known defect types and anomaly detection flags anything that simply does not look like a good unit. A classifier alone silently passes every failure mode absent from its training set, which is precisely the class of defect that turns into a recall.

Do you need labelled training data before starting?

For the classification path, yes, and the labels have to come from people who know the product. The anomaly path needs far less, because it learns what normal looks like rather than what each defect looks like. That asymmetry is why the dual approach is worth the extra engineering: it lets the system be useful before the label set is complete.

Who operates the system once it is live?

Plant staff, through a self-service web interface with real-time alerting. That was a design requirement rather than a convenience. A vision system that only its builders can adjust becomes shelfware the first time the product changes, and products change constantly.

How does this connect to the rest of the production stack?

Through an SAP interface, so inspection results become part of the production record rather than a parallel dataset in a separate tool. An automated, gap-free quality record is worth more than the detection itself when a customer or an auditor asks what happened to a specific unit.

Next step

The defects that cost most are the ones nobody labelled

If a labelled defect dataset is what has been blocking automated inspection, the two-week blueprint is the cheapest way to find out whether the anomaly path alone already earns its place on your line.