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

๋งต ์š”์†Œ(์ฐจ์„ , ํšก๋‹จ๋ณด๋„, ๋„๋กœ ๊ฒฝ๊ณ„)๋ฅผ ๊ธฐํ•˜ํ•™์  ๋“ฑ๊ฐ€ ์ˆœ์—ด ์ง‘ํ•ฉ(Permutation-Equivalent Point Set)์œผ๋กœ ์ฒด๊ณ„ํ™”ํ•˜๊ณ , ์ธ์Šคํ„ด์Šค-ํฌ์ธํŠธ ๊ณ„์ธต์  ์ฟผ๋ฆฌ(Hierarchical Query) ๊ธฐ๋ฐ˜์˜ ๋ณ‘๋ ฌ DETR ๋””์ฝ”๋”๋กœ ์˜ˆ์ธกํ•˜์—ฌ ์‹ค์‹œ๊ฐ„(25.1 FPS)์œผ๋กœ ๋ฒกํ„ฐํ™” HD ๋งต์„ ์ƒ์„ฑํ•œ๋‹ค.


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

  • ์ €์ž: Bencheng Liao, Shaoyu Chen, Xinggang Wang, Tianheng Cheng, Qian Zhang, Wenyu Liu, Chang Huang (HUST, Horizon Robotics)
  • ๋ฐœํ–‰๋…„๋„: 2022 (arXiv:2208.14437, ICLR 2023)
  • ์ฃผ์š” ๊ธฐ์—ฌ์ :
    1. Permutation-Equivalent Modeling: ์ฐจ์„ (Polyline) ๋ฐ ํšก๋‹จ๋ณด๋„(Polygon)์˜ ์ˆœ์„œ ๋ชจํ˜ธ์„ฑ(Ambiguity)์„ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด ์  ์ง‘ํ•ฉ $V$์™€ ๋“ฑ๊ฐ€ ์ˆœ์—ด ๊ทธ๋ฃน $\Gamma$๋ฅผ ๋„์ž….
    2. ๊ณ„์ธต์  2๋‹จ๊ณ„ ์ด๋ถ„ ๋งค์นญ (Hierarchical Bipartite Matching): ์ธ์Šคํ„ด์Šค ๋งค์นญ ํ›„ ๋“ฑ๊ฐ€ ์ˆœ์—ด ๊ทธ๋ฃน $\Gamma$ ๋‚ด์—์„œ ๋งจํ•ดํŠผ ๊ฑฐ๋ฆฌ๊ฐ€ ๊ฐ€์žฅ ์ตœ์†Œ์ธ ์ตœ์  ์  ์ˆœ์„œ $\hat{\gamma}$๋ฅผ ๋™์  ์„ ํƒ.
    3. Point2Point ๋ฐ Cosine Edge Direction Loss: ์  ์œ„์น˜ ์ •๋ฐ€๋„๋ฟ ์•„๋‹ˆ๋ผ ์—ฐ๊ฒฐ์„ (Edge)์˜ ๋ฐฉํ–ฅ ์ฝ”์‚ฌ์ธ ์œ ์‚ฌ๋„๊นŒ์ง€ ๊ฐ•์ œ ์ตœ์ ํ™”.
    4. ์ดˆ๊ณ ์† ์‹ค์‹œ๊ฐ„ ๋ฒกํ„ฐํ™” ๋งคํ•‘: ๋ณ‘๋ ฌ ๋””์ฝ”๋”ฉ ์•„ํ‚คํ…์ฒ˜๋กœ VectorMapNet ๋Œ€๋น„ 8๋ฐฐ ๊ฐ€์†๋œ 25.1 FPS์™€ nuScenes 50.3 mAP ๋‹ฌ์„ฑ.

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

  1. Rasterized BEV Map (HDMapNet): BEV ์„ธ๊ทธ๋ฉ˜ํ…Œ์ด์…˜ ๋ž˜์Šคํ„ฐ ์ด๋ฏธ์ง€ ์ถœ๋ ฅ ํ›„ ํ›„์ฒ˜๋ฆฌ๋กœ ์ธ์Šคํ„ด์Šค๋ฅผ ์ถ”์ถœํ•˜๋‚˜ 200ms ์ด์ƒ์˜ ์ง€์—ฐ ๋ฐœ์ƒ.
  2. Autoregressive Vectorized Map (VectorMapNet): ์ตœ์ดˆ์˜ End-to-End ๋ฒกํ„ฐํ™” ๋ฐฉ๋ฒ•์ด๋‚˜ ํ”ฝ์…€/์  ํ•˜๋‚˜์”ฉ ์ˆœ์ฐจ ์˜ˆ์ธกํ•˜์—ฌ ์ถ”๋ก  ์‹œ๊ฐ„์ด ๋งค์šฐ ๋А๋ฆผ.
  3. MapTR: ๋“ฑ๊ฐ€ ์ˆœ์—ด ์ง‘ํ•ฉ ํ‘œํ˜„๊ณผ ๋ณ‘๋ ฌ Transformer ๊ธฐ๋ฒ•์„ ์ตœ์ดˆ ๋„์ž…ํ•˜์—ฌ 25 FPS ์‹ค์‹œ๊ฐ„ ๋งต ๊ตฌ์ถ• ๊ฐ€๋Šฅ.

