【DA】 Self-supervised Augmentation Consistency for DA

  • Paper: Self-supervised Augmentation Consistency for Adapting Semantic Segmentation
  • Type: Self-supervised learning, Domain Adaptation
  • Contents
    • Dualing DQN network 기법을 사용할 방법이 없을까?

핵심 요약

  1. Self supervised learning의 기법을 사용해서, Domain Adaptation의 Sementic Sementation에 잘 적용했다.
    • The momentum network (:= Target-Q in RL)
    • Data augmentation & Noisy Student
    • New augmentation: Multi-scale crops & flips (좀 더 신뢰성 높은 Pseudo Labels을 만들기 위해)
  2. Long-tail 문제를 2가지 방향으로 바라본다.
    1. Long-tail Classes with a high image frequency: (100장 이미지에 90장에 존재하는) 이미지에 자주 나오지만, 작은 영역만 차지하는 것 (ex, 기둥, 신호등): 한 이미지 내에 클래스 마다 Threshold를 다르게 설정한다
    2. Few Samples: (100장 이미지에 10장에 존재하는) 이미지에 잘 나오지 않는 것 (ex, 버스, 트럭, 전차): Importance sampling을 통해, 10장의 이미지가 더 많이 batch에 들어가게 설정한다.
  3. 학습 전체 흐름
    1. Source only로 Network Pre-Training 수행
    2. Target domain 이미지에, Figure2와 같이 Crop하고 HW로 resize한 후, Network에 통과시켜 결과 추출
    3. 각 결과를 Average하고 Threshold 처리하여 Pseudo Labels 생성 (Target Image GT로 사용)
    4. Target Image에 Data Augmentation 적용 후 Network에 통과시켜 Predicted label 추출.
    5. Target Image (GT, Predicted)로, Class prior 을 이용한 Focal Loss 적용해 Backward.

image-20210612195215944

image-20210612195827260



Augmentation Consistency for DA

1. Abstract, Instruction, Relative work

  • adversarial objectives, network ensembles and style transfer 와 같이 cost가 많이 드는 작업 하지 않았다.
  • data augmentation techniques (MoCo) 의 기법을 아주 잘 사용했다.

2. Method

  1. Momentum Net 해몽
    • the mean teacher framework
    • temporal ensembling model
    • Critic network (Q function in RL)
    • our momentum network provides stable targets
    • (개인 의견: 개인적으로 Momemtun Net이 좋은 예측을 한다고 할 수 있는지 모르겠다. 그것보다는 Target-Q function을 적용했다. 라고 생각하는게 좋겠다. Target-Q function은 일정 Iteration이후에 Network를 갱신하지만, 여기서는 Momentum 방식을 사용했군. 이라고 생각하자. )
  2. Batch construction
    • Momentum Net이 Clean Input + Multi-Scale fusion에 의해, 신뢰성 높은 Pseudo Label을 생성한다.
    • Segmentation Model은 Noisy Input을 받는다.
    • (Noisy Student 기법 + Contrastive Learning 기법)
  3. Sample-based moving threshold
    • 학습을 중간에 멈추기는 싫고, Threshold는 초반에는 좀 낮췄다가 높히는게 맞고… 하니까! 자동으로 Threshold on-the-go 기법을 만들었다. (an exponentially moving class prior)
    • image-20210612202158618
    • 이해 안되는 것은 논문 및 코드 참조
  4. Focal loss with confidence regularisation (=class prior)
    • Cross Entropy Loss를 적용하면서 Long-tail problem 해결 관련 Term 추가한다.
    • 아래의 X_c의 정의는 위 사진의 Equ(1) 참조.
    • X_c 가 낮으면 higer weight가 loss에 주어진다.
    • image-20210612203103668
  5. Adaptive Batch Normalisation
    • Adaptive Batch Normalisation (ABN) [45] 사용
    • Source only로 모델을 학습시킬 때, 가끔 Target Images를 넣어준다. 그리고 BN안의 파라메터인 Mean and Standard Deviation을 갱신해준다. 나머지 Conv와 같은 파라미터는 학습되지 않도록 한다.
  6. Importance sampling
    • 3번의 Threshold 조정공식을 사용하는 것은 Long-tail Classes with a high image frequency 에게 좋을 수는 있지만 Few Samples 에서는 별 도움 안된다. 따러서 아래의 기법을 사용한다. (뭔가 정확하지 않을 수 있으니 코드 참조)
    • image-20210612203915090

