๐ก ํ ์ค ์์ฝ#
3D ํฌ์ธํธ ํด๋ผ์ฐ๋๋ฅผ ๋ณต์ (Voxel)์ด๋ 2D ๋ ๋๋ง ์ด๋ฏธ์ง๋ก ์ ํํ๋ ์์ค ์ ์ฒ๋ฆฌ ์์ด, **๊ณต์ MLP(Shared MLP)**์ **MaxPooling ๋์นญ ํจ์(Symmetric Function)**์ ์กฐํฉ์ผ๋ก ์์ด ๋ถ๋ณ์ฑ(Permutation Invariance)์ ๋ณด์ฅํ๋ฉฐ ์์ 3D ์ ์งํฉ์ ์ง์ ํ์ตํ๋ ์ต์ด์ ๋ฅ๋ฌ๋ ์ํคํ ์ฒ์ด๋ค.
๐ ๊ฐ์ ๋ฐ ํต์ฌ ๊ธฐ์ฌ (Key Contributions)#
- ์ ์: Charles R. Qi, Hao Su, Kaichun Mo, Leonidas J. Guibas (Stanford University)
- ๋ฐํ๋ ๋: 2017 (CVPR 2017)
- ์ฃผ์ ๊ธฐ์ฌ์ :
- ์์ด ๋ถ๋ณ์ฑ ๋์นญ ์ง๊ณ (Symmetric Aggregator): ์ ๋ ฅ ์ ์์ $N!$๊ฐ์ง ์กฐํฉ์ ๊ด๊ณ์์ด ๊ณ ์ ๊ธธ์ด ํน์ง์ ์ถ์ถํ๋ Max-Pooling ๋์นญ ์ฐ์ฐ ๋์ .
- T-Net (Spatial Transformation Network): 3D ๊ธฐํ ๋ณํ ๋ฐ 64D ํผ์ฒ ๋ณํ ํ๋ ฌ $A$๋ฅผ ์ค์ค๋ก ์์ธกํด ์ ๊ท ์์ธ(Canonical Pose) ์ ๋ ฌ.
- ์ง๊ต์ฑ ์ ๊ทํ ์์ค (Orthogonality Regularization): ํผ์ฒ ๋ณํ ํ๋ ฌ์ ์ ๋ณด ์์ค์ ๋ง๋ $\| I - AA^T \|_F^2$ ์ ๊ทํ ์์ค ์ถ๊ฐ.
- Universal Approximation ์ด๋ก ์ ์ ์ฆ: ๋ผ๋ ์ ์งํฉ(Critical Point Set $\mathcal{C}_S$)์ ํตํด ์ด๋ ํ ์ฐ์ ์งํฉ ํจ์๋ ๊ทผ์ฌ ๊ฐ๋ฅํจ์ ์ฆ๋ช .
๐ฏ ๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ ๋ฐ ๊ธฐ์กด ํ๊ณ (Related Work & Motivation)#
๊ด๋ จ ์ฐ๊ตฌ ํ๋ฆ#
- Volumetric 3D CNN (VoxNet): ํฌ์ธํธ ํด๋ผ์ฐ๋๋ฅผ $32 \times 32 \times 32$ 3D ๋ณต์ ๊ฒฉ์๋ก ๋ณํํ์ฌ ๋ฉ๋ชจ๋ฆฌ ํญ๋ฐ ๋ฐ ํด์๋ ์์ํ ์ค์ฐจ(Quantization Artifacts) ๋ฐ์.
- Multi-View CNN (MVCNN): 3D ๋ฉ์๋ฅผ ์ฌ๋ฌ ๊ฐ๋์ 2D ์ด๋ฏธ์ง๋ก ๋ ๋๋งํ ํ 2D CNN์ ํฌ์ ํ๋ฏ๋ก 3D ๊ณต๊ฐ ์ ๋ถํ (Segmentation) ํ์ฅ ํ๊ณ.
- PointNet: ์์ ํฌ์ธํธ ์งํฉ $(N \times 3)$์ ๊ทธ๋๋ก ์ ๋ ฅ๋ฐ์ $\mathcal{O}(N)$ ์ฐ์ฐ์ผ๋ก ๋ถ๋ฅ ๋ฐ ๋ถํ ๋์ ๋ฌ์ฑ.
๐ ๋ชฉ์ฐจ#
- Chapter 1: ๋์นญ ํจ์ (Symmetric Function) & Max-Pooling ์์
- Chapter 2: T-Net (Joint Alignment Network) ์์
- Chapter 3: Feature Transform ์ง๊ต์ฑ ์ ๊ทํ ์์ค (Orthogonality Regularization)
- Chapter 4: Local-Global Feature Concatenation ๋ถํ ์ ๊ฒฝ๋ง
- Chapter 5: ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ
- Chapter 6: ๊ฒฐ๋ก ๋ฐ ์์ฌ์
๐ ๏ธ Chapter 1: ๋์นญ ํจ์ (Symmetric Function) & Max-Pooling ์์#
1. ์์ฝ#
์์ ์๋ ์งํฉ $S = \{x_1, \ldots, x_n\}$์ ์ด๋ค ์์ด ์กฐํฉ์๋ ๋ถ๋ณ์ธ ํจ์ $f(S)$๋ฅผ ๊ณต์ MLP $h$์ ๋์นญ ์ง๊ณ ํจ์ $g = \text{MaxPool}$์ ํฉ์ฑ์ผ๋ก ์ ๋ํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$f(\{x_1, \ldots, x_n\}) \approx g\left( \text{MaxPool}_{i=1 \dots n} \left( h(x_i) \right) \right)$$- $x_i \in \mathbb{R}^3$: $i$๋ฒ์งธ 3D ์ ์ขํ $(x, y, z)$
- $h: \mathbb{R}^3 \to \mathbb{R}^K$: ๊ณต์ MLP (1D Convolution)
- $\text{MaxPool}$: $n$๊ฐ ์ ์ ๋ํด ๊ฐ ์ฑ๋ ์ถ๋ณ ์ต๋๊ฐ์ ์ ํํ๋ ๋์นญ ์ฐ์ฐ
import torch
import torch.nn as nn
class PointNetSymmetricAggregator(nn.Module):
"""
PointNet ํต์ฌ: Shared MLP (1D Conv) + Max-Pooling ๋์นญ ์ง๊ณ๊ธฐ
"""
def __init__(self, in_dim: int = 3, out_dim: int = 1024):
super().__init__()
self.mlp = nn.Sequential(
nn.Conv1d(in_dim, 64, 1),
nn.BatchNorm1d(64),
nn.ReLU(),
nn.Conv1d(64, 128, 1),
nn.BatchNorm1d(128),
nn.ReLU(),
nn.Conv1d(128, out_dim, 1),
nn.BatchNorm1d(out_dim)
)
def forward(self, x: torch.Tensor) -> torch.Tensor:
"""
x: (B, C=3, N_pts)
"""
feats = self.mlp(x) # (B, 1024, N_pts)
# Max-Pooling over N_pts -> ์์ด ๋ถ๋ณ ์ ์ญ ํน์ง ๋ฒกํฐ
global_feature, _ = torch.max(feats, dim=-1) # (B, 1024)
return global_feature
# --- ์ฌ์ฉ ์์ ---
pts = torch.randn(2, 3, 1024) # Batch=2, 3D ์ขํ, 1024๊ฐ ์
aggregator = PointNetSymmetricAggregator()
print("PointNet ์ ์ญ ํน์ง ๋ฒกํฐ Shape:", aggregator(pts).shape)๐ ๏ธ Chapter 2: T-Net (Joint Alignment Network) ์์#
1. ์์ฝ#
์ ๋ ฅ ์ขํ๋ ๊ณ ์ฐจ์ ํน์ง ๊ณต๊ฐ์์ ๋ฐ์ดํฐ์ ํ์ /์ด๋ ๋ถ๋ณ์ฑ์ ํ๋ณดํ๊ธฐ ์ํด $K \times K$ ์ ๊ท ์์ธ(Canonical Pose) ์ํ ๋ณํ ํ๋ ฌ $A$๋ฅผ ์์ธกํด ๊ณฑํด์ค๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$A = \text{T-Net}(X) \in \mathbb{R}^{K \times K}, \quad X_{\text{aligned}} = X \cdot A$$import torch
import torch.nn as nn
class TNet(nn.Module):
"""
PointNet T-Net: K x K ์ ๊ท ์์ธ ๊ณต๊ฐ ์ ๋ ฌ ๋ณํ ํ๋ ฌ ์์ธก๊ธฐ
"""
def __init__(self, k: int = 3):
super().__init__()
self.k = k
self.mlp = nn.Sequential(
nn.Conv1d(k, 64, 1), nn.BatchNorm1d(64), nn.ReLU(),
nn.Conv1d(64, 128, 1), nn.BatchNorm1d(128), nn.ReLU(),
nn.Conv1d(128, 1024, 1), nn.BatchNorm1d(1024), nn.ReLU()
)
self.fc = nn.Sequential(
nn.Linear(1024, 512), nn.BatchNorm1d(512), nn.ReLU(),
nn.Linear(512, 256), nn.BatchNorm1d(256), nn.ReLU(),
nn.Linear(256, k * k)
)
def forward(self, x: torch.Tensor) -> torch.Tensor:
B = x.shape[0]
feat = self.mlp(x)
global_feat, _ = torch.max(feat, dim=-1)
matrix = self.fc(global_feat).view(B, self.k, self.k)
# Identity ํ๋ ฌ ๋ํด ์ด๊ธฐ ์์ ์ฑ ํ๋ณด
identity = torch.eye(self.k, device=x.device).unsqueeze(0).repeat(B, 1, 1)
return matrix + identity
# --- ์ฌ์ฉ ์์ ---
tnet_3d = TNet(k=3)
pts_raw = torch.randn(2, 3, 1024)
trans_mat = tnet_3d(pts_raw)
print("์์ธก๋ 3x3 ๋ณํ ํ๋ ฌ Shape:", trans_mat.shape)๐ ๏ธ Chapter 3: Feature Transform ์ง๊ต์ฑ ์ ๊ทํ ์์ค ์์#
1. ์์ฝ#
64์ฐจ์ ์ด์์ ๊ณ ์ฐจ์ ํน์ง ๋ณํ ํ๋ ฌ $A$๊ฐ ์ ๋ณด๋ฅผ ์๊ณกํ๊ฑฐ๋ ์์ค์ํค์ง ์๊ณ ์์ ๊ฐ์ฒด ํ์ ์ ๊ฐ๊น๋๋ก $AA^T = I$ ์ง๊ต์ฑ์ ์ ๋ํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathcal{L}_{\text{reg}} = \| I - A A^T \|_F^2$$- $A \in \mathbb{R}^{K \times K}$: T-Net์ด ์ถ๋ ฅํ $K \times K$ ๋ณํ ํ๋ ฌ
- $\| \cdot \|_F$: Frobenius Norm (๋ชจ๋ ํ๋ ฌ ์์ ์ ๊ณฑํฉ)
import torch
def compute_orthogonality_regularization_loss(A: torch.Tensor) -> torch.Tensor:
"""
PointNet Feature Transform Matrix Orthogonality Loss: || I - A @ A^T ||_F^2
"""
B, K, _ = A.shape
identity = torch.eye(K, device=A.device).unsqueeze(0).repeat(B, 1, 1)
A_A_T = torch.matmul(A, A.transpose(1, 2))
loss_reg = torch.mean(torch.norm(identity - A_A_T, dim=(1, 2)) ** 2)
return loss_reg
# --- ์ฌ์ฉ ์์ ---
matrix_64d = torch.randn(2, 64, 64)
print("PointNet Feature Transform ์ ๊ทํ ์์ค:", compute_orthogonality_regularization_loss(matrix_64d).item())๐ ๏ธ Chapter 4: Local-Global Feature Concatenation ๋ถํ ์ ๊ฒฝ๋ง#
1. ์์ฝ#
ํฌ์ธํธ๋ณ ํํธ/์ฅ๋ฉด ๋ถํ (Part/Semantic Segmentation)์ ์ํด 64์ฐจ์ ๊ตญ์ ํผ์ฒ $h^{\text{loc}}(x_i)$์ Max-Pooling 1024์ฐจ์ ์ ์ญ ํผ์ฒ $g(S)$๋ฅผ ๊ฐ ์ ๋ง๋ค ๊ฒฐํฉ(Concatenate)ํ์ฌ 1088์ฐจ์ ํผ์ฒ๋ก ๊ฐ๋ณ ๋ถ๋ฅํฉ๋๋ค.
2. ์์ ๋ฐ ํ์ด์ฌ ์ฝ๋ ์ค๋ช #
$$\mathbf{f}_{\text{seg\_i}} = \text{Concat}\big( h^{\text{loc}}(x_i), \ g(S) \big) \in \mathbb{R}^{64 + 1024}$$import torch
import torch.nn as nn
class PointNetSegmentationHead(nn.Module):
"""
PointNet Segmentation: Local (64d) + Global (1024d) Feature ๊ฒฐํฉ ๋ถ๋ฅ๊ธฐ
"""
def __init__(self, num_classes: int = 13):
super().__init__()
self.conv_seg = nn.Sequential(
nn.Conv1d(1088, 512, 1), nn.BatchNorm1d(512), nn.ReLU(),
nn.Conv1d(512, 256, 1), nn.BatchNorm1d(256), nn.ReLU(),
nn.Conv1d(256, 128, 1), nn.BatchNorm1d(128), nn.ReLU(),
nn.Conv1d(128, num_classes, 1)
)
def forward(self, local_feat: torch.Tensor, global_feat: torch.Tensor) -> torch.Tensor:
"""
local_feat: (B, 64, N_pts)
global_feat: (B, 1024)
"""
B, _, N_pts = local_feat.shape
g_expand = global_feat.unsqueeze(-1).repeat(1, 1, N_pts) # (B, 1024, N_pts)
fused = torch.cat([local_feat, g_expand], dim=1) # (B, 1088, N_pts)
seg_logits = self.conv_seg(fused) # (B, Num_classes, N_pts)
return seg_logits
# --- ์ฌ์ฉ ์์ ---
f_loc = torch.randn(2, 64, 1024)
f_glob = torch.randn(2, 1024)
seg_head = PointNetSegmentationHead(num_classes=13)
print("PointNet ์ ๋ณ ๋ถํ Logits Shape:", seg_head(f_loc, f_glob).shape)๐ ์ฃผ์ ์คํ ๋ฐ ๊ฒฐ๊ณผ (Experiments & Results)#
1. ModelNet40 3D ๋ฌผ์ฒด ๋ถ๋ฅ ๋ฒค์น๋งํฌ ๋น๊ต#
| ์๊ณ ๋ฆฌ์ฆ (Method) | ์ ๋ ฅ ๋ฐ์ดํฐ ํผ | 3D ํ๋ฉด ํํ ๋ฐฉ์ | ๋ถ๋ฅ ์ ํ๋ (Accuracy) โ | ์ฒ๋ฆฌ ์๋ (FLOPs) โ |
|---|---|---|---|---|
| VoxNet | 3D Voxel | $32 \times 32 \times 32$ Grid | 85.9% | - |
| Subvolume | 3D Voxel | Sub-Voxel Grid | 89.2% | 3,633M (ํ๋ผ๋ฏธํฐ 16.6M, ๊ณ ๋น์ฉ) |
| MVCNN | Multi-View Image | 2D ๋ ๋๋ง ์ด๋ฏธ์ง | 90.1% | 62,057M (ํ๋ผ๋ฏธํฐ 60.0M, ์ต๊ณ ๋น์ฉ) |
| PointNet (Ours) | Raw Point Cloud | Unordered Point Set | 89.2% (3D ์ ๋ ฅ ์ค ์ต๊ณ ) | 440M (ํ๋ผ๋ฏธํฐ 3.5M, ์ ๋น์ฉ ์ด๊ณ ์) |
- ๊ฒฐ๊ณผ: ๋ณต์ ๋ฐ์ดํฐ ํญ๋ฐ ์์ด 89.2% ๋ถ๋ฅ ์ ํ๋๋ก 3D ์ ๋ ฅ ๋ฐฉ๋ฒ ์ค ์ต๊ณ ์ฑ๋ฅ(๋ฉํฐ๋ทฐ ๋ ๋๋ง ๋ฐฉ์์ธ MVCNN์ 90.1%์๋ ๊ทผ์ํ๊ฒ ๋ชป ๋ฏธ์นจ) ๋ฐ ์ด๋น 100๋ง ํฌ์ธํธ ์ค์๊ฐ ์ถ๋ก ์๋ ํ๋ณด.
๐ก ๊ฒฐ๋ก ๋ฐ ์์ฌ์ (Conclusion & Insights)#
1. ๊ฒฐ๋ก #
PointNet์ ์์๊ฐ ์๋ 3D ์ ์งํฉ์ ์ง์ ๋ฅ๋ฌ๋ ๊ณต๊ฐ์ผ๋ก ์ธ์ฝ๋ฉํ๋ ๋ฐฑ๋ณธ์ ํจ์๋ก์, PointPillars, CenterPoint, BEVFusion ๋ฑ ์์จ์ฃผํ perception ์คํ์ ๊ธฐ์ด๋ฅผ ๋ฆ์ ํ๋ ๋ ผ๋ฌธ์ ๋๋ค.
2. ์์จ์ฃผํ ๊ด๋ จ ์์ฌ์ #
VoxelNet์ ๊ฐ ๋ณต์ ๋ด ์ ๋ค์ PointNet ์ธ์ฝ๋๋ฅผ ์ ์ฉํ๊ณ , PointPillars๋ ์์ง ๊ธฐ๋ฅ(pillar)์ PointNet์ผ๋ก ์ธ์ฝ๋ฉํ๋ค. BEVFusion, CenterPoint ๋ฑ ํ๋ LiDAR ํ์ง๊ธฐ์ ํฌ์ธํธ ์ธ์ฝ๋ฉ ์ค๊ณ ์ฒ ํ์ด ์ด ๋ ผ๋ฌธ์์ ์ถ๋ฐํ๋ค. ํฉ์ฑ ๋ฐ์ดํฐ(Blensor ์๋ฎฌ๋ ์ดํฐ)๋ก ์์ฑ๋ ๋ถ๋ถ ์ค์บ์์๋ ์ฑ๋ฅ ์ ํ 5.3%๋ก ๊ฒฌ๊ณ ํ์ฌ ๋๋ฉ์ธ ๊ฐญ ์ฐ๊ตฌ์๋ ์์ฌ์ ์ ์ ๊ณตํ๋ค.
3. ํ๊ณ์ ๋ฐ ์์ฌ์ด ์ #
- ์ง์ญ ์ด์ ๊ตฌ์กฐ๋ฅผ ๋ช ์์ ์ผ๋ก ๋ชจ๋ธ๋งํ์ง ์์ โ PointNet++์์ FPS + Ball Query๋ก ํด๊ฒฐ.
- ๋๊ท๋ชจ ์ฅ๋ฉด ์ฒ๋ฆฌ ์ ์ ์ ์ฆ๊ฐ์ ๋ฐ๋ฅธ ์ฐ์ฐ ๋ถ๋ด.
- T-Net์ ์ ๊ทํ ์์ค(0.001 ๊ฐ์ค์น)์ด ์ค์ ๋ก ๊ฐ์ฒด ๋ณํ ๋ถ๋ณ์ฑ์ ์ผ๋ง๋ ๊ฒฌ๊ณ ํ๊ฒ ๋ณด์ฅํ๋์ง์ ๋ํ ์ ๋์ ๋ถ์์ด ๋ค์ ์ ํ์ ์ด๋ผ๋ ์ ์ ์์ฌ์.
์ฐธ๊ณ ์๋ฃ#
๊ด๋ จ ๋ ผ๋ฌธ: PointPillars, CenterPoint, BEVFusion