๐ก ํ ์ค ์์ฝ#
๋จ์ผ RGB ์ด๋ฏธ์ง ์ ๋ ฅ๋ง์ผ๋ก 3D ๊ณต๊ฐ์ ๊ธฐํ(Geometry)์ ์๋งจํฑ(Semantic)์ ๋์ ์๋ฃ(Completion)ํ๊ธฐ ์ํด FLoSP(์์ ๊ธฐ๋ฐ 2D-3D ํผ์ฒ ํฌ์), 3D CRP(๊ณต๊ฐ-์๋ฏธ ๋งฅ๋ฝ ์ฌ์ ), Scene-Class Affinity & Frustum Proportion Loss๋ฅผ ํตํฉํ ์ต์ด์ ๋จ์ 3D Semantic Scene Completion(SSC) ์ํคํ ์ฒ๋ค.
๐ ๊ฐ์ ๋ฐ ํต์ฌ ๊ธฐ์ฌ (Key Contributions)#
- ์ ์: Anh-Quan Cao, Raoul de Charette (Inria)
- ๋ฐํ๋ ๋: 2022 (arXiv:2112.00726, CVPR 2022)
- ์ฃผ์ ๊ธฐ์ฌ์ :
- FLoSP (Features Line of Sight Projection): ๋ณ๋์ ๊น์ด ์ถ์ ๊ธฐ ์์ด ์นด๋ฉ๋ผ ์์ (Ray)์ ๋ฐ๋ผ 2D ํฝ์ ๋ฉํฐ์ค์ผ์ผ ํน์ง์ 3D ๋ณต์ ๊ทธ๋ฆฌ๋๋ก ์ฐ์ ์ฌ์.
- 3D CRP (3D Context Relation Prior): Supervoxel ๊ฐ 4๊ฐ์ง ์ ์ญ ๊ณต๊ฐ ๊ด๊ณ(Free/Occupied $\times$ Same/Diff Class)๋ฅผ ํ์ตํ๋ 3D UNet ๋ณ๋ชฉ ๋ ์ด์ด.
- Scene-Class Affinity Loss ($\mathcal{L}_{scal}$): ํด๋์ค๋ณ ์ ๋ฐ๋(Precision), ์ฌํ์จ(Recall), ํน์ด๋(Specificity)๋ฅผ ์ง์ ์ต์ ํํ์ฌ Cross-Entropy์ ์ ์ญ ๋งฅ๋ฝ ๋ฌด์ ๊ทน๋ณต.
- Frustum Proportion Loss ($\mathcal{L}_{fp}$): ์ด๋ฏธ์ง ํจ์น๋ณ 3D Frustum ๊ฐ๋ฆผ(Occlusion) ์์ญ์ ํด๋์ค ํ๋ฅ ๋ถํฌ KL ๋ฐ์ฐ์ ์ถ์.
๐ฏ ๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ ๋ฐ ๊ธฐ์กด ํ๊ณ (Related Work & Motivation)#
๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ#
- 3D SSC (SSCNet, LMSCNet, 3DSketch): LiDAR, Depth ์ผ์, TSDF 3D ์ ๋ ฅ์ ํ์์ ์ผ๋ก ์๊ตฌํ์ฌ ๊ณ ๋น์ฉ ์ผ์ ์์กด์ฑ ์กด์ฌ.
- MonoScene: ๋จ์ RGB ์ด๋ฏธ์ง๋ง์ผ๋ก ๊น์ด ์ผ์ ๊ธฐ๋ฐ SOTA ๊ธฐ๋ฒ๋ค์ mIoU ๋ฉด์์ ์ถ์ํ๋ ํจ๋ฌ๋ค์ ์ ํ.
๐ ๋ชฉ์ฐจ#
- Chapter 1: FLoSP (Features Line of Sight Projection) ํฌ์ ์์
- Chapter 2: 3D CRP (Context Relation Prior) ๋ฐ ๊ด๊ณ ์์ค ํจ์
- Chapter 3: Scene-Class Affinity Loss ($\mathcal{L}_{scal}$)
- Chapter 4: Frustum Proportion KL-Divergence Loss ($\mathcal{L}_{fp}$)
- Chapter 5: ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ
- Chapter 6: ๊ฒฐ๋ก ๋ฐ ์์ฌ์
๐ ๏ธ Chapter 1: FLoSP (Features Line of Sight Projection) ํฌ์ ์์#
1. ์์ฝ#
3D ๋ณต์ ์ค์ฌ์ $x^c$๋ฅผ ์นด๋ฉ๋ผ ๋ด์ฌ ํ๋ ฌ๋ก 2D ํฝ์ ํ๋ฉด์ ์ฌ์ํ์ฌ, ์์ (Line of Sight) ์์ 2D ๋ฉํฐ์ค์ผ์ผ ํน์ง $F_{2D}^{1:s}$๋ฅผ Bilinear Interpolation์ผ๋ก ์ํ๋ง ํ ํฉ์ฐํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathbf{F}_{3D}(x^c) = \sum_{s \in S} \text{BilinearSample}\left( F_{2D}^{1:s}, \ \rho(x^c) \right)$$$$\rho(x^c) = \mathbf{K} \left( \mathbf{R} x^c + \mathbf{t} \right)$$import torch
import torch.nn.functional as F
def flosp_2d_to_3d_line_of_sight_projection(
feat_2d: torch.Tensor, # (B, C, H_2d, W_2d) 2D ์ด๋ฏธ์ง ํน์ง
voxel_centers_3d: torch.Tensor, # (Dx, Dy, Dz, 3) 3D ๋ณต์
์ค์ฌ ์ขํ
K_intrinsics: torch.Tensor # (3, 3) ์นด๋ฉ๋ผ ๋ด์ฌ ํ๋ ฌ
) -> torch.Tensor:
"""
MonoScene FLoSP: 3D ๋ณต์
์ค์ฌ์ ์ 2D ์ด๋ฏธ์ง ์ขํ๋ก ์ฌ์ํ์ฌ 3D ํผ์ฒ ๋งต์ผ๋ก ๋ณต์
"""
Dx, Dy, Dz, _ = voxel_centers_3d.shape
B, C, H_2d, W_2d = feat_2d.shape
# 1. 3D ๋ณต์
์ค์ฌ์ 2D ํฌ์: p_2d = K @ x_3d
pts_flat = voxel_centers_3d.view(-1, 3).T # (3, N_voxels)
pts_2d_homo = (K_intrinsics @ pts_flat).T # (N_voxels, 3)
depths = pts_2d_homo[:, 2]
u = pts_2d_homo[:, 0] / (depths + 1e-6)
v = pts_2d_homo[:, 1] / (depths + 1e-6)
# 2. [-1, 1] ๋ฒ์๋ก Grid Sample ์ ๊ทํ
norm_u = (u / W_2d) * 2.0 - 1.0
norm_v = (v / H_2d) * 2.0 - 1.0
grid = torch.stack([norm_u, norm_v], dim=-1).view(1, Dx, Dy * Dz, 2).repeat(B, 1, 1, 1)
# 3. Bilinear Interpolation ํน์ง ์ํ๋ง
sampled_feat = F.grid_sample(feat_2d, grid, mode='bilinear', align_corners=True) # (B, C, Dx, Dy*Dz)
feat_3d = sampled_feat.view(B, C, Dx, Dy, Dz)
return feat_3d
# --- ์ฌ์ฉ ์์ ---
f2d_in = torch.randn(1, 64, 60, 80)
vox_3d = torch.randn(30, 30, 10, 3) + torch.tensor([0.0, 0.0, 5.0])
K_in = torch.tensor([[500.0, 0.0, 320.0], [0.0, 500.0, 240.0], [0.0, 0.0, 1.0]])
print("์์ฑ๋ 3D Feature Map Shape:", flosp_2d_to_3d_line_of_sight_projection(f2d_in, vox_3d, K_in).shape)๐ ๏ธ Chapter 2: Scene-Class Affinity Loss ($\mathcal{L}_{scal}$)#
1. ์์ฝ#
๊ฐ ์๋งจํฑ ํด๋์ค $c$์ ๋ํด ์ ์ญ ๋ณต์ ํฝ์ ๋ค์ ์ ๋ฐ๋ $P_c$, ์ฌํ์จ $R_c$, ํน์ด๋ $S_c$๋ฅผ ์ง์ ๊ณ์ฐํ์ฌ ํด๋์ค ๋ถ๊ท ํ์ ํด๊ฒฐํ๋ ์์ค ํจ์์ ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$P_c = \log \frac{\sum_i \hat{p}_{i, c} \cdot \mathbb{I}(p_i = c)}{\sum_i \hat{p}_{i, c} + 1e-6}, \quad R_c = \log \frac{\sum_i \hat{p}_{i, c} \cdot \mathbb{I}(p_i = c)}{\sum_i \mathbb{I}(p_i = c) + 1e-6}$$$$\mathcal{L}_{scal} = -\frac{1}{C} \sum_{c=1}^{C} \left( P_c + R_c + S_c \right)$$import torch
def compute_scene_class_affinity_loss(
pred_probs: torch.Tensor, # (N_voxels, C_classes) ์์ธก 3D ๋ณต์
ํด๋์ค ํ๋ฅ
gt_labels: torch.Tensor # (N_voxels,) GT 3D ๋ณต์
๋ผ๋ฒจ
) -> torch.Tensor:
"""
MonoScene ์ ์ญ ๋ณต์
ํด๋์ค Affinity Loss (Precision + Recall + Specificity)
"""
N_voxels, C = pred_probs.shape
total_loss = 0.0
for c in range(C):
gt_c = (gt_labels == c).float()
pred_c = pred_probs[:, c]
tp = (pred_c * gt_c).sum()
fp = (pred_c * (1.0 - gt_c)).sum()
fn = ((1.0 - pred_c) * gt_c).sum()
tn = ((1.0 - pred_c) * (1.0 - gt_c)).sum()
precision = torch.log((tp + 1e-6) / (tp + fp + 1e-6))
recall = torch.log((tp + 1e-6) / (tp + fn + 1e-6))
specificity = torch.log((tn + 1e-6) / (tn + fp + 1e-6))
total_loss -= (precision + recall + specificity)
return total_loss / C
# --- ์ฌ์ฉ ์์ ---
p_voxel = torch.softmax(torch.randn(1000, 12), dim=-1)
g_voxel = torch.randint(0, 12, (1000,))
print("Scene-Class Affinity Loss:", compute_scene_class_affinity_loss(p_voxel, g_voxel).item())๐ ๏ธ Chapter 3: Frustum Proportion Loss ($\mathcal{L}_{fp}$)#
1. ์์ฝ#
์ด๋ฏธ์ง ํจ์น๋ณ 3D Frustum ์์ญ ๋ด ์๋งจํฑ ํด๋์ค ๋น์จ $P_k(c)$์ ์์ธก ๋น์จ $\hat{P}_k(c)$ ๊ฐ์ KL Divergence๋ฅผ ์ต์ํํ์ฌ ๊ฐ๋ฆผ(Occlusion) ์์ญ์ ์ ์ ํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathcal{L}_{fp} = \sum_{k=1}^{\ell^2} D_{KL}(P_k \parallel \hat{P}_k) = \sum_{k=1}^{\ell^2} \sum_{c \in C_k} P_k(c) \log \frac{P_k(c)}{\hat{P}_k(c)}$$import torch
import torch.nn.functional as F
def compute_frustum_proportion_kl_loss(
pred_frustum_dist: torch.Tensor, # (N_frustums, C_classes) Frustum๋ณ ์์ธก ํด๋์ค ๋น์จ
gt_frustum_dist: torch.Tensor # (N_frustums, C_classes) Frustum๋ณ GT ํด๋์ค ๋น์จ
) -> torch.Tensor:
"""
Frustum ๋ด 3D ์๋งจํฑ ํ๋ฅ ๋ถํฌ์ KL-Divergence ์์ค
"""
# PyTorch kl_div(input=log_pred, target=gt)
log_pred = torch.log(pred_frustum_dist + 1e-6)
kl_loss = F.kl_div(log_pred, gt_frustum_dist, reduction='batchmean')
return kl_loss
# --- ์ฌ์ฉ ์์ ---
p_dist = torch.softmax(torch.randn(64, 12), dim=-1)
g_dist = torch.softmax(torch.randn(64, 12), dim=-1)
print("Frustum Proportion KL Loss:", compute_frustum_proportion_kl_loss(p_dist, g_dist).item())๐ ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ (Experiments & Results)#
1. SemanticKITTI & NYUv2 3D SSC ๋ฒค์น๋งํฌ ์ฑ๋ฅ ๋น๊ต#
| ๋ฐ์ดํฐ์ (Dataset) | ๋ชจ๋ธ (Method) | ์ ๋ ฅ ๋ชจ๋ฌ๋ฆฌํฐ | IoU (์ง์ค๋ฉํธ๋ฆฌ) โ | mIoU (์๋งจํฑ) โ |
|---|---|---|---|---|
| SemanticKITTI | LMSCNet | Occupancy | 31.38 | 7.07 |
| SemanticKITTI | AICNet | RGB + Depth | 23.93 | 7.09 |
| SemanticKITTI | MonoScene (Ours) | RGB Only (๋จ์) | 34.16 (+2.78%) | 11.08 (+3.99%) |
| NYUv2 (Indoor) | MonoScene (Ours) | RGB Only (๋จ์) | 42.51 | 26.94 |
- ๊ฒฐ๊ณผ: ๊น์ด ์ผ์(Depth/LiDAR)๊ฐ ์๋ ์์ RGB ๋จ์ ์ ๋ ฅ๋ง์ผ๋ก ๊ธฐ์กด ๊น์ด ๊ธฐ๋ฐ SOTA ๊ธฐ๋ฒ๋ค์ mIoU ๋ฉด์์ ๋ํญ ์ด๊ณผ ๋ฌ์ฑ.
๐ก ๊ฒฐ๋ก ๋ฐ ์์ฌ์ (Conclusion & Insights)#
1. ๊ฒฐ๋ก #
MonoScene์ FLoSP ์์ ํฌ์ ๋ฉ์ปค๋์ฆ๊ณผ 3D CRP, ์ ์ญ ์์ค ํจ์๋ฅผ ํตํด ๊น์ด ์ผ์๊ฐ ๊ฒฐ์ฌ๋ 2D RGB ์ด๋ฏธ์ง๋ง์ผ๋ก ๋ฐ์งํ 3D Semantic Occupancy๋ฅผ ๋ณต์ํ ๋จ์ 3D ์ธ์ง์ ์ ๊ตฌ์ ๋ ผ๋ฌธ์ ๋๋ค.
2. ํ๊ณ์ ๋ฐ ์์ฌ์ด ์ #
- ์ธ๋ฐํ ๊ธฐํ(fine-grained geometry) ์ถ๋ก ์ ์ด๋ ค์์ด ์์ด ์์ ๋ฌผ์ฒด๋ ์์ ๊ตฌ์กฐ๋ฌผ์ ๋์น๊ธฐ ์ฝ๋ค.
- ์๋ฏธ์ ์ผ๋ก ์ ์ฌํ ํด๋์ค(์์/์ํ, ์ฐฝ๋ฌธ/๋ฌผ์ฒด ๋ฑ)๋ฅผ ํผ๋ํ๋ ๊ฒฝ์ฐ๋ ์๋ค.
- ์ค์ธ ์ฅ๋ฉด์์๋ ์์ ๋ฐฉํฅ์ ๋ฐ๋ผ ์ํฐํฉํธ๊ฐ ๋ฐ์ํ๋ single viewpoint์ ๊ทผ๋ณธ์ ํ๊ณ๊ฐ ์๊ณ , ์นด๋ฉ๋ผ FOV๊ฐ ํ๋ จ ๋ฐ์ดํฐ ์ค์ ๊ณผ ๋ค๋ฅผ ๋ ์ฑ๋ฅ์ด ์ ํ๋๋ค.
์ฐธ๊ณ ์๋ฃ#
๊ด๋ จ ๋ ผ๋ฌธ: TPVFormer, SurroundOcc, Occ3D, BEVFormer, GaussianWorld