3. Experiments


4. Results

image-20210612193521325

image-20210612195044298



【DA】 DHA-Open compound domain adaptation

  • Paper: Discover, Hallucinate, and Adapt: Open Compound Domain Adaptation for Semantic Segmentation
  • Type: Domain adaptation & Domain generalization
  • Opinion: 선배님 논문 & NIPS paper
    • Target domain들을 Domain latent로 분리한 것은 매우 흥미로웠다.
    • 하지만 결과를 살펴뵤면 K=3 일 때, 가장 성능이 좋다. 음.. K가 10이상으로 아주 클 줄 알았는데.. 의외다. Target Latent를 정확하게 찾아서 clusttering 한 것은 아닌듯 하다. Style imformation을 다른 곳에서 정확히 추출할 필요가 있다.(물론 여기서 Target dataset은 매우 제한적으로 사용한다. DG task가 아니다.)
    • 생각보다 Original. Open compound domain adaptation (for classification) 논문과 연관이 전혀 없었다.

【DG】 RobustNet- Improving Domain Generalization

  • Paper: RobustNet: Improving Domain Generalization in Urban-Scene Segmentation via Instance Selective Whitening
  • Type: Domain Generalization
  • Opinion:
    • 여기 있는게 다 새로워보이지만, 사실은 다 어디있던 개념이라는 것을 잊지말자.
    • 이미 normalization 에 대한 연구나, Style Transform에 대한 연구에 있던 내용들이다.
  • Key words
    1. Whitening Transformation이란, 초기 Layer의 Feature map에 대해 채널 방향 공분산 행렬이 단위행렬이 되도록 만든 변환이다. (==Feature map (CxHxW)를 [HW 백터 C개] 로 변환한 후, C개의 백터들에 대한 Covariance Matrix를 Identity Matirx 형태가 되도록 하는 것이다.), 이렇게 하면 이미지의 Style 정보가 제거 된다는 가설이 있기 때문에, 이 논문에서는 WT를 적절히 적용하기 위한 노력들을 하고 있다.
    2. Whitening Transformation을 정확하게 하려면 Eigen-decomposion이 필요하다. 하지만 이것은 computation-cost가 크다.
    3. 이것을 대체하기 위해서, deep whitening transformation Loss를 적용하면, Whitening Transformation이 이미 적용된 Feature가 나오도록 유도된다.
    4. deep whitening transformation Loss(Equ(5)) 함수를 그대로 적용해 학습시키면, 사실 수렴이 잘 되지 않는다.
    5. Feature map에 Instance normalization 을 적용하고, Equ(5) 를 적용하면 수렴가능하다!
    6. 하지만, Equ(5)이 covariance metric 내부 원소들에 모두 적용되면(-> Equ(10)와 같이) 그건 domain-specific info, domain-invariant info를 모두 지워버리는 행동이다.
    7. Covariance metrix에서 domain-specific element position만! 딱 그 부분에만 deep whitening transformation Loss(-> Equ(17)과 같이) 를 적용한다.
    8. 이렇게 하면 domain-specific info에 대한 covariance는 죽이고, domain-invariant info는 살릴 수 있어서, 옮바른 segmentation(recognition)이 가능하다!
  • Reference Site
  • Quastion
    • domain-invariant info를 굳이 Covariance metric에서 찾을 필요가 있나?
      1. Feature map에서 찾으면 안되나.
      2. 지금까지는 Channel-wise domain-specific/invariant info만을 찾았고, Spatial-wise specific/invariant info도 같이 찾으면 좋지 않을까?
    • K-mean cluster를 이용해서 기존의 n차원 원소들을 k개로 나누는 방법은, 심박하다. 언젠간 쓸모가 있으려나.
    • Figure7을 어떻게 생성한거지? whitening이 된 feature map을 어떻게 다시 이미지로 mapping 시켰을까? 코드 레벨로
    • 나머지 의문은 성능을 직접 테스트 해보고 알아보자.

【Attention】 Dual-attention & Scale-aware for segmentation

Pagination


© All rights reserved By Junha Song.