๐ก ํ ์ค ์์ฝ#
์นด๋ฉ๋ผ์ LiDAR ํน์ง์ ๊ณต์ BEV(Bird’s-Eye View) ๊ณต๊ฐ์์ ํฉ์ฐ(Concat) ๋ฐ ํฉ์ฑ๊ณฑ(ConvNet)์ผ๋ก ๊ฒฐํฉํ์ฌ ๊ธฐํํ์ ยท์๋ฏธ๋ก ์ ์ ๋ณด๋ฅผ ๋์ ๋ณด์กดํ๊ณ , Precomputation๊ณผ Interval Reduction์ผ๋ก Camera-to-BEV ๋ณํ ์๋๋ฅผ 40๋ฐฐ ๊ฐ์(500ms $\to$ 12ms)ํ์ฌ nuScenes 3D ํ์ง(70.2 mAP) ๋ฐ ๋งต ๋ถํ (62.7 mIoU) SOTA๋ฅผ ๋ฌ์ฑํ๋ค.
๐ ๊ฐ์ ๋ฐ ํต์ฌ ๊ธฐ์ฌ (Key Contributions)#
- ์ ์: Zhijian Liu, Haotian Tang, Alexander Amini, Xinyu Yang, Huizi Mao, Daniela L. Rus, Song Han (MIT, NVIDIA)
- ๋ฐํ๋ ๋: 2024 (arXiv 2022, CVPR 2023)
- ์ฃผ์ ๊ธฐ์ฌ์ :
- ๊ณต์ BEV ๊ณต๊ฐ (Shared BEV Space) ํตํฉ ์ตํฉ: ํฌ์ธํธ ๊ธฐ๋ฐ ์ตํฉ(Point-level Fusion) ์ ๋ฐ์ํ๋ ์นด๋ฉ๋ผ ์๋ฏธ๋ก ์ ๋ฐ๋ ์์ค์ ๋ฐฉ์งํ๊ธฐ ์ํด ์นด๋ฉ๋ผ์ LiDAR ํน์ง ๋ชจ๋๋ฅผ 2D BEV ๊ทธ๋ฆฌ๋๋ก ์ด์ฐํํ์ฌ ์ฑ๋ ๊ฒฐํฉ.
- 40๋ฐฐ ๊ณ ์ Camera-to-BEV ๋ณํ (Interval Reduction): ์นด๋ฉ๋ผ ๋ด/์ธ์ฌ ํ๋ผ๋ฏธํฐ ๋งคํ ํ ์ด๋ธ ์ฌ์ ๊ณ์ฐ(Precomputation)๊ณผ ์ปค๋ ๊ธฐ๋ฐ ๊ตฌ๊ฐ ํฉ์ฐ(Interval Reduction)์ผ๋ก BEV Pooling ๋ณ๋ชฉ์ 500ms์์ 12ms๋ก ๋จ์ถ.
- ์์ ํฉ์ฑ๊ณฑ ์ตํฉ (Fully-Convolutional Fusion): ์นด๋ฉ๋ผ ๊น์ด ์ถ์ ์ค์ฐจ๋ก ์ธํ ๊ณต๊ฐ ์ค์ ๋ ฌ(Spatial Misalignment)์ 2D ConvNet์ ์์ฉ ์์ญ(Receptive Field)์ผ๋ก ์์ ๋ฐ ์์ฉ.
- ๋ฉํฐํ์คํฌ ๋ฉํฐ์ผ์ ์ํคํ ์ฒ: ํ๋์ ์ตํฉ BEV ์ธ์ฝ๋๋ก 3D ๊ฐ์ฒด ํ์ง(CenterPoint Head)์ BEV ๋งต ๋ถํ (Segmentation Head)์ ๋์ ์ํ.
๐ฏ ๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ ๋ฐ ๊ธฐ์กด ํ๊ณ (Related Work & Motivation)#
๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ#
- Point-Level Fusion (PointPainting, MVP): LiDAR ํฌ์ธํธ 3D ์ขํ ์์ 2D ์นด๋ฉ๋ผ ํด๋์ค ์ ์๋ฅผ ์ฌ์(Paint)ํ๋ ๋ฐฉ์. LiDAR ํฌ์ธํธ์ ํฌ์์ฑ์ผ๋ก ์ธํด ์นด๋ฉ๋ผ ํฝ์ ์ 90% ์ด์์ด ๋ฒ๋ ค์ง.
- Feature-Level Fusion (TransFusion): Query ์ดํ ์ ๊ธฐ๋ฐ ์ตํฉ์ด๋, ์นด๋ฉ๋ผ์ LiDAR์ ๋ทฐ ์ขํ ๋ถ์ผ์น(View Discrepancy)๋ก ๋งต ๋ถํ ๋ฑ์ ์๋ฏธ๋ก ์ ํ์คํฌ ํ ๋น์ด ์ด๋ ค์.
- BEVFusion: ๋ ๋ชจ๋ฌ๋ฆฌํฐ๋ฅผ ๋ชจ๋ ํํ๋ ฅ์ด ๋ฐ์ด๋ 2D BEV ๊ฒฉ์๋ก ๊ฐ์ ธ์ ๊ธฐํ(LiDAR)์ ์๋ฏธ(Camera)๋ฅผ ์๋ฒฝ ์ตํฉ.
๐ ๋ชฉ์ฐจ#
- Chapter 1: ๊ณต์ BEV ๊ณต๊ฐ (Shared BEV Space) ์ํคํ ์ฒ
- Chapter 2: ๊ณ ์ Camera-to-BEV ๋ณํ (Precomputation & Interval Reduction)
- Chapter 3: ์์ ํฉ์ฑ๊ณฑ BEV ์ตํฉ (Fully-Convolutional Fusion)
- Chapter 4: ๋ฉํฐํ์คํฌ ํ์ง ๋ฐ ๋ถํ ํค๋ ์์ (Heatmap Focal Loss)
- Chapter 5: ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ
- Chapter 6: ๊ฒฐ๋ก ๋ฐ ์์ฌ์
๐ ๏ธ Chapter 1: ๊ณต์ BEV ๊ณต๊ฐ ์ํคํ ์ฒ#
1. ์์ฝ#
๋ฉํฐ๋ทฐ RGB ์ด๋ฏธ์ง๋ 2D ๋ฐฑ๋ณธ ๋ฐ LSS Transform์ ํตํด ์นด๋ฉ๋ผ BEV ํน์ง $F_{\text{BEV}}^{cam} \in \mathbb{R}^{C_{c} \times H \times W}$๋ก, LiDAR ํฌ์ธํธ ํด๋ผ์ฐ๋๋ VoxelNet/PointPillars ๋ฐฑ๋ณธ์ ํตํด LiDAR BEV ํน์ง $F_{\text{BEV}}^{lidar} \in \mathbb{R}^{C_{l} \times H \times W}$๋ก ๊ฐ๊ฐ ๋ณํ ํ ๊ฒฐํฉ๋ฉ๋๋ค.
๐ ๏ธ Chapter 2: ๊ณ ์ Camera-to-BEV ๋ณํ (Interval Reduction)#
1. ์์ฝ#
๊ฐ ์นด๋ฉ๋ผ ํฝ์ $(u, v)$์ ํ ๋น๋ ์ด์ฐ ๊น์ด ๋ถํฌ $D_i(d, u, v)$์ ์ปจํ ์คํธ ํน์ง $F_i(c, u, v)$์ ์ธ์ ์ผ๋ก ์์ฑ๋ Frustum ํฌ์ธํธ๋ค์ 2D BEV ์ $(x, y)$์ ์ง๊ณํ ๋, ๋ฏธ๋ฆฌ ๊ณ์ฐ๋ Index Table๊ณผ GPU ์ค๋ ๋ ๊ธฐ๋ฐ ๊ตฌ๊ฐ ํฉ์ฐ(Interval Reduction) ์ปค๋๋ก ์ง์ฐ์๊ฐ์ 12ms๋ก ๋จ์ถํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$F_{\text{BEV}}^{cam}(x, y) = \text{Aggregate}\left( \left\{ D_i(d, u, v) \cdot F_i(c, u, v) \ \Big| \ \text{Proj}(u, v, d) \in \text{Cell}(x, y) \right\} \right)$$import torch
def efficient_camera_to_bev_pooling(
frustum_feats: torch.Tensor, # (N_points, C) ๊น์ด*์ปจํ
์คํธ Frustum ํน์ง
geom_bev_indices: torch.Tensor, # (N_points,) Precomputation์ผ๋ก ๊ตฌํ BEV ์
1D ์ธ๋ฑ์ค (0 ~ H*W-1)
bev_shape: tuple # (H, W) BEV ๊ทธ๋ฆฌ๋ ํฌ๊ธฐ
) -> torch.Tensor:
"""
Interval Reduction ์๋ฆฌ๋ฅผ ๋ชจ์ฌํ GPU ๊ณ ์ Scatter Add BEV Pooling
"""
H, W = bev_shape
N_points, C = frustum_feats.shape
# 1. ์ ํจํ BEV ์ธ๋ฑ์ค ํํฐ๋ง (๋ฒ์ ๋ฐ ์ ๊ฑฐ)
valid_mask = (geom_bev_indices >= 0) & (geom_bev_indices < H * W)
valid_feats = frustum_feats[valid_mask]
valid_indices = geom_bev_indices[valid_mask]
# 2. CUDA index_add_ / scatter_add ๊ธฐ๋ฐ ๊ตฌ๊ฐ ํฉ์ฐ (Interval Reduction)
bev_flat = torch.zeros((H * W, C), dtype=frustum_feats.dtype, device=frustum_feats.device)
bev_flat.index_add_(0, valid_indices, valid_feats)
# 3. 2D BEV Feature Map์ผ๋ก Reshape (C, H, W)
bev_feat_map = bev_flat.view(H, W, C).permute(2, 0, 1)
return bev_feat_map
# --- ์ฌ์ฉ ์์ ---
pts_f = torch.randn(10000, 64)
bev_idx = torch.randint(0, 100*100, (10000,))
print("Camera BEV Feature Map Shape:", efficient_camera_to_bev_pooling(pts_f, bev_idx, (100, 100)).shape)๐ ๏ธ Chapter 3: ์์ ํฉ์ฑ๊ณฑ BEV ์ตํฉ (Fully-Convolutional Fusion)#
1. ์์ฝ#
์นด๋ฉ๋ผ BEV ํน์ง๊ณผ LiDAR BEV ํน์ง์ ์ฑ๋ ์ถ์ผ๋ก Concatenateํ ํ, 2D ResNet ์คํ์ผ์ ํฉ์ฑ๊ณฑ ๋ฐฑ๋ณธ์ ์ ๋ ฅํ์ฌ ์นด๋ฉ๋ผ ๊น์ด ์์ธก ์ค์ฐจ๋ก ๋ฐ์ํ๋ ๋ฏธ์ธ ๊ณต๊ฐ ์ค์ ๋ ฌ(Spatial Misalignment)์ ์ตํฉ ์ฐ์ฐ์ผ๋ก ํก์ํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$F_{\text{BEV}}^{fused} = \text{ConvNet}\Big( \text{Concat}\big( F_{\text{BEV}}^{cam}, \ F_{\text{BEV}}^{lidar} \big) \Big) \in \mathbb{R}^{C_{out} \times H \times W}$$import torch
import torch.nn as nn
class FullyConvolutionalBEVFusion(nn.Module):
"""
Camera BEV ๋ฐ LiDAR BEV ์ฑ๋ ๊ฒฐํฉ ๋ฐ ๊ณต๊ฐ ์ค์ ๋ ฌ ๋ณด์ ConvNet
"""
def __init__(self, cam_channels: int = 80, lidar_channels: int = 128, out_channels: int = 256):
super().__init__()
in_dim = cam_channels + lidar_channels
self.fusion_conv = nn.Sequential(
nn.Conv2d(in_dim, out_channels, kernel_size=3, padding=1),
nn.BatchNorm2d(out_channels),
nn.ReLU(),
nn.Conv2d(out_channels, out_channels, kernel_size=3, padding=1),
nn.BatchNorm2d(out_channels),
nn.ReLU()
)
def forward(self, cam_bev: torch.Tensor, lidar_bev: torch.Tensor) -> torch.Tensor:
"""
cam_bev: (B, C_cam, H, W)
lidar_bev: (B, C_lidar, H, W)
"""
# ์ฑ๋ Concatenation
fused_input = torch.cat([cam_bev, lidar_bev], dim=1)
# ํฉ์ฑ๊ณฑ ๋ณด์ ์ธ์ฝ๋ฉ
fused_bev = self.fusion_conv(fused_input)
return fused_bev
# --- ์ฌ์ฉ ์์ ---
c_b = torch.randn(2, 80, 180, 180)
l_b = torch.randn(2, 128, 180, 180)
fusion_net = FullyConvolutionalBEVFusion()
print("์ต์ข
์ตํฉ BEV Feature Shape:", fusion_net(c_b, l_b).shape)๐ ๏ธ Chapter 4: CenterPoint ํ์ง ํค๋ ๋ฐ Focal Loss ์์#
1. ์์ฝ#
์ตํฉ๋ BEV ํน์ง ๋งต ์์์ 3D ๋ฐ์ด๋ฉ ๋ฐ์ค ์ค์ฌ์ ์ ํ์งํ๊ธฐ ์ํด CenterPoint ์คํ์ผ์ Gaussian Focal Loss๋ฅผ ์ ์ฉํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathcal{L}_{heat} = -\frac{1}{N} \sum_{u, v} \begin{cases} (1 - \hat{Y}_{u,v})^\alpha \log(\hat{Y}_{u,v}) & \text{if } Y_{u,v} = 1 \\ (1 - Y_{u,v})^\beta \hat{Y}_{u,v}^\alpha \log(1 - \hat{Y}_{u,v}) & \text{otherwise} \end{cases}$$- $\hat{Y}_{u,v}$: ์์ธก๋ ์ค์ฌ์ ์ด์ง๋ ํ๋ฅ ($0 \sim 1$)
- $Y_{u,v}$: ๊ฐ์ฐ์์ ํํํ๊ฐ ์ ์ฉ๋ GT ์ค์ฌ์ ์ด์ง๋ ($0 \sim 1$)
- $\alpha=2, \beta=4$: Penalty-reduced Focal Loss ๊ฐ์ค์น
import torch
def gaussian_focal_loss(pred_heatmap: torch.Tensor, gt_heatmap: torch.Tensor, alpha: float = 2.0, beta: float = 4.0) -> torch.Tensor:
"""
3D CenterPoint ํ์ง ํค๋์ฉ Gaussian Focal Loss
"""
pos_inds = gt_heatmap.eq(1.0).float()
neg_inds = gt_heatmap.lt(1.0).float()
pos_loss = torch.log(pred_heatmap + 1e-6) * torch.pow(1.0 - pred_heatmap, alpha) * pos_inds
neg_loss = torch.log(1.0 - pred_heatmap + 1e-6) * torch.pow(pred_heatmap, alpha) * torch.pow(1.0 - gt_heatmap, beta) * neg_inds
num_pos = pos_inds.sum()
pos_loss = pos_loss.sum()
neg_loss = neg_loss.sum()
if num_pos == 0:
return -neg_loss
else:
return -(pos_loss + neg_loss) / num_pos
# --- ์ฌ์ฉ ์์ ---
p_hm = torch.sigmoid(torch.randn(1, 10, 100, 100))
g_hm = torch.zeros(1, 10, 100, 100)
g_hm[0, 2, 50, 50] = 1.0
print("CenterPoint Focal Loss:", gaussian_focal_loss(p_hm, g_hm).item())๐ ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ (Experiments & Results)#
1. nuScenes 3D ๊ฐ์ฒด ํ์ง ๋ฆฌ๋๋ณด๋ ๋น๊ต#
| ๋ฐฉ๋ฒ (Method) | ์ฌ์ฉ ์ผ์ ๋ชจ๋ฌ๋ฆฌํฐ | mAP โ | NDS โ | ์ง์ฐ์๊ฐ (Latency) |
|---|---|---|---|---|
| CenterPoint | LiDAR Only | 60.3 | 67.3 | 90 ms |
| PointPainting | Camera + LiDAR | 65.8 | 69.6 | 185 ms |
| TransFusion | Camera + LiDAR | 67.5 | 71.3 | 156 ms |
| BEVFusion (Ours) | Camera + LiDAR | 70.2 | 72.9 | 119 ms (์๋์ SOTA) |
- ๊ฒฐ๊ณผ: TransFusion ๋๋น mAP +2.7%, NDS +1.6% ์ฑ๋ฅ ํฅ์๊ณผ ๋์์ ์ง์ฐ์๊ฐ์ 119ms๋ก ๋จ์ถ.
๐ก ๊ฒฐ๋ก ๋ฐ ์์ฌ์ (Conclusion & Insights)#
1. ๊ฒฐ๋ก #
BEVFusion์ ์นด๋ฉ๋ผ์ ํ๋ถํ ์๋ฏธ๋ก (Semantic)๊ณผ LiDAR์ ์ ํํ 3D ๊ธฐํ(Geometry)๋ฅผ ์์ค ์์ด ๊ณต์ BEV ๊ณต๊ฐ์์ ํตํฉํ๊ณ , 40๋ฐฐ ๊ฐ์๋ BEV ํ๋ง์ ํตํด ๋ฉํฐ์ผ์ ๋ฉํฐํ์คํฌ ์ตํฉ์ ํ์ค์ ์ ๋ฆฝํ์ต๋๋ค.
2. ํ๊ณ์ ๋ฐ ์์ฌ์ด ์ #
- Precomputation์ ์นด๋ฉ๋ผ ํ๋ผ๋ฏธํฐ๊ฐ ๊ณ ์ (์ ์ ์บ๋ฆฌ๋ธ๋ ์ด์ )์ด๋ผ๋ ๊ฐ์ ์ ์์กดํ๋ฏ๋ก, ์จ๋ผ์ธ ์ฌ์บ๋ฆฌ๋ธ๋ ์ด์ ์ด ํ์ํ ์ํฉ์๋ ๊ทธ๋๋ก ์ ์ฉํ๊ธฐ ์ด๋ ต๋ค.
- ๋จ์ ์ฑ๋ concatenation๊ณผ ํฉ์ฑ๊ณฑ ์ธ์ฝ๋๋ก ์ค์ ๋ ฌ์ ๋ณด์ ํ๋ ๋ฐฉ์์ด, ๊ทน๋จ์ ์ธ ๊น์ด ์ถ์ ์ค๋ฅ๋ ์ผ์ ๊ณ ์ฅ ์ํฉ๊น์ง ๊ฒฌ๊ณ ํ๊ฒ ๋์ํ๋์ง๋ ์ถ๊ฐ ๊ฒ์ฆ์ด ํ์ํ๋ค.
์ฐธ๊ณ ์๋ฃ#
๊ด๋ จ ๋ ผ๋ฌธ: BEVFormer, BEVDepth, PointPillars, CenterPoint, nuScenes