๐Ÿ’ก ํ•œ ์ค„ ์š”์•ฝ#

LiDAR 3D ํฌ์ธํŠธ ํด๋ผ์šฐ๋“œ๋ฅผ z์ถ• ๊ตฌ๋ถ„ ์—†๋Š” ์ˆ˜์ง ๊ธฐ๋‘ฅ(Pillar)์œผ๋กœ ์กฐ์งํ™”ํ•˜๊ณ , Simplified PointNet ์ธ์ฝ”๋”ฉ ํ›„ 2D Pseudo-Image๋กœ Scatter ์‚ฌ์˜ํ•˜์—ฌ ๋ฌด๊ฑฐ์šด 3D ํ•ฉ์„ฑ๊ณฑ(Convolution) ์—†์ด 2D CNN๋งŒ์œผ๋กœ ์ดˆ๊ณ ์†(62Hz) SOTA 3D ๊ฐ์ฒด ํƒ์ง€๋ฅผ ์‹คํ˜„ํ–ˆ๋‹ค.


๐Ÿ“Œ ๊ฐœ์š” ๋ฐ ํ•ต์‹ฌ ๊ธฐ์—ฌ (Key Contributions)#

  • ์ €์ž: Alex H. Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, Oscar Beijbom (nuTonomy / APTIV)
  • ๋ฐœํ–‰๋…„๋„: 2019 (arXiv:1812.05784, CVPR 2019)
  • ์ฃผ์š” ๊ธฐ์—ฌ์ :
    1. 3D Convolution ์™„์ „ ์ œ๊ฑฐ: ๋ฌด๊ฑฐ์šด 3D ๋ณต์…€ ๋Œ€์‹  2D Pillar ์ˆ˜์ง ๊ธฐ๋‘ฅ ์ธ์ฝ”๋”๋ฅผ ์ œ์•ˆํ•˜์—ฌ ๊ธฐ์กด VoxelNet/SECOND ๋Œ€๋น„ ์ธ์ฝ”๋”ฉ ์ง€์—ฐ์‹œ๊ฐ„์„ 146๋ฐฐ ๊ฐ€์† (1.3ms).
    2. 9์ฐจ์› ํฌ์ธํŠธ ์žฅ์‹ (Point Decoration): ๋‹จ์ˆœ 3D ์ขŒํ‘œ ์™ธ์— Pillar ๋‚ด๋ถ€ ์‚ฐ์ˆ  ํ‰๊ท  ์ขŒํ‘œ ์˜ค์ฐจ $(x_c, y_c, z_c)$ ๋ฐ Pillar ์ค‘์‹ฌ ์˜คํ”„์…‹ $(x_p, y_p)$์„ ๊ธฐํ•˜ํ•™์  ์ž„๋ฒ ๋”ฉ์œผ๋กœ ์ถ”๊ฐ€.
    3. 2D Pseudo-Image Scatter ์ˆ˜์‹: PointNet์œผ๋กœ ์••์ถ•๋œ $(C, P)$ Pillar ํŠน์ง• ๋ฒกํ„ฐ๋ฅผ ์›๋ž˜ 2D BEV ๊ทธ๋ฆฌ๋“œ ์ƒ์˜ $(C, H, W)$ ์ด๋ฏธ์ง€ ํ…์„œ๋กœ ์ฆ‰์‹œ ๋งคํ•‘ํ•˜์—ฌ 2D CNN ๋ฐฑ๋ณธ ์—ฐ๊ฒฐ.

