Anomaly detection is a step in data mining that identifies data points, events, and/or observations that deviate from a dataset’s normal behavior.
Anomaly datasets are usually not easy to collect. So in some situation, we only have normal data to train. So we use anomaly detection model to train, the model can find the deviate from a dataset’s normal behavior.
Anomalib
Anomalib is the libary provided by openvino. The libaray is meaning to do anoamly detection. Anomalib provide the following model:
- CFlow
- PatchCore
- PADIM
- STFPM
- DFM
- DFKDE
- GANomaly
Use pathcore sample and get the result below. The confidence score higher the data is more like abnormal data, and pathcore also do segmentation of the flawed part. (the red and yellow part)
Simply test result
Define with five fingers opened is normal data, and all the others are abnormal. Use about 200 datasets to train. And below is test result,
Train