Training visual anomaly detection models involves developing algorithms to identify unusual patterns or anomalies in image data that do not conform to the expected behavior. These models are crucial in various applications, including industrial inspection, medical imaging, and logistics.
Today, we are happy to announce the release of a new visual anomaly detection architecture in Edge Impulse, FOMO-AD, available now for your production-ready edge AI pipelines.
Designed for engineers
This feature has been designed for real-world scenarios where companies cannot collect samples for every anomaly, especially for unanticipated defects! To achieve this, we rely on unsupervised learning techniques that don’t need any faulty data to train the models.
This model architecture can be fully integrated with your production-ready machine learning pipelines and increase the collaboration between embedded system teams and machine learning teams. We provide on-device performance estimations for each model iteration and this architecture is supported on any edge AI hardware, from MCU to GPU.
This feature also opens a new range of applications that were not previously possible due to limited edge hardware resources, bandwidth requirements, or data privacy concerns.
In short, this feature offers a practical solution to the industry’s need for efficient, on-device processing of visual data for anomaly detection that accelerates the development cycle and delivers customized models fine-tuned for specific applications.
How does Edge Impulse Visual Anomaly Detection work?
The implementation of Visual Anomaly Detection at Edge Impulse is based on the foundation of the FOMO architecture — an object detection architecture specifically tailored for constrained devices. Keeping the same approach, the classification head can be changed with an anomaly detector head, here a Gaussian Mixture Model (GMM). The application of GMM on the feature maps allows for a nuanced detection of irregularities, providing outputs that include not only the presence of an anomaly but also its specific location within the image.
And this works on all ranges of edge AI targets from MCU-based to GPU-based devices with the same performance as FOMO!
This visual anomaly detection architecture can be found in Edge Impulse Studio under the name FOMO-AD and is integrated with the EON Tuner to drastically accelerate the hyper-parameter searches of your models while respecting your hardware target constraints.
See the dedicated FOMO-AD documentation page for more information.
Traditional methods
The visual anomaly detection field has advanced significantly over the past few years, employing techniques that leverage both traditional machine learning and deep learning methodologies.
There are several different existing approaches to detecting visual anomalies, the following ones are not mutually exclusive and can be combined in various ways to enhance the performance of anomaly detection systems. The choice of method often depends on the specific application, the nature of the data, and the availability of labeled examples.
1. Supervised learning using classification techniques
One traditional approach is to detect anomalies by classifying images between anomalies and normal ones. The models are trained on labeled data of both normal and faulty images. This method, although supported on MCU-based devices, is limited by the availability of labeled anomalies.
2. Unsupervised learning using autoencoders
Another method is to use neural networks that learn to compress and decompress the input data, effectively learning a representation of the normal data. Anomalies are detected based on the reconstruction error. This method gives good results but consumes large computational resources, making it not suitable for Edge AI applications.
Use cases and examples
Visual inspection of thermostatic valves:
In this project, we have a dataset collected that depicts the correct production characteristics of a thermostatic valve. However, the two highlighted parts have defects, thus registering as anomalies. On the left part, an extension and extra bolt are present, and on the right, the bottom washer (black ring) is missing from the final product.
Project link: studio.edgeimpulse.com/public/377568/live
Visual detection of concrete cracks:
Visual inspection of surfaces like brick, concrete, or steel can be achieved by looking for anomalies, as well. Here, we have trained a model on the normal visual properties of concrete. FOMO-AD is able to identify cracks in the material as anomalies, thus indicating areas that will require structural inspection.
Project link: studio.edgeimpulse.com/public/288658/live (1)
If you want to use our Visual Anomaly Detection architecture in your Edge Impulse project or need help building a solution for your particular application, please sign up for an Enterprise Trial!
Happy discovery!
Datasets
(1): Maguire, M., Dorafshan, S., & Thomas, R. J. (2018). SDNET2018: A concrete crack image dataset for machine learning applications. Utah State University. doi.org/10.15142/T3TD19