๐Ÿ“‘ ๋ชฉ์ฐจ#

  • Chapter 1: ๋“ฑ๊ฐ€ ์ˆœ์—ด ๋ชจ๋ธ๋ง (Permutation-Equivalent Modeling)
  • Chapter 2: ๊ณ„์ธต์  ์ฟผ๋ฆฌ (Hierarchical Query) ์•„ํ‚คํ…์ฒ˜
  • Chapter 3: 2๋‹จ๊ณ„ ๊ณ„์ธต์  ๋งค์นญ ์•Œ๊ณ ๋ฆฌ์ฆ˜
  • Chapter 4: Point2Point & Cosine Edge Direction Loss ์†์‹ค ํ•จ์ˆ˜
  • Chapter 5: ์ฃผ์š” ์‹คํ—˜ ๋ฐ ๊ฒฐ๊ณผ
  • Chapter 6: ๊ฒฐ๋ก  ๋ฐ ์‹œ์‚ฌ์ 

๐Ÿ› ๏ธ Chapter 1: ๋“ฑ๊ฐ€ ์ˆœ์—ด ๋ชจ๋ธ๋ง (Permutation-Equivalent Modeling)#

1. ์š”์•ฝ#

๋งต ์š”์†Œ $V = \{v_j\}_{j=0}^{N_v - 1}$์— ๋Œ€ํ•ด, ๊ฐœ๋ฐฉํ˜• ์ฐจ์„ (Polyline)์€ 2๊ฐ€์ง€ ์ˆœ์„œ $\Gamma_{\text{polyline}}$, ํ์‡„ํ˜• ํšก๋‹จ๋ณด๋„(Polygon)๋Š” $2 N_v$๊ฐ€์ง€ ์ˆœ์„œ $\Gamma_{\text{polygon}}$์„ ๋™๋“ฑํ•œ ์ •๋‹ต์œผ๋กœ ์ •์˜ํ•ฉ๋‹ˆ๋‹ค.

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

$$\Gamma_{\text{polyline}} = \{\gamma^0, \gamma^1\}, \quad \gamma^0(j) = j, \quad \gamma^1(j) = N_v - 1 - j$$$$\Gamma_{\text{polygon}} = \{\gamma^k\}_{k=0}^{2 N_v - 1}, \quad \gamma^{2m}(j) = (j + m) \bmod N_v, \quad \gamma^{2m+1}(j) = (N_v - 1 - j + m) \bmod N_v$$
import torch

def generate_permutation_equivalent_sets(
    gt_points: torch.Tensor, # (Nv, 2) ๋งต ์š”์†Œ ์  ์ขŒํ‘œ
    is_polygon: bool = False
) -> torch.Tensor:
    """
    MapTR: GT ์  ์ง‘ํ•ฉ์— ๋Œ€ํ•œ ๋“ฑ๊ฐ€ ์ˆœ์—ด ๊ทธ๋ฃน Gamma ์ƒ์„ฑ
    """
    Nv, _ = gt_points.shape
    equivalent_sets = []
    
    if not is_polygon:
        # Polyline: ์ •๋ฐฉํ–ฅ(0 -> Nv-1) ๋ฐ ์—ญ๋ฐฉํ–ฅ(Nv-1 -> 0)
        equivalent_sets.append(gt_points)
        equivalent_sets.append(torch.flip(gt_points, dims=[0]))
    else:
        # Polygon: 2 * Nv ๊ฐ€์ง€ ์‹œ์ž‘์  ๋ฐ ์ •/์—ญ๋ฐฉํ–ฅ ์ˆœํšŒ
        for m in range(Nv):
            rolled = torch.roll(gt_points, shifts=-m, dims=0)
            equivalent_sets.append(rolled)
            equivalent_sets.append(torch.flip(rolled, dims=[0]))
            
    return torch.stack(equivalent_sets, dim=0) # (|Gamma|, Nv, 2)

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
pts_poly = torch.tensor([[0.0, 0.0], [1.0, 0.0], [1.0, 1.0], [0.0, 1.0]])
gamma_sets = generate_permutation_equivalent_sets(pts_poly, is_polygon=True)
print("Polygon ๋“ฑ๊ฐ€ ์ˆœ์—ด ์ˆ˜ (|Gamma|):", gamma_sets.shape[0])

