YoojLee / paper_review

paper review archive
6 stars 2 forks source link

Registration based Few-Shot Anomaly Detection (2022) #60

Open YoojLee opened 12 months ago

YoojLee commented 12 months ago

image

Summary

image Unified Few shot Anomaly Detection 방법론을 제안함. 기존의 Few shot setting에서는 카테고리 별로 하나의 모델을 학습하는 방식 (b) 였는데, inter-category의 commonality를 활용하여 one model for all categories를 따르는, Registration 기반의 Few-(Normal-)shot AD 방법론인 RegAD를 제안함. novel categories에 대해 fine-tuning이 필요하지 않도록 Normal Distribution Estimation을 통해 normal 이미지의 distribution을 추정하고, 이를 test 이미지와 비교하여 inference를 수행함. MVTecAD와 MPDD에서의 실험을 통해 기존 Few shot anomaly detection 방법론들을 outperform함을 보여줌.

cf.) Image Registration Image registration is the process of transforming different sets of data into one coordinate system.

Method Highlights

image 동일 카테고리 내 다른 정상 이미지들의 feature 간의 similarity를 최대화하는 방향으로 (이렇게 명시적으로 동일 카테고리 내부의 차이만 학습하도록 해서 category-agnostic하게 동작하도록 함. 즉, category 정보는 알아서 conditioned 된 형태인 것). 이때, negative pair를 활용하지 않기 때문에 collapse가 발생할 수 있으니 SimSiam 방식으로 asymmetric한 구조 (predictor on one side)를 차용함.

이때, Spatial Transformer Network를 feature transformation module로 각 블락 안에 삽입해서 조금 더 유연하게 feature registration을 학습할 수 있음. 각 transformation module 내부에서는 affine transformation matrix $A_i$를 학습하는 방향으로 구성.

image

RegAD 같은 경우에는 normal patch에 대한 distribution estimation을 사용하는데, PaDiM과 같이 multivariate Guassian distribution을 활용. Normal Distribution Estimation을 할 때에 N개의 augmentation을 적용 (이 augmentation은 registration을 학습할 때는 적용하지 않고, distribution estimation을 진행할 때에만 적용하는 것으로 보임)하여 statistic을 계산.

image

$\mu{ij}$의 경우에는 $F{ij}$의 sample mean.

Inference의 경우에는 PaDiM을 따라서 mahalanobis distance를 활용해 얼마나 해당 패치가 normal distribution과 떨어져있는지로 anomaly score를 measure하게 됨.

image

최종 anomaly map $\mathcal{M}_{final}$ (aligned with the original image)는 STN module에서 학습한 affine transformation의 inverse를 취해서 원래 이미지와 align되도록 한 후 얻을 수 있음. 이미지 전체의 anomaly score의 경우에는 해당 anomaly map의 max를 취하는 형태임.

Experiment Highlights

image

image

MVTecAD과 MPDD에서 다른 few shot AD 방식들과 비교했을 때, 성능이 상당 폭 개선된 걸 확인할 수 있음.

image

full image를 사용한 방법론과 비교해도 성능이 크게 뒤처지지 않음.

image image

individual training보다 category를 aggregate해서 학습하는 게 더 유리. -> inter-category commonality를 학습하기 때문에라고는 하지만, 결국에 이미지의 양이 많아지기 때문에라고 보는 게 맞을 것 같음. 이게 카테고리 정보를 condition하고 정상 이미지 간의 차이를 찾아내고 이를 align하는 게 학습 목적이기 때문에 많은 정상 이미지를 보는 게 유리할 것임. 따라서, 그런 면에서 오히려 여러 개를 보는 게 더 성능이 좋아질 것 (기존에는 멀티클래스로 학습하는 게 오히려 성능이 좋지 않았음에도 불구하고). 얘는 어떻게 보면 넣어줄 때 같은 클래스끼리 비교하는 형태로 넣어주기 때문에, 모델이 클래스 정보로 헷갈릴 이유가 거의 없음.

Strengths

Weaknesses