๐ก ํ ์ค ์์ฝ#
BEV์ z์ถ(๋์ด) ์ ๋ณด ์์ค๊ณผ 3D Voxel์ $\mathcal{O}(H W D)$ ์ฐ์ฐ ํญ๋ฐ ํ๊ณ๋ฅผ ๊ทน๋ณตํ๊ธฐ ์ํด 3D ๊ณต๊ฐ์ ์ธ ์ง๊ต ํ๋ฉด **Tri-Perspective View ($\mathbf{T}^{HW}, \mathbf{T}^{DH}, \mathbf{T}^{WD}$)**์ผ๋ก ๋ถํดํ๊ณ , 3D Point๋ฅผ ์ธ ํ๋ฉด ์ฌ์ ํน์ง์ ํฉ์ฐ์ผ๋ก ํํํ์ฌ ์นด๋ฉ๋ผ๋ง์ผ๋ก LiDAR ๋ถํ SOTA์ 70% ์์ค์ธ 69.4 mIoU๋ฅผ ๋ฌ์ฑํ๋ค.
๐ ๊ฐ์ ๋ฐ ํต์ฌ ๊ธฐ์ฌ (Key Contributions)#
- ์ ์: Yuanhui Huang, Wenzhao Zheng, Yunpeng Zhang, Jie Zhou, Jiwen Lu (Tsinghua Univ., PhiGent Robotics)
- ๋ฐํ๋ ๋: 2023 (arXiv:2302.07817, CVPR 2023)
- ์ฃผ์ ๊ธฐ์ฌ์ :
- Tri-Perspective View (TPV) 3D ๊ณต๊ฐ ๋ถํด: Top $(H \times W)$, Side $(D \times H)$, Front $(W \times D)$ ์ธ ํ๋ฉด์ผ๋ก 3D ํํ์ ์ผ๋ฐํํ์ฌ $\mathcal{O}(HW + DH + WD)$์ ํจ์จ์ ๋ณต์ก๋ ๋ฌ์ฑ.
- Image Cross-Attention (ICA): TPV ์ฟผ๋ฆฌ๋ฅผ 3D ์์ ์์ $N_{ref}$๊ฐ ํฝ์ ์ขํ๋ก ํฌ์ํ์ฌ 2D ๋ฉํฐ๋ทฐ ํน์ง ์์ง.
- Cross-View Hybrid-Attention (CVHA): ์ง๊ตํ๋ ์ธ TPV ํ๋ฉด ๊ฐ์ ๋ํฌ๋จธ๋ธ ์ดํ ์ ์ ์ํํ์ฌ ๋์ด ๋ฐ ์ํธ ์๊ณต๊ฐ ๋ฌธ๋งฅ ์ตํฉ.
- ํฌ์ LiDAR ๊ฐ๋ (Sparse Supervision) ๋ฐ Voxel-Point Joint Loss: ํ๋ จ ์ ํฌ์ํ LiDAR ๋ ์ด๋ธ๋ง์ผ๋ก ์ต์ ํํ๋, ์ถ๋ก ์ ์์ ํ 3D ๋ฐ์ง Occupancy ๋ณต์.
๐ฏ ๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ ๋ฐ ๊ธฐ์กด ํ๊ณ (Related Work & Motivation)#
๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ#
- 3D Voxel (MonoScene): 3D ๋ณต์ ๋ฉ๋ชจ๋ฆฌ ๋ฐ ์ฐ์ฐ๋์ด $\mathcal{O}(N^3)$์ผ๋ก ํญ๋ฐํ์ฌ ๊ณ ํด์๋ ์ฒ๋ฆฌ๊ฐ ์ด๋ ค์.
- BEV (BEVFormer): z์ถ ๋์ด ์ ๋ณด๋ฅผ 1๊ฐ 2D ํ๋ฉด์ผ๋ก ์์ถํ์ฌ ์ฐจ๋ ์์์ด๋ ์ธ๋ก๋ก ๊ธด ์ฅ์ ๋ฌผ ์ธ์ ํ๊ณ.
- TPVFormer: ์ธ ์ง๊ต ํ๋ฉด(Top, Side, Front)์ ๋ง์ ์งํฉ์ผ๋ก BEV์ Voxel์ ํธ๋ ์ด๋์คํ ์๋ฒฝ ํด๊ฒฐ.
๐ ๋ชฉ์ฐจ#
- Chapter 1: TPV (Tri-Perspective View) 3D Point Feature Summation
- Chapter 2: Image Cross-Attention (ICA) ํฌ์ ์ดํ ์
- Chapter 3: Cross-View Hybrid Attention (CVHA) ์์
- Chapter 4: TPV Broadcast 3D Voxel ๋ณต์ & Joint Loss
- Chapter 5: ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ
- Chapter 6: ๊ฒฐ๋ก ๋ฐ ์์ฌ์
๐ ๏ธ Chapter 1: TPV (Tri-Perspective View) 3D Point Feature Summation#
1. ์์ฝ#
3D ์ขํ $(x, y, z)$๋ฅผ Top ํ๋ฉด $\mathbf{T}^{HW}$, Side ํ๋ฉด $\mathbf{T}^{DH}$, Front ํ๋ฉด $\mathbf{T}^{WD}$์ผ๋ก ์ฌ์ํ์ฌ ์ธํฌ๋ฉ์ด์ ์ ๋น๋ฆฌ๋์ด ์ํ๋งํ ํ ํฉ์ฐํ์ฌ ์ ํน์ง $\mathbf{f}_{x, y, z}$๋ฅผ ์์ฑํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathbf{t}_{h,w} = \text{BilinearSample}(\mathbf{T}^{HW}, \mathcal{P}_{hw}(x,y))$$$$\mathbf{t}_{d,h} = \text{BilinearSample}(\mathbf{T}^{DH}, \mathcal{P}_{dh}(z,x))$$$$\mathbf{t}_{w,d} = \text{BilinearSample}(\mathbf{T}^{WD}, \mathcal{P}_{wd}(y,z))$$$$\mathbf{f}_{x,y,z} = \mathbf{t}_{h,w} + \mathbf{t}_{d,h} + \mathbf{t}_{w,d} \in \mathbb{R}^C$$import torch
import torch.nn.functional as F
def sample_tpv_point_features(
T_hw: torch.Tensor, # (B, C, H, W) Top Plane Feature
T_dh: torch.Tensor, # (B, C, D, H) Side Plane Feature
T_wd: torch.Tensor, # (B, C, W, D) Front Plane Feature
pts_3d: torch.Tensor # (B, N_points, 3) -> (x, y, z) [normalized in -1 ~ 1]
) -> torch.Tensor:
"""
3D ์ (x, y, z)์ ์ธ TPV ํ๋ฉด์ ๊ฐ๊ฐ ์ฌ์ ํ ํน์ง ํฉ์ฐ (Summation)
"""
B, C, H, W = T_hw.shape
N_pts = pts_3d.shape[1]
# 1. 2D ์ขํ ๋ถํ
xy = pts_3d[..., [0, 1]].unsqueeze(2) # (B, N_pts, 1, 2) Top: (x, y)
zx = pts_3d[..., [2, 0]].unsqueeze(2) # (B, N_pts, 1, 2) Side: (z, x)
yz = pts_3d[..., [1, 2]].unsqueeze(2) # (B, N_pts, 1, 2) Front: (y, z)
# 2. Bilinear Grid Sampling
t_hw = F.grid_sample(T_hw, xy, mode='bilinear', align_corners=True).squeeze(-1).permute(0, 2, 1) # (B, N_pts, C)
t_dh = F.grid_sample(T_dh, zx, mode='bilinear', align_corners=True).squeeze(-1).permute(0, 2, 1)
t_wd = F.grid_sample(T_wd, yz, mode='bilinear', align_corners=True).squeeze(-1).permute(0, 2, 1)
# 3. Summation
f_3d = t_hw + t_dh + t_wd # (B, N_pts, C)
return f_3d
# --- ์ฌ์ฉ ์์ ---
t_top = torch.randn(1, 128, 100, 100)
t_side = torch.randn(1, 128, 16, 100)
t_front = torch.randn(1, 128, 100, 16)
p3d = torch.rand(1, 500, 3) * 2.0 - 1.0
print("TPV ์ ํน์ง ํฉ์ฐ ๊ฒฐ๊ณผ Shape:", sample_tpv_point_features(t_top, t_side, t_front, p3d).shape)๐ ๏ธ Chapter 2: Image Cross-Attention (ICA) ํฌ์ ์์#
1. ์์ฝ#
Top, Side, Front ํ๋ฉด ์ฟผ๋ฆฌ๊ฐ 3D ๊ณต๊ฐ ์์ ์์ง ๊ด์ ์ ๋ฐ๋ผ $N_{ref}$๊ฐ ํฝ์ ๋ก ์ฌ์๋์ด 2D ๋ฉํฐ๋ทฐ ์นด๋ฉ๋ผ ํน์ง์ผ๋ก๋ถํฐ ์๊ฐ ๊ฐ์ค์น๋ฅผ ํก์ํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathbf{Ref}_{h,w}^{world} = \{(x, y, z_i)\}_{i=1}^{N_{ref}^{HW}}$$$$\mathbf{Ref}_{h,w}^{pix} = \mathbf{K} \left( \mathbf{R} \cdot \mathbf{Ref}_{h,w}^{world} + \mathbf{t} \right)$$$$\text{ICA}(\mathbf{t}_{h,w}, \mathbf{I}) = \frac{1}{|N^{val}|} \sum_{j \in N^{val}} \text{DeformAttn}\left( \mathbf{t}_{h,w}, \ \mathbf{Ref}_{h,w}^{pix, j}, \ \mathbf{I}_j \right)$$import torch
def generate_tpv_ray_reference_points(
tpv_hw_coords: torch.Tensor, # (H, W, 2) Top ํ๋ฉด (x, y) ์ขํ
z_samples: torch.Tensor # (N_z,) z์ถ ์ํ ๊ณ ๋๊ฐ๋ค
) -> torch.Tensor:
"""
Top ํ๋ฉด ์ฟผ๋ฆฌ๋ฅผ ์ํด z์ถ ๋ฐฉํฅ์ผ๋ก N_z๊ฐ 3D Ray Reference Points ํ์ฅ
"""
H, W, _ = tpv_hw_coords.shape
N_z = len(z_samples)
xs = tpv_hw_coords[..., 0].unsqueeze(-1).repeat(1, 1, N_z)
ys = tpv_hw_coords[..., 1].unsqueeze(-1).repeat(1, 1, N_z)
zs = z_samples.view(1, 1, N_z).repeat(H, W, 1)
ref_pts_3d = torch.stack([xs, ys, zs], dim=-1) # (H, W, N_z, 3)
return ref_pts_3d
# --- ์ฌ์ฉ ์์ ---
hw_grid = torch.stack(torch.meshgrid(torch.linspace(-1, 1, 10), torch.linspace(-1, 1, 10), indexing='ij'), dim=-1)
z_bins = torch.linspace(-2, 2, 8)
print("์์ฑ๋ TPV Ray Reference Points Shape:", generate_tpv_ray_reference_points(hw_grid, z_bins).shape)๐ ๏ธ Chapter 3: TPV Broadcast 3D Voxel ๋ณต์ & Joint Loss#
1. ์์ฝ#
์ธ ์ง๊ต TPV ํ๋ฉด์ ๋ธ๋ก๋์บ์คํ (Broadcast)ํ์ฌ $(H \times W \times D)$ 3D Voxel Tensor๋ฅผ ๋ณต์ํ๊ณ , Point Prediction๊ณผ Voxel Prediction ์์ค์ ๊ต์ฐจ ์ต์ ํํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathbf{V}(x, y, z) = \mathbf{T}^{HW}(x, y) + \mathbf{T}^{DH}(z, x) + \mathbf{T}^{WD}(y, z) \in \mathbb{R}^{H \times W \times D \times C}$$$$\mathcal{L}_{total} = \mathcal{L}_{ce}(\text{PointPred}, \text{GT}_{point}) + \mathcal{L}_{ce}(\text{VoxelPred}, \text{GT}_{voxel})$$import torch
import torch.nn.functional as F
def reconstruct_full_3d_voxel_from_tpv(
T_hw: torch.Tensor, # (B, C, H, W)
T_dh: torch.Tensor, # (B, C, D, H)
T_wd: torch.Tensor # (B, C, W, D)
) -> torch.Tensor:
"""
3๊ฐ TPV ํ๋ฉด์ Broadcast Summation์ ํตํ (H, W, D) 3D Voxel Tensor ์์ ๋ณต์
"""
B, C, H, W = T_hw.shape
D = T_dh.shape[2]
# Broadcast ์ค๋น
hw_bcast = T_hw.unsqueeze(-1).repeat(1, 1, 1, 1, D) # (B, C, H, W, D)
dh_bcast = T_dh.permute(0, 1, 3, 2).unsqueeze(3).repeat(1, 1, 1, W, 1) # (B, C, H, W, D)
wd_bcast = T_wd.permute(0, 1, 2, 3).unsqueeze(2).repeat(1, 1, H, 1, 1) # (B, C, H, W, D)
voxel_tensor = hw_bcast + dh_bcast + wd_bcast
return voxel_tensor
# --- ์ฌ์ฉ ์์ ---
th = torch.randn(1, 64, 50, 50)
td = torch.randn(1, 64, 10, 50)
tw = torch.randn(1, 64, 50, 10)
print("๋ณต์๋ 3D Voxel Tensor Shape:", reconstruct_full_3d_voxel_from_tpv(th, td, tw).shape)๐ ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ (Experiments & Results)#
1. nuScenes LiDAR Semantic Segmentation ๋ฒค์น๋งํฌ (Camera-Only)#
| ์๊ณ ๋ฆฌ์ฆ (Method) | ์ ๋ ฅ ๋ชจ๋ฌ๋ฆฌํฐ | 3D ๊ณต๊ฐ ํํ | mIoU โ |
|---|---|---|---|
| Cylinder3D++ | LiDAR (Super SOTA) | 3D Voxel | 77.9 |
| BEVFormer-Base | Camera | 2D BEV Grid | 56.2 |
| TPVFormer-Small (Ours) | Camera | Tri-Perspective View | 59.2 (+3.0%) |
| TPVFormer-Base (Ours) | Camera | Tri-Perspective View | 69.4 (+13.2%) |
- ๊ฒฐ๊ณผ: ์ธ ์ง๊ต ํ๋ฉด ์ตํฉ ๋๋ถ์ BEVFormer ๋๋น mIoU +13.2%p ํญ๋ฐ์ ํฅ์์ผ๋ก LiDAR ์ฑ๋ฅ์ 70% ์ด๊ณผ ๋ฌ์ฑ.
๐ก ๊ฒฐ๋ก ๋ฐ ์์ฌ์ (Conclusion & Insights)#
1. ๊ฒฐ๋ก #
TPVFormer๋ BEV์ z์ถ ์ ๋ณด ์์ค๊ณผ 3D Voxel์ ์ฐ์ฐ๋ ํญ๋ฐ ๋ฌธ์ ๋ฅผ 3๊ฐ ์ง๊ต ํ๋ฉด ๋ถํด(Tri-Perspective View)๋ก ๋ช ์พํ๊ฒ ๊ทน๋ณตํ ์นด๋ฉ๋ผ์ด ๊ธฐ๋ฐ 3D Occupancy ๋ถ์ผ์ ์ธ๋ฏธ๋ ๋ ผ๋ฌธ์ ๋๋ค.
2. ํ๊ณ์ ๋ฐ ์์ฌ์ด ์ #
- ์ฌ์ ํ LiDAR SOTA(77.9 mIoU) ๋๋น ์ฝ 8.5%p์ ๊ฒฉ์ฐจ๊ฐ ๋จ์ ์์ผ๋ฉฐ, ํฌ์ LiDAR supervision์ ์์กดํ๋ฏ๋ก ์์ ํ LiDAR-freeํ ํ์ต ํ์ดํ๋ผ์ธ์ ์๋๋ค.
- ์ธ ํ๋ฉด์ ๋จ์ ํฉ์ฐ(summation)์ด ํญ์ ์ต์ ์ ์ตํฉ ๋ฐฉ์์ธ์ง์ ๋ํ ์ด๋ก ์ ๋ถ์์ ์ ํ์ ์ด๋ค.
์ฐธ๊ณ ์๋ฃ#
๊ด๋ จ ๋ ผ๋ฌธ: MonoScene, BEVFormer, SurroundOcc, Occ3D, nuScenes