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

VectorMapNet์€ ๋งต ์š”์†Œ๋ฅผ ๋ž˜์Šคํ„ฐ ํ”ฝ์…€ ์„ธ๊ทธ๋ฉ˜ํ…Œ์ด์…˜ ๋Œ€์‹  ํฌ์†Œ ํด๋ฆฌ๋ผ์ธ(Polyline) ์ง‘ํ•ฉ์œผ๋กœ ์ •์˜ํ•˜๊ณ , DETR ํƒ์ง€๊ธฐ(Element Detector)์™€ ์ž๊ธฐํšŒ๊ท€ ์ •์  ์‹œํ€€์Šค ์ƒ์„ฑ๊ธฐ(Autoregressive Polyline Generator)์˜ 2๋‹จ๊ณ„ ๊ตฌ์กฐ๋กœ ์„ผ์„œ ์ •๋ณด๋กœ๋ถ€ํ„ฐ ์ง์ ‘ ๋ฒกํ„ฐํ™”๋œ HD ๋งต์„ End-to-End ์˜ˆ์ธกํ•˜์—ฌ nuScenes ๋ž˜์Šคํ„ฐ SOTA ๋Œ€๋น„ +22.7 mAP๋ฅผ ๋‹ฌ์„ฑํ–ˆ๋‹ค.


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

  • ์ €์ž: Yicheng Liu, Tianyuan Yuan, Yue Wang, Yilun Wang, Hang Zhao (Shanghai Qi Zhi Inst., Tsinghua Univ., MIT, Li Auto)
  • ๋ฐœํ–‰๋…„๋„: 2022 (arXiv:2206.08920, ICML 2023)
  • ์ฃผ์š” ๊ธฐ์—ฌ์ :
    1. ์ตœ์ดˆ์˜ ํ•™์Šต ๊ธฐ๋ฐ˜ 3D ๋ฒกํ„ฐ HD ๋งต ๋„คํŠธ์›Œํฌ: ๋ณ„๋„์˜ ํœด๋ฆฌ์Šคํ‹ฑ ํ›„์ฒ˜๋ฆฌ ์—ฐ์‚ฐ ์—†์ด ์„ผ์„œ ์ž…๋ ฅ(์นด๋ฉ”๋ผ/LiDAR)์—์„œ ์ธ์Šคํ„ด์Šค ์ •์  ์‹œํ€€์Šค๋ฅผ ์ง์ ‘ ์ถœ๋ ฅํ•˜๋Š” ํŒŒ์ดํ”„๋ผ์ธ.
    2. 2๋‹จ๊ณ„ ํƒ์ง€-์ƒ์„ฑ ์•„ํ‚คํ…์ฒ˜ (Map Detector + Polyline Generator): Element Detector๊ฐ€ ๋งต ์š”์†Œ์˜ ์œ„์น˜(ํ‚คํฌ์ธํŠธ $\mathcal{A}_i$)์™€ ํด๋ž˜์Šค๋ฅผ ํƒ์ง€ํ•˜๊ณ , Polyline Generator๊ฐ€ ์ด๋ฅผ ์กฐ๊ฑด์œผ๋กœ ์  ์ขŒํ‘œ ํ† ํฐ ์‹œํ€€์Šค๋ฅผ ์ž๊ธฐํšŒ๊ท€ ์ƒ์„ฑ.
    3. ์ด์‚ฐ ๋ฒ”์ฃผํ˜• ๋ถ„ํฌ(Categorical Distribution) ์ •์  ์ธ์ฝ”๋”ฉ: ์  ์ขŒํ‘œ๋ฅผ ์–‘์žํ™” ํ† ํฐ์œผ๋กœ ๋ณ€ํ™˜ํ•ด ๋น„๋Œ€์นญ ๋‹ค์ค‘ ๋ชจ๋“œ(Multimodal) ๋„๋กœ ๊ฒฝ๊ณ„ ๋ถ„ํฌ ๋ชจ๋ธ๋ง.
    4. ๋‹ค์šด์ŠคํŠธ๋ฆผ ํ”Œ๋ž˜๋‹ ํ˜ธํ™˜์„ฑ: ์˜ˆ์ธก๋œ ๋ฒกํ„ฐ ํด๋ฆฌ๋ผ์ธ์„ ๋ชจ์…˜ ์˜ˆ์ธก ๋ชจ๋ธ์— ์ง์ ‘ ํˆฌ์ž…ํ•˜์—ฌ minADE ์˜ค์ฐจ -0.083m ๊ฐ์ถ• ๊ฒ€์ฆ.

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

  1. Rasterized HD Map (HDMapNet): 2D BEV ์„ธ๊ทธ๋ฉ˜ํ…Œ์ด์…˜ ์ด๋ฏธ์ง€๋ฅผ ์–ป์€ ํ›„ ๋‹ค๋‹จ๊ณ„ ํœด๋ฆฌ์Šคํ‹ฑ ์•Œ์•ฝ/์„  ํ›„์ฒ˜๋ฆฌ๋กœ ๋ฒกํ„ฐํ™”ํ•˜๋ฏ€๋กœ ์ง€์—ฐ์‹œ๊ฐ„์ด ๊ธธ๊ณ  ์ธ์Šคํ„ด์Šค ์ผ๊ด€์„ฑ ํŒŒ๊ดด.
  2. VectorMapNet: ์ตœ์ดˆ๋กœ ๋งต ๊ตฌ์„ฑ์„ ํฌ์†Œ ํด๋ฆฌ๋ผ์ธ ์ง‘ํ•ฉ ์˜ˆ์ธก ๋ฌธ์ œ๋กœ ์ •์‹ํ™”(Formalization)ํ•˜์—ฌ ๋”ฅ๋Ÿฌ๋‹ ๊ธฐ๋ฐ˜ ์‹ค์‹œ๊ฐ„ ๋ฒกํ„ฐ ๋งคํ•‘ ๋ฐœ์ „ ์ดˆ์„ ์ œ์•ˆ.

