SwitchOn

01

The station

Auto-parts plants with no reliable network, so nothing could go to the cloud and they require real time results within a few ms.

The station has a top industrial-grade camera over the conveyor, a Jetson Nano or Xavier running the models, a local screen for the operator, and a reject arm. Each part goes through one loop: image capture and reading, TensorRT inference, then the result on screen and the reject or OK trigger. One station runs three checks: surface defects, part count, and the stamped batch number.

The whole loop runs under 10 ms, fully offline.

02

Surface inspection

Defects are rare and never look the same twice: scratches, dents, porosity, missing features, some only a millimetre across. Labeled examples of each are hopeless to collect, but good parts come off the line by the thousand.

We framed it as unsupervised anomaly detection: learn only what good looks like, flag anything that doesn't fit. We tried one-class classification, autoencoders, and PaDiM, for which I wrote an unofficial TensorFlow implementation.

We deployed a Surface Inspection product that catches mm-level defects.

What makes this problem challenging? You can claim to catch the tiniest defects, but only within the variation your good parts showed during training. Lighting, the camera angle, and batch-to-batch differences all change how a good part looks. The more they vary, the wider the spread of "normal" at every point on the part. That forces a tradeoff: let small defects slip through, or catch them at the cost of false alarms and a high rejection rate.

Why not cover every way a good part can look? Sounds good, but capturing the full distribution of good parts is close to impossible. Too many factors are beyond your control.

Why not augment? An augmented image is a sincere attempt to simulate how the part will look under changed conditions, but reality is far from it. How light reflects and bounces inside a closed enclosure is very hard to predict without ray tracing.

03

Part counting

Are all the pieces there? Counting manufactured goods by eye is slow, repetitive work.

A YOLO detector boxes each piece, and the station compares the count against the spec. In a bearing housing, one missing box means one missing ball.

04

Batch OCR

Every part carries a stamped batch code. Stamped metal is hard to read: low contrast, glare, and characters that change with the angle of the light.

A character-level model finds the text lines and boxes each character. A CRNN reads a whole line as a sequence: a CNN turns the image into column features, an LSTM reads them left to right, and CTC decoding merges repeats and blanks into the final string.

It became a 0 to 1 OCR product, built for real-world industrial conditions.