Anomaly Detection by Sparse Representations

The Problem
Anomaly detection problems are ubiquitous in engineering: the prompt detection of anomalies is often a primary concern, since these might provide precious information for understanding the dynamics of a monitored process and for activating suitable countermeasures. Here we address the problem of detecting defects in SEM images of nanofiber materials, and in particular to segment these images to quantitatively assess the area covered by defects.

examples of anomalies in SEM images of nanofibers

Figure 1: An example of Nanfiber Images containing anomalies. The filaments are very small (100 nm diameter) and follow a random pattern. Spurious elements like films or cluts have to be detected and measured.


Anomaly Detection by Sparse Representations

We design an algorithm that learns, during a training phase, a model yielding sparse representations of the structures that characterize correctly produced nanofiborus materials. Defects are then detected by analyzing each patch of an input image and extracting features that quantitatively assess whether the patch conforms or not to the learned model.

Core of the proposed solution is a dictionary learned that provide accurate reconstruction and sparse representations from normal data. During the anomaly detection phase, we solve the sparse coding problem of each test patch, and the resulting sparsity and the reconstruction error are used as data-driven features to measure the conformance of test patches with respect to the learned dictionary. Anomalies are then detected as patches corresponding to outliers with respect to the features distribution.
The proposed solution is very general and applies to different settings, including ECG monitoring. The solution have been expanded to handle resolution changes in the images, see [Carrera et al., 2016]

Results of the proposed algorithm


Figure 2: an illustration of detected anomalies in a nanofiber image.


Resources

References

[Carrera et al., 2017] Defect Detection in SEM Images of Nanofibrous Materials
Diego Carrera, Fabio Manganini, Giacomo Boracchi, Ettore Lanzarone
, IEEE Transactions on Industrial Informatics, Volume: 13 , Issue: 2 , April 2017, doi:10.1109/TII.2016.2641472
(Preprint), (Original), (Dataset), (Matlab Package),

[Carrera et al, 2016] Scale-invariant Anomaly Detection With Multiscale Group-sparse Models
Diego Carrera, Giacomo Boracchi, Alessandro Foi and Brendt Wohlberg
, Proceedings of IEEE International Conference on Image Processing (ICIP) 2016, ICIP 2016, Phoenix, AZ, USA, September 25 - 28, Accepted, 5 pages
(Preprint), (Original),

[Carrera et al, 2018] Online Anomaly Detection for Long-Term ECG Monitoring using Wearable Devices
Diego Carrera, Beatrice Rossi, Pasqualina Fragneto, Giacomo Boracchi
, Pattern Recognition Volume 88, April 2019, Pages 482-492 doi:10.1016/j.patcog.2018.11.019
(Preprint), (Demo Page)