๊ด€๋ จ ์—ฐ๊ตฌ ํ๋ฆ„#

  1. Hand-crafted BEV Feature (PIXOR, Complex-YOLO): ์ˆ˜์ž‘์—… ํ”ผ์ฒ˜๋กœ 2D CNN์„ ๊ตฌ๋™ํ•˜๋‚˜ ์ˆ˜์ง ๊ธฐํ•˜์ •๋ณด ์†์‹ค ๋ฐœ์ƒ.
  2. Voxel-based 3D Conv (VoxelNet, SECOND): 3D ๋ณต์…€ ํ‘œํ˜„์œผ๋กœ ์„ธ๋ฐ€ํ•œ ๊ธฐํ•˜๋ฅผ ์žก์œผ๋‚˜ 3D Conv ์—ฐ์‚ฐ์œผ๋กœ ์ถ”๋ก  ์†๋„๊ฐ€ 4.4Hz~20Hz์— ๊ทธ์นจ.
  3. PointPillars: ์†๋„์™€ ์ •ํ™•๋„์˜ ์ตœ์  ํŠธ๋ ˆ์ด๋“œ์˜คํ”„(62Hz ์‹ค์‹œ๊ฐ„ ์ฒ˜๋ฆฌ)๋ฅผ ์ •๋ฆฝํ•œ LiDAR 3D Perception์˜ ๊ฑฐ๋‘.

๐Ÿ“‘ ๋ชฉ์ฐจ#

  • Chapter 1: 9D Point Feature Decoration (ํฌ์ธํŠธ ์žฅ์‹ ์ˆ˜์‹)
  • Chapter 2: Simplified PointNet ๋ฐ Pseudo-Image Scatter Pooling
  • Chapter 3: 3D Bounding Box Target Regression & Sine Heading
  • Chapter 4: Multi-Task ์†์‹ค ํ•จ์ˆ˜ (Focal Loss + Direction Loss)
  • Chapter 5: ์ฃผ์š” ์‹คํ—˜ ๋ฐ ๊ฒฐ๊ณผ
  • Chapter 6: ๊ฒฐ๋ก  ๋ฐ ์‹œ์‚ฌ์ 

๐Ÿ› ๏ธ Chapter 1: 9D Point Feature Decoration#

1. ์š”์•ฝ#

๊ฐ LiDAR ํฌ์ธํŠธ $l_i$์— ๋Œ€ํ•ด 3D ์ขŒํ‘œ $(x, y, z)$, ๋ฐ˜์‚ฌ์œจ $r$, Pillar ๋‚ด ํ‰๊ท ๊ณผ์˜ ์ฐจ์ด $(x_c, y_c, z_c)$, Pillar Center ์˜คํ”„์…‹ $(x_p, y_p)$์„ 9์ฐจ์› ๋ฒกํ„ฐ๋กœ ํ’๋ถ€ํ•˜๊ฒŒ ์žฅ์‹(Decorate)ํ•ฉ๋‹ˆ๋‹ค.

2. ์ˆ˜์‹ ๋ฐ ํŒŒ์ด์ฌ ์ฝ”๋“œ ์„ค๋ช…#

$$l_i = [x, \ y, \ z, \ r, \ x_c, \ y_c, \ z_c, \ x_p, \ y_p]^T \in \mathbb{R}^9$$$$x_c = x - \bar{x}, \quad y_c = y - \bar{y}, \quad z_c = z - \bar{z}$$$$x_p = x - x_{\text{pillar}}, \quad y_p = y - y_{\text{pillar}}$$
import torch

