Insights after two years within the industry
The scenario: a high-speed production line is producing 1000’s of products. Two cameras are installed to repeatedly control the standard of every product.
The goal: develop an algorithm that may check each product as fast as possible.
The constraint: you’ve got an edge device with limited resources.
On this blog post, we’ll divide and conquer the issue. First by extracting meaningful features out of the photographs after which through the use of anomaly detection models to detect outliers from those features.
The important thing idea is to learn a lower dimensional representation of the visual input and to make use of this representation to coach a classifier that may distinguish between normal and anomalous inputs.
We are going to explore some interesting methods for feature extraction, including histograms of oriented gradients (HOG), wavelet edge detection, and convolutional neural networks (CNNs).
Finally, we’ll cover two libraries that I discovered particularly useful to benchmark and implement algorithms in streaming data–PyOD and PySAD.
There are numerous ways to extract features from images. We won’t cover all of them on this post, but we’ll concentrate on three methods that I discovered particularly interesting:
- histogram of oriented gradients (HOG),
- wavelet edge detection, and
- convolutional neural networks.
Histogram of Oriented Gradients
The histogram of oriented gradients is a preferred technique in image processing and computer vision. The HOG descriptor can capture the form and aspect of an object in an image.
In just a few words, the HOG descriptor is a vector of histograms built as follows:
- The image is split into cells, e.g…