기존 NF-based methods는 모든 feature를 강제로 하나의 distribution( unit normal distribution)으로 바꾸는데, features는 locally distinct semantic information을 가질 수 있기 때문에 distribution이 다를 수 있음.
따라서 기존 방식은 학습을 어렵게 하고 nomal/abnormal를 구분하는 데 있어 network의 discriminate 역량을 제한함.
본 논문에서는 input image의 각각의 위치에 대한 feature distribution을 different distribution으로 transform 하는 방법을 제안함
NF 방식으로 주어진 이미지에서의 각각의 위치에서 feature distribution을 매핑하는 것을 학습한다.
추가로 discriminability를 강화하기 위해 abnormal data 분포를 정상 데이터와 확실히 다른 분포로 매핑한다.
Introduction
Normalizing Flow(NF) 방식이란?
density estimation을 더 잘하기 위해서 reversible function sequence를 학습해서 인풋 데이터의 복잡한 분포를 간단한 분포(ex. normal distribution)로 매핑하는 방식임.
NF의 목표는 정상 샘플에 대한 reliable density estimation을 통해 정확한 이상 탐지를 수행하는 것임.
기존 NF 방식들의 문제
복잡한 분포를 단지 하나로 매핑하는 데에만 모델이 의존함.
다른 location, scale, image에 해당하는 features는 다른 분포를 따를 수 있지만 이전 연구들은 이런 multi-modal distribution을 단순히 하나의 normal distribution으로 매핑하려고 시도했다.
different locations, images에서의 features는 다른 분포를 따를 수 있음을 고려해서 본 논문에서는 이미지의 각 위치에 해당하는 features에 대해 각각 다른 분포로 adaptively embed 함.
(related work에서도 classification에서 different semantics를 가지는 이미지를 different distribution으로 변환하는 것의 이점을 발견한 바 있었음에도 기존 연구들은 single normal distribution으로 매핑하고 있다고 지적.) 본 논문에서는 locally varying base distributions를 가정하면서 더 나은 density estimation capability를 가지는 NF 방식 제안함.
정상 데이터의 각 location을 평균이 0, 분산은 다 다른 가우시안 분포로 매핑. 즉, locally different distribution으로 feature를 embedding 함
배경과 같은 간단한 지역의 경우 추정한 분산이 작음을 확인했고 좀 더 복잡한 지역에서는 분산이 증가함을 확인.
Method
Synthetic anomaly generation
이 논문에서도 data augmentation(CutPaste) 수행해서 synthesize local anomalies -> NF 학습할 때 anomaly features도 학습해서 정상 특징으로부터 distinct 되는 분포 학습함.
근데 CutPaste에서 좀더 realistic하게 하기 위해서 blurring the borders of extracted patches, 이 패치들에 diverse color jittering values 적용.
패치 크기는 랜덤으로 해서 다양한 abnormal region 얻었고 학습 시에 이 모든 type의 patch랑 정상 데이터랑 동일 비율로 학습함.
인풋 이미지에 대해 locally different base distribution을 가진다고 가정하기 때문에 binay mask M을 각 synthetic anomaly image마다 수행해서 각 pixel location이 정상에 해당하는지 이상에 해당하는지 알도록 함.
Feature Extractor
multi-scale feature pyramid는 다양한 크기의 anomalies를 다루기 좋음. 각각 다른 스케일은 해당하는 사이즈의 region에 대한 information을 캡쳐할 수 있기 때문임.
따라서 pre-trained CNN으로 k-level feature pyramid 씀. (k=3)
Semantic-aware normalizing flow
K independent NF model 써서 k-level 피라미드 피쳐에 대해 different scale을 다룸.
spatial information을 다루기 위해 각각의 feature vectors는 해당하는 position embedding vector랑 concat됨.
하지만 이렇게만 해서는 feature vector v에 대해 locally varing base distribution을 만들기에 부족.
semantic-aware base distribution
semantic-dependent base distribution을 Gaussian distribution with statistics로 인스턴스화 함.
lightweight statistics prediction을 통해 주어진 feature v에 대한 statistics를 추정함. 그런데 평균, 분산을 모두 추정하는 것은 어렵기 때문에 분산만 추정하는 것이 이득이라고 주정.
따라서 정상 region에 대해 평균을 0, 이상에 대해 평균을 1로 고정함. 이렇게함으로써 정상과 이상 간의 minimal overlap -> NF가 정상 이상에 대한 distinct distribution을 학습하는 것을 도움.
샘플이 non i.i.d일 경우 inverse Gamma distribution으로부터 추정함. 이미지 픽셀과 semantic features는 non-d.i.d이기 때문에 아래와 같이 추정
loss function
m은 binary mask(indicator)임. 정상이면 0 이상이면 1
정상일 경우 Za가 base distribution을, 이상일 경우 Zn이 base distribution을 represent 하게 됨.
Abstract
Introduction
Method
Synthetic anomaly generation
Feature Extractor
Semantic-aware normalizing flow
semantic-aware base distribution
loss function
Experiments