def decorate_point_cloud_into_pillars(
    points_3d: torch.Tensor, # (N, 4) -> x, y, z, reflectance
    pillar_size: float = 0.16,
    max_points_per_pillar: int = 100,
    max_pillars: int = 12000
) -> torch.Tensor:
    """
    PointPillars: 3D ํฌ์ธํŠธ๋ฅผ 9์ฐจ์› ํ”ผ์ฒ˜ ํ…์„œ (D=9, P, N)๋กœ ์žฅ์‹
    """
    N_pts, _ = points_3d.shape
    
    # 1. Pillar ์ขŒํ‘œ ์ธ๋ฑ์Šค ๊ณ„์‚ฐ (x_pillar, y_pillar)
    pillar_x = torch.floor(points_3d[:, 0] / pillar_size).long()
    pillar_y = torch.floor(points_3d[:, 1] / pillar_size).long()
    
    # 2. Pillar ์ค‘์‹ฌ ์‹ค์ธก ์ขŒํ‘œ
    x_p = points_3d[:, 0] - (pillar_x.float() * pillar_size + pillar_size / 2.0)
    y_p = points_3d[:, 1] - (pillar_y.float() * pillar_size + pillar_size / 2.0)
    
    # 3. Pillar ๋‚ด ์‚ฐ์ˆ  ํ‰๊ท  ์ค‘์‹ฌ ์˜ค์ฐจ (x_c, y_c, z_c)
    mean_x = points_3d[:, 0].mean()
    mean_y = points_3d[:, 1].mean()
    mean_z = points_3d[:, 2].mean()
    
    x_c = points_3d[:, 0] - mean_x
    y_c = points_3d[:, 1] - mean_y
    z_c = points_3d[:, 2] - mean_z
    
    # 4. 9์ฐจ์› ์žฅ์‹ ๋ฒกํ„ฐ ๊ฒฐํ•ฉ
    decorated_pts = torch.stack([
        points_3d[:, 0], points_3d[:, 1], points_3d[:, 2], points_3d[:, 3],
        x_c, y_c, z_c, x_p, y_p
    ], dim=-1) # (N, 9)
    
    return decorated_pts

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
pts_raw = torch.randn(1000, 4)
dec_pts = decorate_point_cloud_into_pillars(pts_raw)
print("์žฅ์‹๋œ ํฌ์ธํŠธ 9์ฐจ์› ํ”ผ์ฒ˜ Shape:", dec_pts.shape)

๐Ÿ› ๏ธ Chapter 2: Simplified PointNet ๋ฐ Pseudo-Image Scatter Pooling#

1. ์š”์•ฝ#

$(D=9, P, N)$ ํ…์„œ๋ฅผ 1D Conv/Linear $\to$ BN $\to$ ReLU $\to$ MaxPool์„ ์ ์šฉํ•ด $(C, P)$ ๋กœ ์••์ถ•ํ•œ ํ›„, ์›๋ž˜ BEV ๊ทธ๋ฆฌ๋“œ ํ”ฝ์…€ ์œ„์น˜๋กœ Scatter ์‚ฌ์˜ํ•˜์—ฌ $(C, H, W)$ 2D Pseudo-Image๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

2. ์ˆ˜์‹ ๋ฐ ํŒŒ์ด์ฌ ์ฝ”๋“œ ์„ค๋ช…#

$$f_{\text{pillar}} = \text{MaxPool}_{N}\Big( \text{ReLU}\left( \text{BN}( \mathbf{W} \cdot l ) \right) \Big) \in \mathbb{R}^{C \times P}$$$$F_{\text{pseudo-image}} = \text{Scatter}\Big( f_{\text{pillar}}, \ (x_{\text{pillar}}, y_{\text{pillar}}) \Big) \in \mathbb{R}^{C \times H \times W}$$
import torch
import torch.nn as nn

class PointPillarEncoder(nn.Module):
    """
    Simplified PointNet ์ธ์ฝ”๋” ๋ฐ 2D Pseudo-Image Scatter ๋ชจ๋“ˆ
    """
    def __init__(self, in_dim: int = 9, out_channels: int = 64):
        super().__init__()
        self.linear = nn.Linear(in_dim, out_channels)
        self.bn = nn.BatchNorm1d(out_channels)

    def forward(self, pillar_tensor: torch.Tensor, pillar_coords: torch.Tensor, grid_shape: tuple) -> torch.Tensor:
        """
        pillar_tensor: (P, N, D=9)
        pillar_coords: (P, 2) -> (x_idx, y_idx)
        """
        P, N, D = pillar_tensor.shape
        H, W = grid_shape
        
        # 1. Simplified PointNet
        x = self.linear(pillar_tensor.view(-1, D))
        x = self.bn(x).view(P, N, -1)
        x = torch.relu(x)
        
        # MaxPool over N points in each pillar -> (P, C)
        feat_p, _ = torch.max(x, dim=1)
        
        # 2. Scatter to 2D Pseudo-Image (C, H, W)
        C = feat_p.shape[-1]
        pseudo_img = torch.zeros((C, H, W), device=pillar_tensor.device)
        
        x_idx = pillar_coords[:, 0]
        y_idx = pillar_coords[:, 1]
        
        pseudo_img[:, y_idx, x_idx] = feat_p.T
        return pseudo_img.unsqueeze(0) # (1, C, H, W)

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
p_tensor = torch.randn(500, 32, 9)
p_coords = torch.randint(0, 100, (500, 2))
encoder = PointPillarEncoder()
print("์ƒ์„ฑ๋œ 2D Pseudo-Image Shape:", encoder(p_tensor, p_coords, (100, 100)).shape)

