NeurIPS 2025. [Paper] [Page] [Github]
Ruilong Li, Brent Yi, Junchen Liu, Hang Gao, Yi Ma, Angjoo Kanazawa
UC Berkeley | NVIDIA | HKU
14 Jul 2025

Introduction

Transformer를 사용하여 멀티뷰 문제를 해결하려면 모델은 각 입력 이미지의 패치 토큰에 시점 정보를 연결해야 한다. 이 연결 과정에는 특별한 주의가 필요하다. 1D 시퀀스에 대한 단순한 위치 인코딩 기법이 언어 모델의 학습 성능을 저해하는 것처럼, 카메라 geometry에 대한 단순한 인코딩 또한 멀티뷰 비전 모델에서 최적의 결과를 제공하지 못할 수 있다.

본 논문에서는 입력 이미지의 카메라 geometry를 ViT에 컨디셔닝하기 위해, 카메라의 전체 geometry를 relative positional encoding으로 포착하도록 설계된 Projective Positional Encoding (PRoPE)을 제시하였다. PRoPE는 intrinsic과 extrinsic을 모두 설명하는 viewing frustum 관계를 모델링하는 동시에 표준 transformer 아키텍처 및 FlashAttention과 쉽게 통합될 수 있다.

Method

1. Preliminaries

본 논문에서는 $N$개의 이미지를 입력으로 받는 transformer를 대상으로 하였다.

\[\begin{equation} \{ (\textbf{I}_i, \textbf{K}_i, \textbf{T}_i^\textrm{cw}) \}_{i=1}^N \end{equation}\]

Intrinsic \(\textbf{K}_i\)와 extrinsic \(\textbf{T}_i^\textrm{cw}\)는 viewing frustum을 인코딩한다. Intrinsic은 frustum의 모양과 FoV를 나타내고, extrinsic은 위치와 방향을 나타낸다. Intrinsic과 extrinsic 모두 world-to-image projection matrix \(\textbf{P}_i \in \mathbb{R}^{3 \times 4}\)에 포함된다.

\[\begin{equation} \textbf{P}_i = \begin{bmatrix} \textbf{K}_i & \textbf{0}^{3 \times 1} \end{bmatrix} \textbf{T}_i^\textrm{cw} \end{equation}\]

이 $3 \times 4$ 행렬은 \(\textbf{e}_4 = (0, 0, 0, 1)^\top\)를 사용하여 $4 \times 4$로 변환함으로써 역행렬을 갖도록 만들 수 있다. 이 변환은 3D 월드 좌표를 카메라 $i$의 frustum으로 정의된 이미지 공간으로 매핑한다. 이를 이용하여 월드 좌표로부터 2D 이미지 좌표를 계산할 수 있다.

\[\begin{equation} \tilde{\textbf{P}}_i = \begin{bmatrix} \textbf{P}_i \\ \textbf{e}_4^\top \end{bmatrix}, \quad \begin{bmatrix} \tilde{\textbf{x}}_i \\ 1 \end{bmatrix} \propto \tilde{\textbf{P}}_i \tilde{\textbf{X}}_\textrm{world} \end{equation}\]

(\(\tilde{\textbf{x}}_i \in \mathbb{R}^3\)과 \(\tilde{\textbf{X}}_\textrm{world} \in \mathbb{R}^4\)는 각각 이미지와 월드 좌표에서의 homogeneous coordinate)

역행렬을 이용하여 2D 이미지 좌표 \(\tilde{\textbf{x}}_i^{u,v} = (u, v, 1)^\top\)로부터 3D 공간에서의 광선 방향 \(\textbf{d}_i^{u,v}\)을 계산할 수 있다.

\[\begin{equation} \begin{bmatrix} \alpha \textbf{d}_i^{u,v} \\ 1 \end{bmatrix} \propto \tilde{\textbf{P}}_i^{-1} \begin{bmatrix} \tilde{\textbf{x}}_i^{u,v} \\ 1 \end{bmatrix} \end{equation}\]

2. Projective Position Encoding (PRoPE)

본 논문에서는 PRoPE라고 부르는 새로운 relative positional encoding 방법을 소개한다. PRoPE의 핵심 관찰은 SE(3) 포즈가 카메라 geometry의 부분적인 표현일 뿐이라는 것이다. PRoPE는 각 카메라 $i_1$과 카메라 $i_2$를 포즈 \(\textbf{T}_{i_1}^\textrm{cw}\)와 \(\textbf{T}_{i_2}^\textrm{cw}\)에만 연결하는 대신, 전체 frustum 간의 projection 관계를 사용한다.

\[\begin{equation} \tilde{\textbf{P}}_{i_1} \tilde{\textbf{P}}_{i_1}^{-1} \end{equation}\]

이 $4 \times 4$ 행렬은 각 카메라에 의해 정의된 로컬 projective space 간의 변환으로 해석될 수 있다. 이는 카메라 뷰 간의 완전한 geometry를 인코딩한다. 이는 SE(3) 기반의 relative positional encoding의 핵심인 글로벌 불변 속성도 유지한다.

PRoPE를 구현하기 위해, 각 토큰(패치) $t$마다 새로운 행렬 세트 \(\textbf{D}_t^\textrm{PRoPE} \in \mathbb{R}^{d \times d}\)를 정의하고, GTA-style attention을 사용하여 이를 transformer block에 주입한다.