๐Ÿ› ๏ธ Chapter 2: ๊ณ„์ธต์  ์ฟผ๋ฆฌ (Hierarchical Query) ์•„ํ‚คํ…์ฒ˜#

1. ์š”์•ฝ#

์ธ์Šคํ„ด์Šค ์ฟผ๋ฆฌ $q_i^{\text{ins}}$์™€ ํฌ์ธํŠธ ์ฟผ๋ฆฌ $q_j^{\text{pt}}$๋ฅผ ํ•ฉ์‚ฐํ•˜์—ฌ ๋งต ์š”์†Œ $i$์˜ $j$๋ฒˆ์งธ ์  ์ขŒํ‘œ๋ฅผ ์˜ˆ์ธกํ•˜๋Š” $q_{ij}^{\text{hie}}$๋ฅผ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

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

$$q_{ij}^{\text{hie}} = q_i^{\text{ins}} + q_j^{\text{pt}} \in \mathbb{R}^C \quad (i = 1 \dots N_{\text{ins}}, \ j = 1 \dots N_v)$$
import torch
import torch.nn as nn

class MapTRHierarchicalQuery(nn.Module):
    """
    MapTR ๊ณ„์ธต์  ์ฟผ๋ฆฌ ์ž„๋ฒ ๋”ฉ ๋ชจ๋“ˆ (Instance Query + Point Query)
    """
    def __init__(self, num_instances: int = 50, num_points: int = 20, embed_dim: int = 256):
        super().__init__()
        self.instance_embed = nn.Embedding(num_instances, embed_dim)
        self.point_embed = nn.Embedding(num_points, embed_dim)

    def forward(self) -> torch.Tensor:
        # q_ins: (N_ins, 1, C) / q_pt: (1, N_pt, C)
        q_ins = self.instance_embed.weight.unsqueeze(1)
        q_pt = self.point_embed.weight.unsqueeze(0)
        
        # Broadcasting Sum: (N_ins, N_pt, C)
        q_hie = q_ins + q_pt
        return q_hie

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
h_query = MapTRHierarchicalQuery()
print("์ƒ์„ฑ๋œ ๊ณ„์ธต์  ์ฟผ๋ฆฌ Tensor Shape:", h_query().shape)

๐Ÿ› ๏ธ Chapter 3: Point2Point & Cosine Edge Direction Loss#

1. ์š”์•ฝ#

์˜ˆ์ธก๋œ ์ ๊ณผ ์ตœ์  ์ˆœ์—ด ์  ๊ฐ„์˜ ๋งจํ•ดํŠผ ๊ฑฐ๋ฆฌ ์˜ค์ฐจ $\mathcal{L}_{\text{p2p}}$์™€ ์ธ์ ‘ํ•œ ์—ฐ๊ฒฐ์„ (Edge) ๋ฒกํ„ฐ ๊ฐ„์˜ ์ฝ”์‚ฌ์ธ ์œ ์‚ฌ๋„ ์˜ค์ฐจ $\mathcal{L}_{\text{dir}}$๋ฅผ ํ•จ๊ป˜ ์ตœ์†Œํ™”ํ•ฉ๋‹ˆ๋‹ค.

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

$$\mathcal{L}_{\text{p2p}} = \sum_{j=0}^{N_v - 1} \left\| \hat{v}_j - v_{\hat{\gamma}(j)} \right\|_1$$$$\mathcal{L}_{\text{dir}} = -\sum_{j=0}^{N_v - 1} \frac{\hat{e}_j \cdot e_{\hat{\gamma}(j)}}{\left\|\hat{e}_j\right\|_2 \left\|e_{\hat{\gamma}(j)}\right\|_2}, \quad \hat{e}_j = \hat{v}_{(j+1)\bmod N_v} - \hat{v}_j$$
import torch
import torch.nn.functional as F

def compute_maptr_point_and_edge_loss(
    pred_pts: torch.Tensor, # (Nv, 2) ์˜ˆ์ธก ์  ์ขŒํ‘œ
    gt_pts: torch.Tensor,   # (Nv, 2) ์ตœ์  ์ •๋ ฌ๋œ GT ์  ์ขŒํ‘œ
    is_polygon: bool = False
) -> torch.Tensor:
    """
    MapTR: Point-to-Point L1 Loss + Cosine Edge Direction Loss
    """
    # 1. Point2Point L1 Loss
    loss_p2p = F.l1_loss(pred_pts, gt_pts, reduction='sum')
    
    # 2. Edge Direction Vector ์ƒ์„ฑ (j+1 - j)
    if is_polygon:
        pred_edges = torch.roll(pred_pts, shifts=-1, dims=0) - pred_pts
        gt_edges = torch.roll(gt_pts, shifts=-1, dims=0) - gt_pts
    else:
        pred_edges = pred_pts[1:] - pred_pts[:-1]
        gt_edges = gt_pts[1:] - gt_pts[:-1]
        
    # 3. Cosine Similarity ๊ณ„์‚ฐ
    cos_sim = F.cosine_similarity(pred_edges, gt_edges, dim=-1)
    loss_dir = (1.0 - cos_sim).sum()
    
    return loss_p2p + 0.005 * loss_dir