๐Ÿ› ๏ธ Chapter 3: 3D Anchor Target Regression & Multi-Task Loss#

1. ์š”์•ฝ#

3D ์œ„์น˜ ์˜ค์ฐจ $(\Delta x, \Delta y, \Delta z)$, 3D ํฌ๊ธฐ ๋กœ๊ทธ ์˜ค์ฐจ $(\Delta w, \Delta l, \Delta h)$, ๊ฐ๋„ $\Delta\theta = \sin(\theta^{gt} - \theta^a)$๋ฅผ Focal Loss ๋ฐ Smooth L1 Loss๋กœ ๊ณต๋™ ์ตœ์ ํ™”ํ•ฉ๋‹ˆ๋‹ค.

2. ์ˆ˜์‹ ๋ฐ ํŒŒ์ด์ฌ ์ฝ”๋“œ ์„ค๋ช…#

$$\Delta x = \frac{x^{gt} - x^a}{d^a}, \quad \Delta y = \frac{y^{gt} - y^a}{d^a}, \quad d^a = \sqrt{(w^a)^2 + (l^a)^2}$$$$\Delta w = \log \frac{w^{gt}}{w^a}, \quad \Delta l = \log \frac{l^{gt}}{l^a}, \quad \Delta h = \log \frac{h^{gt}}{h^a}, \quad \Delta\theta = \sin(\theta^{gt} - \theta^a)$$$$\mathcal{L} = \frac{1}{N_{pos}} \left( \beta_{loc} \mathcal{L}_{loc} + \beta_{cls} \mathcal{L}_{cls} + \beta_{dir} \mathcal{L}_{dir} \right)$$
import torch
import torch.nn.functional as F

def compute_pointpillars_loss(
    cls_preds: torch.Tensor, # (N_anchors, Num_classes)
    box_preds: torch.Tensor, # (N_anchors, 7)
    dir_preds: torch.Tensor, # (N_anchors, 2)
    cls_targets: torch.Tensor,
    box_targets: torch.Tensor,
    dir_targets: torch.Tensor
) -> torch.Tensor:
    """
    PointPillars Multi-Task Loss (Focal + SmoothL1 + Direction CrossEntropy)
    """
    pos_mask = (cls_targets > 0)
    N_pos = pos_mask.sum().float().clamp(min=1.0)
    
    # 1. Focal Loss (Classification)
    p = torch.sigmoid(cls_preds)
    focal_weights = 0.25 * torch.pow(1.0 - p, 2.0)
    loss_cls = F.binary_cross_entropy_with_logits(cls_preds, cls_targets.float(), reduction='none') * focal_weights
    loss_cls = loss_cls.sum() / N_pos
    
    # 2. Smooth L1 Loss (Box Regression)
    loss_box = F.smooth_l1_loss(box_preds[pos_mask], box_targets[pos_mask], reduction='sum') / N_pos
    
    # 3. Direction Loss (Softmax CE)
    loss_dir = F.cross_entropy(dir_preds[pos_mask], dir_targets[pos_mask], reduction='sum') / N_pos
    
    return 1.0 * loss_cls + 2.0 * loss_box + 0.2 * loss_dir

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
c_p, b_p, d_p = torch.randn(100, 1), torch.randn(100, 7), torch.randn(100, 2)
c_t, b_t, d_t = torch.randint(0, 2, (100, 1)), torch.randn(100, 7), torch.randint(0, 2, (100,))
print("PointPillars ์ด ์†์‹ค:", compute_pointpillars_loss(c_p, b_p, d_p, c_t, b_t, d_t).item())

๐Ÿ“Š ์ฃผ์š” ์‹คํ—˜ ๋ฐ ๊ฒฐ๊ณผ (Experiments & Results)#

