[24’ ICLR] Ferret: Refer and Ground Anything Anywhere at Any Granularity

Date:     Updated:

카테고리:

태그:

image


🔍 Abstract

image

ICLR 2024 Spotlight 받은 논문으로, Apple에서 발표한 논문이다. 이 논문에서 소개하는 Ferret 모델은 기존 모델들이 bounding box만을 spatial input으로 사용하는 것과 달리 arbitrary shape의 spatial input을 사용할 수 있다. 이를 위해 spatial-aware visual sampler라는 모듈을 제시하였다. 또한, output도 bounding box로 내놓을 수 있어 grounding이 가능하다. 그래서 저자들은 논문의 제목을 Refer(Input) and Ground(Output) Anything Anywhere at Any Granularity로 지었다. 또한 저자들은 refer-and-ground instruction tuning을 위한 1.1M 개로 구성된 GRIT 데이터셋을 구축하였다. 다른 모델과의 비교는 아래와 같다.

image


1. Ferret

1.1. Hybrid Region Representation

image

저자들은 bounding box의 문제점을 위 그림으로 설명한다. 두 object는 분명 동일한 bounding box를 가지고 있지만 서로 명확히 다른 object이다. 이를 해결하기 위해 저자들은 hybrid region representation을 제시한다. 즉, 기존에 point $\lbrace x, y \rbrace$ 혹은 box $\lbrace x_ {\text{min}}, y_ {\text{min}}, x_ {\text{max}}, y_ {\text{max}} \rbrace$로만 표현되던 spatial information 대신 hybrid feature를 사용한다. 먼저, Point, box, 혹은 arbitrary shape mask $\mathbf{M}$에 대하여 image feature map $\mathbf{Z}$로부터 visual feature $\mathbf{f} = s(\mathbf{M}, \mathbf{Z})$를 추출한다. 이때, $s$는 spatial-aware visual sampler이다. 그리고 이를 기존 feature와 합쳐 나타낸다. 즉, point인 경우에는 $\lbrace x, y, f_ {R_ p} \rbrace$, box 또는 free-form shape인 경우에는 $\lbrace x_ {\text{min}}, y_ {\text{min}}, x_ {\text{max}}, y_ {\text{max}}, f_ {R_ b} \rbrace$로 나타낸다. 실제로는 ⟨region name⟩ ⟨coordinates⟩ ⟨SPE⟩ 형태로 나타낸다.


1.2. Spatial-Aware Visual Sampler

image

그렇다면 free-form shape로부터 어떻게 visual feature를 추출하는가? 저자들은 이 추출하는 과정을 spatial-aware visual sampler라고 부른다. 과정은 (1) Sampling, (2) Gathering, (3) Pooling으로 이루어져 있다.

  1. Sampling: 먼저, free-form shape mask $\mathbf{M}$으로부터 몇 개의 sampling points를 추출한다.
  2. Gathering: 추출한 sampling points 주변의 points $k$개를 KNN으로 찾고, 이들을 $\lbrace x_ {i1}, x_ {i2}, \cdots, x_ {ik} \rbrace$로 나타낸다. 그리고 일종의 MLP를 이용하여 sample point $x_ i$와 $x_ {ik}$ 사이의 feature fusion을 진행해 $h_ {ik}$를 얻는다.
  3. Pooling: 이렇게 얻은 $h_ {ik}$를 max pooling하여 $h_ i$를 얻는다.

이를 반복하고 projection하여 최종적으로 visual feature token을 얻고, 이를 <SPE>에 저장한다.


2. GRIT: Ground-and-Refer Instruction-Tuning dataset

image

이 부분은 간단히 넘어가겠다. 저자들은 refer-and-ground instruction tuning을 위한 데이터셋을 구축하였는데, 여기에는 기존에 없던 GPT-4 generated instruction tuning data와 틀린 질문을 교정하여 잘 답하는 robustness tuning data가 포함되어 있다. 이러한 데이터는 language description의 quality를 높여 주고, hallucination을 줄여준다. 이에 대한 Evaluation도 이후 Experiments에 포함되어 있으나 생략하였다.


3. Experiments

image image

Ferret의 main contribution은 arbitrary input을 좋은 방법으로 embedding했다는 것이다. 따라서 기존에 bounding box input을 사용한 모델보다 spatial granularity가 높은 모델이 되고, 이러한 task에서 큰 차이로 좋은 성능을 보인다(Table 3, 4). 한편, output의 경우 기존과 동일한 bounding box 형태이기 때문에 기존 모델과 비교하여 성능이 크게 차이나지 않는다(Table 5).


💡 Summary

Ferret은 arbitrary input을 spatial-aware visual sampler를 통해 잘 embedding하는 방법을 제시하여 이를 활용한 grounded image captioning과 같은 task에서 큰 폭으로 다른 모델보다 좋은 성능을 보인다. 또한, GRIT을 통해 refer-and-ground instruction tuning을 위한 데이터셋을 구축하였다. 항상 arbitrary input/output을 어떻게 MLLM에서 표현할 것인지가 문제였던 만큼, 이러한 방법론은 매우 높은 가치가 있다.


📃 Reference


Multimodal 카테고리 내 다른 글 보러가기

댓글 남기기