# --- ์‚ฌ์šฉ ์˜ˆ์‹œ ---
p_res = torch.randn(20, 2)
g_res = torch.randn(20, 2)
print("MapTR ์ด ๋งต ์†์‹ค (P2P + Edge Dir):", compute_maptr_point_and_edge_loss(p_res, g_res).item())

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

1. nuScenes ์˜จ๋ผ์ธ HD ๋งต ๊ตฌ์ถ• ๋ฒค์น˜๋งˆํฌ ๋น„๊ต#

์•Œ๊ณ ๋ฆฌ์ฆ˜ (Method)์ž…๋ ฅ ๋ชจ๋‹ฌ๋ฆฌํ‹ฐ๋ฐฑ๋ณธ (Backbone)mAP โ†‘์ถ”๋ก  ์†๋„ (FPS) โ†‘
VectorMapNetCameraResNet5040.92.9 FPS (๋А๋ฆผ)
MapTR-nanoCameraResNet1845.925.1 FPS (์‹ค์‹œ๊ฐ„)
MapTR-tinyCameraResNet5050.311.2 FPS
MapTR-tiny (110ep)CameraResNet5058.7 (+17.8%)11.2 FPS (LiDAR ์ดˆ๊ณผ)
  • ๊ฒฐ๊ณผ: ๋“ฑ๊ฐ€ ์ˆœ์—ด ๋ชจ๋ธ๋ง๊ณผ ๋ณ‘๋ ฌ ๋””์ฝ”๋”ฉ ๊ธฐ๋ฒ•์„ ํ†ตํ•ด 25.1 FPS ์‹ค์‹œ๊ฐ„ ๋งต ๊ตฌ์ถ•๊ณผ ์นด๋ฉ”๋ผ ์ „์šฉ SOTA(58.7 mAP) ๋‹ฌ์„ฑ.

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

1. ๊ฒฐ๋ก #

MapTR์€ ์ˆœ์—ด-๋“ฑ๊ฐ€ ๋ชจ๋ธ๋ง์„ ํ†ตํ•ด ๋ฒกํ„ฐํ™” ์ง€๋„ ํ•™์Šต์˜ ํ‘œํ˜„ ๋ชจํ˜ธ์„ฑ์„ ์ฒ ํํ•˜๊ณ , ์‹ค์‹œ๊ฐ„(25 FPS)์œผ๋กœ ๊ณ ํ’ˆ์งˆ HD ๋งต์„ ์˜จ๋ผ์ธ ์ƒ์„ฑํ•˜๋Š” ํŒจ๋Ÿฌ๋‹ค์ž„์„ ํ™•๋ฆฝํ–ˆ์Šต๋‹ˆ๋‹ค.

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

  • permutation-equivalent ๋ชจ๋ธ๋ง์€ ๋งต ์š”์†Œ์˜ ์  ๊ฐœ์ˆ˜ $N_v$๊ฐ€ ๊ณ ์ •๋˜์–ด์•ผ ํ•˜๋Š” ์ œ์•ฝ์ด ์žˆ์–ด, ๋งค์šฐ ๋ณต์žกํ•˜๊ฑฐ๋‚˜ ๋ถˆ๊ทœ์น™ํ•œ ํ˜•์ƒ์€ ํ‘œํ˜„๋ ฅ์ด ์ œํ•œ๋  ์ˆ˜ ์žˆ๋‹ค.
  • ์‹คํ—˜์ด nuScenes ๋„์‹ฌ ํ™˜๊ฒฝ์— ์ง‘์ค‘๋˜์–ด ์žˆ์–ด, ๊ณ ์†๋„๋กœ๋‚˜ ๋ณต์žกํ•œ ๊ต์ฐจ๋กœ ๋“ฑ ๋‹ค์–‘ํ•œ ๋„๋กœ ํ† ํด๋กœ์ง€์—์„œ์˜ ์ผ๋ฐ˜ํ™” ์„ฑ๋Šฅ์€ ์ถ”๊ฐ€ ๊ฒ€์ฆ์ด ํ•„์š”ํ•˜๋‹ค.

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

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