DeepLearning

[논문리뷰] CutPaste: Self-Supervised Learning for Anomaly Detection and Localization

jiheek 2022. 8. 4. 14:18

CutPaste: Self-Supervised Learning for Anomaly Detection and Localization (CVPR 2021, Google Cloud AI Research)

 

CutPaste: Self-Supervised Learning for Anomaly Detection and Localization

We aim at constructing a high performance model for defect detection that detects unknown anomalous patterns of an image without anomalous data. To this end, we propose a two-stage framework for building anomaly detectors using normal training data only. W

arxiv.org

keyword: Anomaly detection(이상 탐지)

이상 탐지에 대한 논문은 처음 읽어서, 포스트가 매우 길 것으로 예상된다..

 

Abstract

본 논문에서는 anomalous(이상한, 변칙의) 데이터 없이도 anomalous 패턴을 탐지할 수 있는 결함 탐지 모델을 설계했다. 두 단계의 framework로 구성되어 있으며, normal training data만 사용해서 이상 패턴을 탐지할 수 있다. 먼저, self-supervised deep representation을 학습하고, 그 다음으로 학습된 representation에 대해서 generative one-class classifier를 빌드한다.

Normal data를 분류하며 representation을 학습했는데, 이 때 CutPaste라는 이미지 패치를 잘라서 큰 이미지의 임의의 위치에 붙이는 augmentation 기법을 사용했다. 이를 통해 현실에 존재하는 다양한 종류의 결함들을 탐지할 수 있었다.

ImageNet에 대해서 사전 학습된 representation을 transfer learning 해서 SOTA를 기록했다고 한다.

Abstract만 읽어서는 감이 안온다. 계속 읽어보자!

 

 

Introduction

이상 탐지는 normal instance와 다른 결함 패턴을 찾는 것이 목표이다. 제조 결함 탐지, 의학 이미지 분석, 모니터링 등이 이에 해당된다. 다른 supervised 분류 문제와 다르게, 이상 탐지에는 몇 가지의 챌린지가 존재한다.

1. Labeled/unlabeled에 상관 없이, 결함 데이터들은 다량으로 얻기가 힘들다.
2. 고화질의 이미지에서는 결함이 작기 때문에, normal과 결함 패턴 사이의 차이는 종종 fine-grained 되어있다.

*fine-grained: 구분하기 힘든 class들을 구별해야 하는 task. 또는 세밀하게 접근해야 하는 다른 task들..

 

이런 한계점들 때문에 이상 탐지는 semi-supervised 또는 one-class classification(?)을 사용해왔다. 이상 패턴의 분포는 알려지 있지 않기 때문에, 먼저 모델이 normal한 데이터를 학습한 후, 만약 어떤 test 샘플이 모델에 의해서 잘 represent되지 않는다면 이는 이상 패턴으로 분류될 수 있을 것이다.

 

예를 들어, normal data를 reconstruct하도록 학습된 autoencoder는 reconstruct error가 높다면 데이터가 결함이 있는 것으로 판단할 것이다. 또한 generative model은 probability density가 낮을 때 결함으로 판단할 것이다. 하지만 pixel-wise reconstruction error 또는 probability density로 정의된 이상 score는 high-level semantic 정보를 놓칠 수 있다.