1. KITTI 3D / BEV ๊ฐ์ฒด ํƒ์ง€ ๋ฆฌ๋”๋ณด๋“œ ๋น„๊ต#

์•Œ๊ณ ๋ฆฌ์ฆ˜ (Method)์ž…๋ ฅ ๋ชจ๋‹ฌ๋ฆฌํ‹ฐ์ฒ˜๋ฆฌ ์†๋„ (Hz) โ†‘Car BEV mAP โ†‘Car 3D mAP โ†‘
VoxelNetLiDAR4.4 Hz (๋А๋ฆผ)79.2665.11
SECONDLiDAR20.0 Hz79.3776.48
PointPillars (Ours)LiDAR62.0 Hz (์‹ค์‹œ๊ฐ„ SOTA)86.10 (+6.73%)74.99
PointPillars + TensorRTLiDAR105.0 Hz (์ดˆ๊ณ ์†)86.1074.99
  • ๊ฒฐ๊ณผ: 3D Conv๋ฅผ ํƒˆํ”ผํ•œ Pillar ์ธ์ฝ”๋” ๋•๋ถ„์— ์ธ์ฝ”๋”ฉ ์‹œ๊ฐ„์„ 1.3ms๋กœ 146๋ฐฐ ๊ฐ€์†ํ•˜๊ณ  62Hz ์‹ค์‹œ๊ฐ„ ์ฒ˜๋ฆฌ ๋‹ฌ์„ฑ.

๐Ÿ’ก ๊ฒฐ๋ก  ๋ฐ ์‹œ์‚ฌ์  (Conclusion & Insights)#

1. ๊ฒฐ๋ก #

PointPillars๋Š” 3D ํฌ์ธํŠธ ํด๋ผ์šฐ๋“œ๋ฅผ 2D Pseudo-Image ์‚ฌ์˜๊ณ„๋กœ ์ „ํ™˜ํ•˜์—ฌ ๋ฌด๊ฑฐ์šด 3D Conv ์—†์ด 2D CNN๋งŒ์œผ๋กœ ์ดˆ๊ณ ์†(62Hz) SOTA 3D ๊ฐ์ฒด ํƒ์ง€๋ฅผ ๊ตฌํ˜„ํ•œ ์ž์œจ์ฃผํ–‰ 3D Perception์˜ ๊ธฐ์ดˆ ํ•„๋… ๋…ผ๋ฌธ์ž…๋‹ˆ๋‹ค.

2. ํ•œ๊ณ„์  ๋ฐ ์•„์‰ฌ์šด ์ #

  • Pillar ๋‹จ์œ„ ์ฒ˜๋ฆฌ๋กœ z์ถ• ์ •๋ณด(๋†’์ด)๊ฐ€ MaxPool๋กœ ์ง‘์•ฝ๋˜์–ด ์„ธ๋ฐ€ํ•œ ์ˆ˜์ง ๊ตฌ์กฐ ํ‘œํ˜„์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค.
  • ๋ณดํ–‰์žยท์ž์ „๊ฑฐ ํƒ์ง€ ์„ฑ๋Šฅ์ด ์ฐจ๋Ÿ‰๋ณด๋‹ค ๋‚ฎ๋‹ค(์ž‘์€ ๊ฐ์ฒด, ํฌ์†Œ ํฌ์ธํŠธ).
  • ์นด๋ฉ”๋ผ์™€์˜ ์œตํ•ฉ์„ ๊ณ ๋ คํ•˜์ง€ ์•Š์€ LiDAR ์ „์šฉ ์„ค๊ณ„๋กœ, ์นด๋ฉ”๋ผ๋งŒ์ด ์ œ๊ณตํ•˜๋Š” ์ƒ‰ยท์งˆ๊ฐ ์ •๋ณด๋ฅผ ํ™œ์šฉํ•˜์ง€ ๋ชปํ•œ๋‹ค.

์ฐธ๊ณ  ์ž๋ฃŒ#

๊ด€๋ จ ๋…ผ๋ฌธ: PointNet, CenterPoint, BEVFusion, nuScenes