sy00n / DL_paper_review

issues에 논문 요약
0 stars 0 forks source link

[44] SegFormer : Simple and Efficient Design for Semantic Segmentation with Transformers #49

Open sy00n opened 8 months ago

sy00n commented 8 months ago

Abstract

  1. Hierarchically structured Transformer encoder 구조 : multiscale features를 내뱉음. positional encoding이 필요 없기 때문에 학습 이미지와 다른 해상도의 테스트 이미지의 positional code를 interpolation 할 필요가 없음.

  2. Lightweight 디자인의 MLP decoder : Complex decoder가 필요 없음. MLP로 다른 층들의 information을 aggregate하고 local attention과 global attention을 combining함으로써 powerful representation을 얻음.

image

Introduction

  1. 본 연구에서 제안하는 인코더는 inference시에 학습 데이터와 다른 해상도를 가지는 이미지의 positional code를 interpolate하지 않아도 됨.
    • 결과적으로 성능에 영향을 미치지 않으면서 임의의 테스트 해상도에 쉽게 adapt 될 수 있음.
    • 또한 hierarchical 부분은 인코더가 high-resolution fine features와 low-resolution coarse features 둘 다 생성할 수 있도록 함. 이는 고정된 해상도의 single raw resolution feature map만 생성 가능한 ViT와 다른 점임.
  2. Lightweight MPL decoder의 핵심 아이디어는 Transformer-induced features의 장점을 활용해서 lower layers의 attention은 local, highest layer는 highly non-local하다는 특성을 활용함.
    • 즉, local하고 global한 문맥 정보를 모두 잘 활용할 수 있음.
    • 결과적으로 간단하고 직관적인 디코더로 powerful representation을 만들 수 있음.
    • model size, run-time, accuracy면에서 장점을 demonstrate함. (데이터셋은 ADE20k, Cityscapes, COCO-Stuff)

Method

가장 큰 특징 두가지

  1. Hierarchical Transformer encoder : 고해상도의 coarse한 특징들과 저해상도의 Fine-grained 특징들을 추출함. 특히 PE(Positional Encoding)를 사용하지 않았기 때문에 inference 시에 다른 크기의 이미지를 사용해도 성능 저하 적음.

  2. 경량화된 Decoder : 더 적은 연산량을 가지며 인코더에서 얻은 모든 특징들을 모두 활용해서 최종출력을 얻어냄 image

1. Hierarchical Transformer Encoder (Mix Transformer, MIT)

  1. Lightweight ALL-MPL Decoder
    • 오직 MLP 층으로만 구성된 lightweight decoder을 통해 다른 방법론들에서 전형적으로 쓰이는 hand-crafted, computationally demanding components를 피함.
    • 이렇게 간단한 디코더가 가능했던 이유는 Hierarchical Transformer encoder가 traditional CNN encoder보다 large effective receptive field(ERF)를 가지기 때문임.

image

  1. MiT 인코더에서 나온 multi-level feature을 MLP layer에 넣어서 channel 차원을 동일하게 통합함.
  2. feature를 원본이미지의 1/4로 upsample하고 concat함.
  3. concat하면 채널이 4배 증가되었기 때문에 MLP층 거쳐서 원래 채널 차원으로 projection
  4. fused feature로 predict (카테고리 수만큼의 demension으로)

Effective Receptive Field Analysis

image

Relationship to SETR

Experiments

image Table 1은 모델 규모에 따른 성능 비교임. 인코더 크기, 디코더 MLP 차원, PE vs Mix-FFN, CNN과의 비교를 하고 있음. 디코더 MLP demension은 256을 디폴트로 함. 특히 Mix-FFN의 경우 두 가지 해상도에 대해 실험을 진행했는데, inference image의 크기가 극단적으로 다를 경우 mIoU가 PE에 비해 확실히 좋은 것을 확인할 수 있음. 또 1d를 보면 CNN based encoder랑 MLP decoder를 coupling하게 되면 확실히 transformer encoder보다 accuracy가 떨어진는 것을 볼 수 있음. 이는 직관적으로 CNN이 Transformer보다 작은 receptive field를 가지기 때문에 decoder가 충분힌 global representation을 얻지 못했을 것으로 해석하고 있음. image Table 3은 동일한 deocder에 대해 두 개의 인코더(ViT, Swin)와 비교하고 있음. 본 연구에서 제안하는 MiT 인코더가 Swin,ViT보다 나은 결과를 보임.

image Table2는 SOTA method와의 비교실험임. (FLOPS, latency, accuracy 비교) 모든 데이터셋에 대해 mIoU가 outperform하는 결과를 보임.

image Table 5는 자율주행을 위한 데이터셋에 대한 실험 결과인데 corruption, perturbation에 얼마나 robustness한지를 평가하기 위함임. Citiscapes-C는 Cityspaces의 validation dataset임. 그 결과, CNN-based 방법론보다 확실히 좋은 성능을 보였으며 여러 환경에서도 robust한 결과를 보임. (이 실험은 zero-shot 실험이라고 주장하는 것 같은데 살짝 애매함. 본문에는 없고 결론에서 zero-shot이라고 함...하지만 개인적으로는 zero-shot으로 볼 수 있을것같다는 생각)

Conclusion