최적의 클러스터링 및 유사도 학습을 이용한 이미지 패치 기반 이상치 탐지
Application of optimal clustering and metric learning to patch-based anomaly detection
- 주제(키워드) 이상치 탐지 , 패치 기반 , 클러스터링 알고즘 , k-nearest neighbor 알고리즘
- 발행기관 서강대학교 일반대학원
- 지도교수 김경환
- 발행년도 2021
- 학위수여년월 2021. 2
- 학위명 석사
- 학과 및 전공 일반대학원 전자공학과
- UCI I804:11029-000000065774
- 본문언어 한국어
- 저작권 서강대학교 논문은 저작권보호를 받습니다.
초록/요약
컴퓨터 비전에서의 이상치 탐지란 정상 이미지와 비교하여 이와 벗어난 ‘이상’ 이미지(비정상적 이미지), 또는 이미지 내 이상 영역을 찾아내는 문제를 말한다. 머신러닝/딥러닝을 이용한 방법들 중 하나로는 정상 이미지와 테스트 이미지에서 추출한 패치(patch) 별 특징 벡터(feature vector) 비교를 통해 입력된 패치 이미지가 정상에서 얼마나 벗어났는지 판단하는 방식이 있다. 이 방법은 정상 데이터와 직접 비교한다는 점에서 직관적이며 높은 성능을 보이나, 테스트 이미지의 패치별로 모든 정상 패치들과 비교를 해야 되므로 계산량이 매우 많고 비효율적이다. 본 논문에서는 이를 해결하기 위해 딥러닝 모델에서 추출한 특징 벡터들을 mini-batch K-means clustering을 통해 클러스터링하여 K-nearest neighbor(KNN)으로 더 쉽게 최단 거리를 찾는 방법을 제안한다. 먼저 딥러닝 모델 학습 시 정상 이미지 패치의 특성뿐만 아니라 최적의 클러스터링을 위해 제안하는 metric learning 및 관련 알고리즘들을 적용하여 클러스터 내 밀집도 및 클러스터 간 분산이 증가하도록 모델의 임베딩(embedding) 방식까지 같이 학습시킨다. 학습이 끝나면 모든 정상 이미지에서 패치 별 특징 벡터를 추출 후 특성에 따라 클러스터링 한다. 이를 기반으로 추론 시 입력 패치의 특징 벡터와 가장 비슷한 특성을 가진 최근접 클러스터 내 정상 특징 벡터들 간 최단거리를 KNN으로 찾으면 모든 벡터 간 비교 없이도 이상치 탐지를 할 수 있으면서 성능까지 향상 시킬 수 있다. 해당 딥러닝 모델을 MVTec-AD dataset의 정상 이미지로 학습 후 테스트한 결과 기존의 이미지 패치 기반 이상치 탐지 알고리즘 Patch-SVDD과 비교했을 때, 대부분 클래스에 대하여 탐지 성능 증가 및 약 10 ∼ 35%의 속도 증가를 달성하였다. 또한 ablation study를 통해 제안한 metric learning 및 관련 알고리즘들이 가지는 유효성을 입증하였다.
more초록/요약
In computer vision, anomaly detection is the problem of finding observations or events which are deviate from normal image/video data. One way of detecting anomalies is to extract pixel-wise or patch-wise normal features and measure minimum distance between each input patch feature and normal features. But such approaches make tremendously expensive computational complexity due to repeated calculations. This paper aims to reducing such computational burden by using optimal clustering of features extracted from a detection model composed of deep neural networks and metric learning which provides a way to make clusters of the features more separable. A set of loss functions is defined and used for training the detection model. When training is finished, the clustering result obtained from the training dataset is saved and used in the inference by measuring distances between the features of the input patch and the clusters. Our method has been applied to a patch-based anomaly detection, Patch-SVDD, to show its effectiveness. We conduct the experiment on MVTec-AD dataset and compare our test results with original Patch-SVDD. The results show that our method outperforms in most of classes and 10 ∼ 35% faster than Patch-SVDD. We also conduct ablation study to verify the effectiveness of our metric learning and each related algorithms.
more