๐Ÿ“‘ ๋ชฉ์ฐจ#

  • Chapter 1: ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ ์นด๋ฉ”๋ผ-LiDAR BEV ํŠน์ง• ์œตํ•ฉ
  • Chapter 2: Map Element Detector (DETR ์ฟผ๋ฆฌ & ํ‚คํฌ์ธํŠธ ํšŒ๊ท€)
  • Chapter 3: Autoregressive Polyline Generator (์ž๊ธฐํšŒ๊ท€ ์ •์  ์‹œํ€€์Šค ์ƒ์„ฑ)
  • Chapter 4: ๋‹ค์ค‘ ํƒœ์Šคํฌ ํ•™์Šต ์†์‹ค ํ•จ์ˆ˜ (Bipartite Loss + NLL Loss)
  • Chapter 5: ์ฃผ์š” ์‹คํ—˜ ๋ฐ ๊ฒฐ๊ณผ
  • Chapter 6: ๊ฒฐ๋ก  ๋ฐ ์‹œ์‚ฌ์ 

๐Ÿ› ๏ธ Chapter 1: ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ ์นด๋ฉ”๋ผ-LiDAR BEV ํŠน์ง• ์œตํ•ฉ#

1. ์š”์•ฝ#

์นด๋ฉ”๋ผ IPM ํŠน์ง• $\mathcal{F}_{\text{BEV}}^{\mathcal{I}}$์™€ LiDAR PointPillars ํŠน์ง• $\mathcal{F}_{\text{BEV}}^{\mathcal{P}}$๋ฅผ ์ฑ„๋„ ์ถ•์œผ๋กœ ๊ฒฐํ•ฉํ•œ ํ›„, 2D Conv ๋ ˆ์ด์–ด๋ฅผ ํ†ต๊ณผ์‹œ์ผœ ๊ณต์œ  BEV ํ”ผ์ฒ˜ ๋งต $\mathcal{F}_{\text{BEV}}$๋ฅผ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

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

$$\mathcal{F}_{\text{BEV}} = \text{Conv2D}\left( \Big[ \mathcal{F}_{\text{BEV}}^{\mathcal{I}} \;;\; \mathcal{F}_{\text{BEV}}^{\mathcal{P}} \Big] \right) \in \mathbb{R}^{H \times W \times (C_1 + C_2)}$$
import torch
import torch.nn as nn

