Anomaly Detection(異常檢測)包括Novelty Detection(奇異值檢測)和Outlier Detection (異常值檢測)。
奇異值檢測:訓練數據不包含異常值,只含有positive(正常)的數據,通過算法學習其pattern。之后用於檢測未曾看到過新數據是否屬於這個pattern,如果屬於,該新數據是positive,否則negative,即奇異值。
異常值檢測:訓練數據中含有異常值,通過相關算法找到訓練數據的中心模式,忽略偏差觀測值,從而檢測出異常值。
本篇博客進行《Novelty Detection案例總結(只訓練正常樣本)》
1、GMM分類器檢測網格缺陷(mlp、svm同理)
create_class_gmm (5, 1, [1,5], 'spherical', 'normalization', 5, 42, GMMHandle)
add_samples_image_class_gmm (ImageTexture, Rectangle, GMMHandle, 2.0)
train_class_gmm (GMMHandle, 100, 0.1, 'training', 0.0001, Centers, Iter)
classify_image_class_gmm (ImageTextureReduced, Correct, GMMHandle, 0.000002)
【halcon案例】novelty_detection_gmm.hdev、novelty_detection_mlp.hdev、novelty_detection_svm.hdev
2、基於GMM分類器的紋理檢查模型
apply_texture_inspection_model,詳情參考我的另一篇博客《Halcon 紋理缺陷檢測 apply_texture_inspection_model》。
3、深度學習
apply_dl_model,詳情參考我的另一篇博客《Halcon深度學習——奇異值檢測》。