Problem
A high-speed production line makes thousands of products, and two cameras continuously check each one. The checking runs on an edge device with limited compute. Defects such as dents, scratches or holes are rare, so the author trains on normal images and needs only a few defect examples. A fast detector on a high-frame-rate line raised too many false alarms.
Example from the article: dents, scratches and holes on a plastic product were found with an auto-encoder trained on about 1,000 defect-free images. A line with cameras at 10 to 50 frames per second needed a much faster detector.
Solution in brief
Turn each image into a compact feature vector (HOG, wavelet edges or an autoencoder encoder), then score the vector with a light anomaly detector from PyOD or PySAD. Pick the feature extractor by the time available per product (in the author's cases). When a fast detector has too many false positives, send only its flagged images to a second, slower model.
Questions this case answers
- How to flag anomalous inputs in a high-rate stream of images when hardware is limited and almost no anomalous examples exist
- How to keep false positives of a fast streaming detector low when only a fraction of the inputs can afford a slow, accurate check
- How to check every product on a high-speed line with camera images on a weak edge device?
- How to detect defects such as dents, scratches or holes when only defect-free images are plentiful?
Tools and methods
- Histogram of oriented gradients (HOG) — shape descriptor of an image
- Wavelet edge detection — edges from wavelet subbands, also compresses images
- Laplacian auto-encoder — encoder that keeps neighbors of the input space close in the latent space
- Isolation Forest, KNN, HBOS — detectors for the baseline and for streaming scoring
- PyOD, PySAD — open-source libraries to benchmark detectors and score streaming data
Google or a one-time email code. No password.