--- title: openvino/anomalib 瑕疵檢測 tags: Anomaly Detection, Anomalib, python description: openvino/anomalib 瑕疵檢測 --- # Anomaly Detection 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**](https://github.com/openvinotoolkit/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) ![](https://i.imgur.com/VotzhmR.png) ## 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 ![](https://i.imgur.com/xWiB6JK.jpg) --- ## 參考 * https://github.com/openvinotoolkit/anomalib ## Thank you! :dash: You can find me on - GitHub: https://github.com/shaung08 - Email: a2369875@gmail.com