\[\begin{equation} \textbf{D}^\textrm{PRoPE} = [\textbf{D}_1^\textrm{PRoPE}, \ldots, \textbf{D}_T^\textrm{PRoPE}] \in \mathbb{R}^{T \times d \times d} \\ \textrm{Attn}^\textrm{PRoPE} (Q, K, V) = \textbf{D}^\textrm{PRoPE} \circledcirc \textrm{Attn}((\textbf{D}^\textrm{PRoPE})^\top \circledcirc Q, (\textbf{D}^\textrm{PRoPE})^{-1} \circledcirc K, (\textbf{D}^\textrm{PRoPE})^{-1} \circledcirc V) \\ [\textrm{Attn}^\textrm{PRoPE} (Q, K, V)]_{t_1} = \sum_{t_2} \alpha_{t_1, t_2} \textbf{D}_{t_1}^\textrm{PRoPE} (\textbf{D}_{t_2}^\textrm{PRoPE})^{-1} V_{t_2} \end{equation}\]

($\circledcirc$은 batched matrix-vector product, \(\alpha_{t_1, t_2}\)는 softmax score)

이러한 행렬은 카메라 간의 frustum 관계를 인코딩하고, 카메라 내의 상대적인 패치 위치를 인코딩하도록 설계되었다. 이러한 목표는 각각 $\frac{d}{2} \times \frac{d}{2}$ shape의 보완적인 부분 행렬을 통해 달성된다.

\[\begin{aligned} \textbf{D}_t^\textrm{PRoPE} &= \begin{bmatrix} \textbf{D}_t^\textrm{Proj} & \textbf{0} \\ \textbf{0} & \textbf{D}_t^\textrm{RoPE} \end{bmatrix} \\ \textbf{D}_t^\textrm{Proj} &= \textbf{I}_{d/8} \otimes \tilde{\textbf{P}}_{i(t)} \in \mathbb{R}^{\frac{d}{2} \times \frac{d}{2}} \\ \textbf{D}_t^\textrm{RoPE} &= \begin{bmatrix} \textrm{RoPE}_{d/4}(x_t) & \textbf{0} \\ \textbf{0} & \textrm{RoPE}_{d/4}(y_t) \end{bmatrix} \in \mathbb{R}^{\frac{d}{2} \times \frac{d}{2}} \\ \end{aligned}\]

3. Properties of PRoPE

PRoPE는 몇 가지 중요한 속성을 가지고 있으며, 이러한 속성은 다음과 같이 식을 확장하면 더욱 분명해진다.

\[\begin{equation} \tilde{\textbf{P}}_{i_1} \tilde{\textbf{P}}_{i_2}^{-1} = \begin{bmatrix} \textbf{K}_i & \textbf{0} \\ \textbf{0} & 1 \end{bmatrix} \textbf{T}_i^\textrm{cw} (\textbf{T}_j^\textrm{cw})^{-1} \begin{bmatrix} \textbf{K}_j^{-1} & \textbf{0} \end{bmatrix} \end{equation}\]
  1. 글로벌 프레임 불변성: 월드 프레임을 재정의하는 것은 \(\textbf{T}^\textrm{cw}\) SE(3) 항을 오른쪽으로 곱하는 것과 동일하며, 이는 위 식에서 대수적으로 제거된다.
  2. Relative SE(3)로의 축소. 항등 행렬을 갖는 카메라의 경우, 위 식은 CAPEGTA에서 사용되는 relative SE(3)로 축소된다.
  3. RoPE로의 축소. 위 식은 동일한 이미지의 패치에 대해 항등 행렬로 평가된다. 이러한 토큰 쌍의 경우, \(\textbf{D}_t^\textrm{PRoPE}\)에는 RoPE 항만 포함된다.

Experiments

1. Relative vs Absolute Positional Encodings

다음은 LVSM에 다양한 카메라 컨디셔닝 방식을 비교한 novel view synthesis 결과이다. (위: 장면 내에서 동일한 intrinsic, 아래: 다양한 intrinsic)

2. Hybrid Encoding Strategies


토큰 레벨의 카메라 인코딩과 attention 레벨의 카메라 인코딩은 transformer 아키텍처의 서로 다른 부분을 수정해야 한다. 따라서 두 인코딩 방식은 서로 호환 가능하며, 동시에 사용할 수 있다. 저자들은 relative encoding과 로컬 camera-frame raymap을 동시에 LVSM에 학습시켰다.

\[\begin{equation} \textbf{M}_{i, \textrm{CamRay}}^{u,v} = \textbf{R}_i^\textrm{cw} \textbf{d}_i^\textrm{u,v} \propto \textbf{K}_i^{-1} \begin{bmatrix} u & v & 1 \end{bmatrix}^\top \in \mathbb{R}^3 \end{equation}\]

이 raymap을 CamRay라고 부른다. CamRay는 기존 raymap과 마찬가지로 intrinsic을 인코딩하고 픽셀 단위로 정렬되며, 입력 이미지와 연결할 수 있다. 하지만 절대 좌표계에 종속되지 않은다. 따라서 글로벌 프레임 불변성을 유지하면서 상대적 포즈 및 카메라 인코딩 기법과 함께 사용할 수 있다. 또한 CamRay는 카메라 intrinsic의 토큰 레벨 인코딩으로 해석할 수 있다.

다음은 하이브리드 인코딩 전략을 사용한 novel view synthesis 결과이다.

4. Out-of-distribution Robustness

다음은 2개의 뷰로 학습한 한 후, 다양한 뷰 수로 테스트한 결과이다. (RealEstate10K)


다음은 학습 시와 다른 FoV로 테스트한 결과이다.

5. Task Generalization

다음은 stereo depth estimation 모델인 UniMatch에 PRoPE를 적용한 결과이다.


다음은 다양한 입력 뷰 개수 조건에서 불일치하는 이미지-카메라 쌍을 탐지하는 정확도를 비교한 결과이다. (DL3DV)

6. Scaling PRoPE

다음은 LVSM을 scaling한 결과이다.