sy00n / DL_paper_review

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

[26] DenseCLIP: Language-Guided Dense Prediction with Context-Aware Prompting #31

Open sy00n opened 11 months ago

sy00n commented 11 months ago

Abstract

Introduction

Q. Whether the impressive ability of CLIP can be transferred to more complex vision tasks like dense prediction?

-> 위 observation을 바탕으로 이미지 임베딩을 language-compatible feature map으로 활용할 수 있음. (ex. ViT와 같은 구조들에서 z는 output에서 class token을 제외한 것)

그렇다면 text features를 어떻게 구하냐

Context-Aware Prompting

CoOp과 동일한 방식으로 learnable textual context를 학습시킴.

image

가장 기본적인 방식으로, P는 learnable textual context를 의미하고 e_k는 k번째 클래스에 대한 word embedding을 의미함.

Vision-to-language prompting

아래 1,2, 방식은 transformer decoder의 query를 뭘로 주냐에 따라 설계 방식이 다름.

  1. Pre-model prompting : 직접적으로 image context를 사용해서 desired text input를 생성하는 과정임. (fig 4 참고)

    image

    q는 learnable queries이고, v는 extract 된 visual context.

    즉, 식 3에서 learnable textual context P를 여기선 v로 대체해서 text encoder에 피드해주는 것.

  2. Post-model prompting : class embedding을 refine하는 과정임. (fig 4 참고)

    image

    • CoOp처럼 text features를 만들면 이걸 직접적으로 Transformer decoder의 queries로 씀.
    • 이렇게 학습하게 되면 text features가 조금 더 연관있는 visual clues를 찾을 수 있음.
    • 그리고 text features를 residual connection으로 업데이트함. image 여기서 감마는 residual의 스케일을 조절하는 learnable paremeter.임. 감마는 매우 작은 값으로 initialized 서 text feature로부터의 language priors를 최대한 보존함.

    두 varient target 모두 목적은 같지만 다음과 같은 이유로 post-model prompting을 선호함

    1. post-model prompting은 efficient하다.
      • pre-model prompting은 input이 image에 dependent하기 때문에 inference시에 text encoder로의 추가적인 forward pass가 들어가게 된다.
      • 하지만 post-model prompting의 경우 학습 시의 extracted text features를 저장해놨다가 쓸 수 있기 때문에 inference 시의 overhead를 줄일 수 있다.
    2. empirical results가 post의 성능이 더 좋음을 보여줌.

Instantiations

Object Detection and Instance Segmentation

image

image

DenseCLIP for Any Visual Backbone

실험 결과에 의하면 DenseCLIP can also perform well with other backbones.

Although there are no strong correlations between the feature maps of the new backbone and the text features output by the CLIP text encoder, we hypothesize that if we preserve the language priors by freezing the text encoder as before, the text encoder will guide the backbone to better adapt to downstream tasks.

image

ResNet+Semantic FPN, SwinT+UperNet를 비교했다.

We demonstrate that our DenseCLIP can consistently improve all the baseline models notably.

Text encoder는학습때만 쓰면 되기 때문에 low-cost solution이다.

Visualization

image