class MultiSensorBEVFeatureFusion(nn.Module):
    """
    VectorMapNet: ์นด๋ฉ”๋ผ IPM BEV ํ”ผ์ฒ˜์™€ LiDAR PointPillars ํ”ผ์ฒ˜ ์ฑ„๋„ ๊ฒฐํ•ฉ
    """
    def __init__(self, cam_channels: int = 64, lidar_channels: int = 64, out_channels: int = 256):
        super().__init__()
        self.fusion_conv = nn.Sequential(
            nn.Conv2d(cam_channels + lidar_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, C1, H, W)
        lidar_bev: (B, C2, H, W)
        """
        fused_in = torch.cat([cam_bev, lidar_bev], dim=1)
        fused_bev = self.fusion_conv(fused_in)
        return fused_bev

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
c_b = torch.randn(1, 64, 100, 100)
l_b = torch.randn(1, 64, 100, 100)
fusion = MultiSensorBEVFeatureFusion()
print("์œตํ•ฉ๋œ ๊ณต์œ  BEV Feature Map Shape:", fusion(c_b, l_b).shape)

๐Ÿ› ๏ธ Chapter 2: Map Element Detector (DETR ์ฟผ๋ฆฌ & ํ‚คํฌ์ธํŠธ ํšŒ๊ท€)#

1. ์š”์•ฝ#

Element Query $q_{i,j}^{\text{kp}}$๋ฅผ Deformable DETR ๋””์ฝ”๋”์— ํ†ต๊ณผ์‹œ์ผœ ๊ฐ ๋งต ์š”์†Œ $i$์˜ ํ‚คํฌ์ธํŠธ ์ขŒํ‘œ $\mathcal{A}_i = \{a_{i,j}\}_{j=1}^k$์™€ ํด๋ž˜์Šค ํ™•๋ฅ  $l_i$๋ฅผ ํƒ์ง€ํ•ฉ๋‹ˆ๋‹ค.

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

$$a_{i,j} = \text{MLP}_{kp}(q_{i,j}^{\text{kp}}) \in \mathbb{R}^2, \quad l_i = \text{MLP}_{cls}\left( [q_{i,1}^{\text{kp}}, \ldots, q_{i,k}^{\text{kp}}] \right)$$
import torch
import torch.nn as nn

class MapElementDetectorHead(nn.Module):
    """
    VectorMapNet Element Detector: ํ‚คํฌ์ธํŠธ ์œ„์น˜(A_i) ๋ฐ ํด๋ž˜์Šค(l_i) ํšŒ๊ท€
    """
    def __init__(self, embed_dim: int = 256, num_keypoints: int = 2, num_classes: int = 4):
        super().__init__()
        self.num_keypoints = num_keypoints
        self.kp_head = nn.Linear(embed_dim, 2)
        self.cls_head = nn.Linear(embed_dim * num_keypoints, num_classes)

    def forward(self, query_kp: torch.Tensor) -> tuple:
        """
        query_kp: (B, N_elements, k_keypoints, C)
        """
        B, N_elem, k, C = query_kp.shape
        
        # 1. ํ‚คํฌ์ธํŠธ ์œ„์น˜ (B, N_elem, k, 2)
        kp_coords = torch.sigmoid(self.kp_head(query_kp))
        
        # 2. ์ธ์Šคํ„ด์Šค ํด๋ž˜์Šค ๋ถ„๋ฅ˜
        concat_query = query_kp.view(B, N_elem, k * C)
        cls_logits = self.cls_head(concat_query)
        
        return kp_coords, cls_logits

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
q_kp = torch.randn(1, 50, 2, 256) # 50๊ฐœ ์š”์†Œ, 2๊ฐœ Bounding Box ํ‚คํฌ์ธํŠธ
det_head = MapElementDetectorHead()
kp_res, cls_res = det_head(q_kp)
print("์˜ˆ์ธก ํ‚คํฌ์ธํŠธ ์ขŒํ‘œ Shape:", kp_res.shape, "ํด๋ž˜์Šค Logits Shape:", cls_res.shape)

๐Ÿ› ๏ธ Chapter 3: Autoregressive Polyline Generator#

1. ์š”์•ฝ#

ํ‚คํฌ์ธํŠธ ์ขŒํ‘œ $\mathcal{A}_i$์™€ ํด๋ž˜์Šค $l_i$๋ฅผ ์กฐ๊ฑด์œผ๋กœ, ์ •์  ์ขŒํ‘œ ํ† ํฐ $v_{i,n}^f$๋ฅผ ์ด์‚ฐ ํ™•๋ฅ  ๋ถ„ํฌ $\hat{p}$๋กœ๋ถ€ํ„ฐ ์ž๊ธฐํšŒ๊ท€(Autoregressive) ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

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

$$p(\mathcal{V}_i^{\text{poly}} \mid \mathcal{A}_i, l_i, \mathcal{F}_{\text{BEV}}) = \prod_{n=1}^{2N_v} p(v_{i,n}^f \mid v_{i,
import torch
import torch.nn as nn
import torch.nn.functional as F

class AutoregressivePolylineGenerator(nn.Module):
    """
    VectorMapNet Polyline Generator: ์–‘์žํ™” ํ† ํฐ ์ž๊ธฐํšŒ๊ท€ ๋””์ฝ”๋”
    """
    def __init__(self, vocab_size: int = 1000, embed_dim: int = 256):
        super().__init__()
        self.vocab_size = vocab_size
        self.val_embed = nn.Embedding(vocab_size, embed_dim)
        self.pos_embed = nn.Embedding(100, embed_dim)
        self.decoder_layer = nn.TransformerDecoderLayer(d_model=embed_dim, nhead=8)
        self.out_head = nn.Linear(embed_dim, vocab_size)

    def forward(self, input_tokens: torch.Tensor, cond_feat: torch.Tensor) -> torch.Tensor:
        """
        input_tokens: (B, N_seq) ์ด์ „ ์ขŒํ‘œ ์–‘์žํ™” ํ† ํฐ
        cond_feat: (B, 1, C) Detector์˜ ์กฐ๊ฑด ์ž„๋ฒ ๋”ฉ
        """
        B, N_seq = input_tokens.shape
        pos = torch.arange(N_seq, device=input_tokens.device).unsqueeze(0)
        
        # Coordinate + Position Embedding
        x = self.val_embed(input_tokens) + self.pos_embed(pos)
        x = x.permute(1, 0, 2) # (N_seq, B, C)
        memory = cond_feat.permute(1, 0, 2)
        
        out = self.decoder_layer(x, memory)
        logits = self.out_head(out.permute(1, 0, 2)) # (B, N_seq, vocab_size)
        return logits

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
tokens = torch.randint(0, 1000, (1, 20))
cond_f = torch.randn(1, 1, 256)
poly_gen = AutoregressivePolylineGenerator()
print("์ž๊ธฐํšŒ๊ท€ ์ƒ์„ฑ Logits Shape:", poly_gen(tokens, cond_f).shape)

๐Ÿ› ๏ธ Chapter 4: ๋‹ค์ค‘ ํƒœ์Šคํฌ ํ•™์Šต ์†์‹ค ํ•จ์ˆ˜#

1. ์š”์•ฝ#

Element Detector์˜ Hungarian Bipartite Matching ์†์‹ค $\mathcal{L}_{det}$์™€ Polyline Generator์˜ Negative Log-Likelihood ์†์‹ค $\mathcal{L}_{gen}$์„ ๊ฐ€์ค‘ ํ•ฉ์‚ฐํ•ฉ๋‹ˆ๋‹ค.

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

$$\mathcal{L}_{gen} = -\frac{1}{2N_v} \sum_{n=1}^{2N_v} \log \hat{p}(v_{i,n}^f \mid v_{i,
import torch
import torch.nn.functional as F

def compute_vectormapnet_loss(
    pred_token_logits: torch.Tensor, # (B, N_seq, Vocab_size)
    gt_tokens: torch.Tensor,         # (B, N_seq)
    loss_det: torch.Tensor
) -> torch.Tensor:
    """
    VectorMapNet ์ด ์†์‹ค = Detector Hungarian Loss + Generator Autoregressive NLL Loss
    """
    B, N_seq, V = pred_token_logits.shape
    loss_gen = F.cross_entropy(pred_token_logits.view(-1, V), gt_tokens.view(-1), reduction='mean')
    
    total_loss = loss_det + loss_gen
    return total_loss

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
p_logits = torch.randn(2, 20, 1000)
g_toks = torch.randint(0, 1000, (2, 20))
l_d = torch.tensor(1.5)
print("VectorMapNet ์ด ํ•™์Šต ์†์‹ค:", compute_vectormapnet_loss(p_logits, g_toks, l_d).item())

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

1. nuScenes ์˜จ๋ผ์ธ HD ๋งต ๋ฒค์น˜๋งˆํฌ (Chamfer & Frรฉchet mAP)#

์•Œ๊ณ ๋ฆฌ์ฆ˜ (Method)์ž…๋ ฅ ๋ชจ๋‹ฌ๋ฆฌํ‹ฐPedestrian CrosswalkDividerBoundary์ „์ฒด mAP โ†‘
STSUCamera7.011.616.511.7
HDMapNetCamera + LiDAR16.329.646.731.0
VectorMapNet (Ours)Camera + LiDAR37.650.547.545.2
VectorMapNet + Fine-TuneCamera + LiDAR48.2 (+31.9%)60.1 (+30.5%)53.0 (+6.3%)53.7 (+22.7%)

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

1. ๊ฒฐ๋ก #

VectorMapNet์€ ๋งต ๊ตฌ์ถ• ๋ฌธ์ œ๋ฅผ ํฌ์†Œ ํด๋ฆฌ๋ผ์ธ ์ง‘ํ•ฉ ํƒ์ง€ ๋ฐ ์ž๊ธฐํšŒ๊ท€ ์ƒ์„ฑ์œผ๋กœ ์žฌ์ •์˜ํ•œ ์ตœ์ดˆ์˜ End-to-End ๋ฒกํ„ฐํ™” HD ๋งต ํ•™์ˆ  ์„ ๊ตฌ์ž์ž…๋‹ˆ๋‹ค.

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


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

๊ด€๋ จ ๋…ผ๋ฌธ: DETR, MapTR, StreamMapNet, nuScenes