transform the target domain sample to the source domain style sample
하지만 source data가 없이 target domain data와 정확한 translation을 하기 힘들다는 단점이 존재한다. 또한 OD task는 classification보다 더 highly unbalanced problem이기 때문에 (이는 negative sample, inaccurate segmented objects를 생성) 정확한 pseudo label을 생성해야하는 한계가 존재한다.
따라서 본 논문은 domain-specific perturbation을 이용하여 domain invariant space에 pertubation을 부여한다.
즉, target domain에 target domain-specific perturbation을 부여한 target domain dataset인 super target domain을 생성한다. 이 super target domain dataset을 target domain의 방향으로 alignment를 진행하면 perturbation이 부여되지 않은 target domain의 space가 domain invariant space로 이동한다는 것이다. 따라서 multiple target domain image의 평균낸 값을 domain perturbation으로 활용한다. 이후 super target domain을 얻기 위해서 추가적인 domain perturbation을 부여한다고 한다.
이렇게 생성된 super target domain과 mean teacher 구조를 활용하여 Source-free DAOD를 진행하는 논문이다.
Source data와 target label이 없는 Source free DASS task를 해결하기 위해 Knowledge transfer와 model adaptation 단계로 이루어진 SFDA framework를 제안한 논문이다.
Knowledge transfer
Data free KD에서 사용하는 방법을 사용하여 generator를 이용한 training sample을 reconstruct한다. 생성하는 방법은 기존 DeepInversion에서 사용한 방법과 유사하다.
Step 1) 가우시안 분포에서 뽑힌 random noises z를 input으로 사용하여 이미지를 생성
생성이미지의 mean, variance 값과 source model의 BN 내의 mean, variance 값을 활용
Step 2) the generative adversarial knowledge transfer mechanism
다음과 같은 매커니즘을 이용하여 noise optimization procedure 에서 시간이 걸리는 것을 방지.
또한 segmentation 테스크를 위해서 이는 source & target model의 discrepancy를 기반으로 하는 semantic-aware adversarial knowledge transfer를 적용. 따라서 본 논문은 세개의 모델 : pre-trained source model (fixed), the shared source model, the shared target model의 output space의 discrepancy를 이용한다.
Mean Absolute error (MAE)를 이용한 fixed source model과 shared source model의 output discrepancy
Dual attention distillation loss (Dual Attention Module 활용)
DAM은 spatial & channel attention map을 얻는 module로 fixed source model과 shared source model에 모두 활용한다.
share source and target model discrepancy
특히 DAD loss term은 generator에서 생성된 data가 source data의 contextual relationships을 잘 담고있지 못한 한계를 해결하기 위한 loss이다. 특히 target data가 source data와 유사한 semantic structure를 가지고 있기 때문에 이를 valuable knowledge로 판단하여 이 정보를 활용한다.
Self-supervised Model Adaptation
Data-free KD의 generator가 source domain의 정보를 담고 있다는 명확한 보장도 없고, 또한 이때문에 information이 잘 transfer 될 것이라는 보장이 없다. 따라서 self supervised learning을 이용한다.
target model이 target dataset을 예측한 결과를 봤을 때 patch 단위로의 예측 결과는 대부분 정확하다고 한다. 따라서 이런 정보는 uncertain or error patch에 도움이 되는 정보라고 한다.
[CVPR 2020]Unsupervised Intra-domain Adaptation for Semantic Segmentation through Self-Supervision에서 제안한 방법을 사용한다. 먼저 entropy-based ranking function을 이용하여 easy and hard group으로 split한뒤 adversarial 매커니즘을 이용하여 inter domain와 intra-domain gap을 줄인다.
하지만 현실적으로 source domain과 target domain의 gap이 매우 크기 때문에 target domain에서 intra-domain supervision을 위한 충분한 갯수의 easy split을 생성하기 어렵다. 또한 윗 논문과 다르게 본 논문은 source data에도 접근이 불가능하다.
따라서 본 논문은 예측결과인 feature map과 entropy map을 patch 단위로 나누며, entropy-ranking을 이용하여 easy & hard group을 분류했다. 이후 easy & hard sample을 분류하는 discrminator를 추가하며, 이 단계에서 Target model은 easy와 hard를 구분하지 못하도록 adversarial learning을 적용하여 학습을 진행한다.
- Exploit discriminative features in bounding boxes of objects
- Attempt to align them across both source and target domains
DAOD는 기존에 존재하는 source domain과 라벨이 아예 존재하지 않는 즉 객체의 class와 위치 정보가 전혀 제공되지 않는 targetdomain에서도 동일한 object detection 성능을 내는 것이 목적입니다. DAOD를 위한 domain mapping function에도 다양한 접근 방법이 존재하지만 주로 adversarial learning을 활용한 접근이 주를 이룹니다. 특히 Gradient reversal layer를 추가한 방법이 주를 이룹니다. 선행 연구에서 가장 시초가 되는 DA-Faster논문에 대해서 간단히 소개하도록 하겠습니다.
- Two-stage Object detector인 Faster RCNN을 베이스 라인으로 설정했습니다.
- Domain alignment를 위해 two-stage detector를 image-level & instance-level로 분리하여 domain adaptation을 진행합니다.
- Domain adatpation 단계에서는 GRL을 사용하여 feature extractor가 두 도메인의 분포를 alignment한 즉 domain confusion이 maximization이 되도록 학습하게 됩니다.
- Two-stage Object detector는 RPN을 통해 image-level (feature extractor)에서 RoI를 추출하기 때문에 결국 이 단계에서도 domain gap이 발생할 수 있습니다. 따라서 이를 줄여주기 위해 image-level과 image-level에서 추출된 instance간의 consistency regularization을 추가하여 다음과 같은 문제를 해결했습니다.
image-level의 domain classifier (patch 단위로 domain을 예측함 u,v는 domain classifier의 output map 사이즈)의 평균값이고 오른쪽은 instance-level의 domain 예측값을 의미한다. 그 값의 L2 값의 차이를 이용한 값을 regularization으로 활용한다.
DAOD benchmark
성능 측정을 위해 다음과 같은 데이터셋을 활용하여 DAOD의 성능을 평가한다. 측정결과는 OD에서의 성능 평가에 사용하는 mAP를 이용하여 성능을 평가했다.
(1)Aims to learn a target-specific feature encoding module to generate target data representations that are well aligned with source data representations
(2)No additional components like data generator or classifier within the training algorithm
Method
pipeline of SHOW framework
SHOT (Source HypOthesis Transfer)
Step1) Generate the source model from source data
Step2) Transfer the model (including source hypothesis) to the target domain
따라서 앞선 정보를 활용하기 위해 다음과 같은 framework를 통해 UDA테스크를 해결합니다.본 논문은 target domain feature extractor를 학습하기 위해서 앞 과정을 통해 사전 학습된 source model의 feature extractor의 파라미터로 먼저 target model을 initialziation한 뒤 학습을 진행합니다.특히 여기서 주목해야할 점은 이상적으로 target domain feature extracotr가 잘 학습됐다면 source의 hypothesis를 공유해서 쓸 수 있다는 가정하에 classifier를 freeze한 채로 domain adaptaation을 진행하게 됩니다.
다시 말해서 target feature extracto가 앞선 관점을 기반으로 source 같은 distribution을 가지게 된다면 source와 동일한 classifier를 사용하여 class를 잘 예측할 수 있다는 것입니다.
Step3) Improve adaptation performance by information maximization& self-supervised pseudo-labeling
Information maximization
따라서 본 논문은 source hypothesis를 이용하여 domain adaptation이된target encoder를 학습하기 위해 information을 maximization을 이용한 IM loss를 제안합니다. 앞서 말씀드린 것처럼 학습과정에서 classifier는 freeze한 상태로 학습이 진행됩니다.
information loss는 entropy minimization loss와 divergence loss 두개로 구성되어있습니다.
(1) entropy minimization loss는 cvpr논문 model adaptation 과 동일한 것으로 예측결과가 보다 명확해지도록 decision boundary 와 feature vector에 거리가 생기도록 합니다.
(2) divergence loss는 label이 없는 target domain의 distribution이 하나의 클래스에만 쏠려서 학습되는 현상을 막기 위해, 즉 전체적으로 다양한 class를 예측할 수 있도록 하기 위해서 각 클래스 별로 미니 배치의 예측 결과를 평균낸 확률 값의 entropy를 maximize하는 과정입니다.
source only와 show-im을 적용한 시각화 결과 본 논문이 제안한 loss로도 충분히 domain adatpation이 되는 것을 볼 수 있습니다. 하지만 자세히 보면 target data가 잘못된 source hypothesis에 매치 되어있는 것을 확인할 수 있습니다. 따라서 이런 잘못된 network의 output의 negative transfer를 방지하기 위해서, source hypothesis를 활용한 수도 라벨링 방식을 활용합니다. 하지만 여전히 source hypothesis가 domain shift로 인해 노이즈한 수도 라벨링을return 하기 때문에 이를 해결하기 위해 target domain의 각 클래스의 centroid 정보를 활용합니다.
Self-supervised Pseudo-labeling with target-specific centroids
정확한수도 라벨을 생성하기위한 target specific centroid를 생성하는 과정은 다음과 같습니다.
(1) 먼저 K개의 임의의 중심점(centroid)을 배치하기 위해 backbone에서 출력된 마지막 feature를 와이전 target hypothesis를 이용하여 target domain의 각 클래스의 centroid를 구한다. 이렇게 생성된 centroid 값은 target odmain의 다른 카테고리의 분포를 대표한다. 그리고 최종적으로 입력이미지의 feature와 cetroid값중 코사인 거리가 가장 가까운 클래스를 수도 라벨로 사용한다. 즉 각 데이터들을 가장 가까운 중심점으로 할당한다
(2) k-means 알고리즘에서 update 단계로 모든 데이터에 대하여 가장 가까운 cluster가 선택되면, 이를 바탕으로 다시 centroid를 수정한다.