SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2107.06307 · 2021

HDMapNet: An Online HD Map Construction and Evaluation Framework

arXiv · PDF · Open in the Atlas

Code that ran

9 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 1 failure of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2107.06307.json · badge: /api/ran/2107.06307.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Tsinghua-MARS-Lab/HDMapNet canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
HFAiLab/hdmapnet community (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
bilinear_sampler Ran
ran on a synthesized input
HFAiLab/hdmapnet/model/base_models/ipm.py
code served (permissive licence) · get_code("149a4ed27e9a056c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 4, dtype family float, shape (2, 2, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# imgs: [B, H, W, C] - a batch of images
B = 2
img_h = 4
img_w = 3
img_c = 5
imgs = torch.randn(B, img_h, img_w, img_c)

# pix_coords: [B, h, w, 2] - pixel coordinates for sampling
pix_h = 2
pix_w = 3
# Coordinates should be within valid range [0, img_w-1] and [0, img_h-1]
pix_coords = torch.rand(B, pix_h, pix_w, 2) * torch.tensor([img_w - 1, img_h - 1])

ARGS = {
    "imgs": imgs,
    "pix_coords": pix_coords,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 2, 3, 5) — shape (2, 2, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
eval_iou Ran
ran on a synthesized input
HFAiLab/hdmapnet/evaluation/iou.py
code served (permissive licence) · get_code("73b744e12eccbc86")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family float, shape (4,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that returns (semantic, embedding, direction)
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 5)
    
    def forward(self, data_dict):
        # Return three outputs as expected by eval_iou
        batch_size = 2
        semantic = torch.randn(batch_size, 4)  # logits for onehot_encoding
        embedding = torch.randn(batch_size, 3)
        direction = torch.randn(batch_size, 2)
        return semantic, embedding, direction

# Build minimal val_loader as list of data dicts
val_loader = [
    {
        'semantic_gt': torch.randint(0, 2, (2, 4)).float(),
        'dummy_input': torch.randn(2, 10)
    },
    {
        'semantic_gt': torch.randint(0, 2, (2, 4)).float(),
        'dummy_input': torch.randn(2, 10)
    }
]

# Minimal visualizer stand-in (not called in this test, but parameterized as optional)
class MinimalVisualizer:
    def visualize_batch(self, data_dict, pred_dict):
        pass

visualizer_instance = MinimalVisualizer()

# Construct ARGS dict
ARGS = {
    'model': MinimalModel(),
    'val_loader': val_loader,
    'visualizer': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expand_as_one_hot Ran
ran on a synthesized input
HFAiLab/hdmapnet/model/losses/contrastive_loss.py
code served (permissive licence) · get_code("b0906b2270b4920f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 5, dtype family float, shape (2, 3, 4, 3, 5) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a 4D input tensor NxDxHxW
# N=2 (batch), D=4 (depth), H=3 (height), W=5 (width)
# Labels should be in range [0, C)
input_tensor = torch.randint(0, 3, (2, 4, 3, 5), dtype=torch.long)

# Number of channels/labels
C = 3

# Ignore index (optional, can be None or an integer)
ignore_index = None

ARGS = {
    "input": input_tensor,
    "C": C,
    "ignore_index": ignore_index,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 5, dtype family float, shape (2, 3, 4, 3, 5) — shape (2, 3, 4, 3, 5) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_line_instances_from_mask Ran
ran on a synthesized input
HFAiLab/hdmapnet/evaluation/AP.py
code served (permissive licence) · get_code("49ae2a43e69a170b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small mask tensor with shape (4, 3)
# Values: 0 (background), 1, 2 (instance labels)
mask = torch.tensor([
    [0, 1, 2],
    [1, 1, 2],
    [0, 1, 0],
    [2, 2, 1]
], dtype=torch.int64)

scale_x = 0.5
scale_y = 0.25

ARGS = {
    "mask": mask,
    "scale_x": scale_x,
    "scale_y": scale_y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
label_onehot_encoding Ran
ran on a synthesized input
HFAiLab/hdmapnet/evaluation/iou.py
code served (permissive licence) · get_code("34573cb4430fef21")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (4, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small label tensor with shape (H, W)
# The label tensor contains class indices (0 to num_classes-1)
H, W = 4, 3
label = torch.randint(0, 4, (H, W))

# Create arguments dict
ARGS = {
    "label": label,
    "num_classes": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (4, 4, 3) — shape (4, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
line_matching_by_CD Ran
ran on a synthesized input
HFAiLab/hdmapnet/evaluation/AP.py
code served (permissive licence) · get_code("bd830bd36f4ecea7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Mock the chamfer_distance function since it's not defined in the provided code
def chamfer_distance(pred, label, bidirectional=False, threshold=None):
    """Mock chamfer distance function that returns a small random value"""
    return torch.tensor(0.1 * torch.rand(1).item())

# Patch it into the module namespace so line_matching_by_CD can call it
import sys
current_module = sys.modules[__name__]
current_module.chamfer_distance = chamfer_distance

# Create small test tensors for line data (batch_size=2, dims=4)
pred_line_1 = torch.randn(2, 4)
pred_line_2 = torch.randn(2, 4)

label_line_1 = torch.randn(2, 4)
label_line_2 = torch.randn(2, 4)

# Create dictionaries mapping keys to line tensors
inst_pred_lines = {
    'pred_0': pred_line_1,
    'pred_1': pred_line_2,
}

inst_pred_confidence = {
    'pred_0': 0.95,
    'pred_1': 0.87,
}

inst_label_lines = {
    'label_0': label_line_1,
    'label_1': label_line_2,
}

threshold = 0.5

ARGS = {
    'inst_pred_lines': inst_pred_lines,
    'inst_pred_confidence': inst_pred_confidence,
    'inst_label_lines': inst_label_lines,
    'threshold': threshold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
onehot_encoding Ran
ran; our contract draft was wrong, not the code
Tsinghua-MARS-Lab/HDMapNet/evaluate.py
pointer only (licence: GPL-3.0) · get_code("7ab535c06ef669db")
How it ran

The body of this sample is withheld: GPL-3.0, as GitHub detects it on this paper's repository, Tsinghua-MARS-Lab/HDMapNet, is not in the permissive set Syntology serves inline. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

rotation_from_euler Ran
ran on a synthesized input
HFAiLab/hdmapnet/model/base_models/ipm.py
code served (permissive licence) · get_code("b4b90f5dac4d6650")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects:
# - rolls, pitchs, yaws: tensor-like objects that can be passed to torch.sin/torch.cos
# - cuda: boolean flag
# 
# The function calls len() on rolls to get batch size B
# It applies torch.sin and torch.cos to the angle tensors
# These should be in radians (the docstring says degrees but the code uses them as radians)

# Create small batch of angles in radians
batch_size = 2
rolls = torch.randn(batch_size)
pitchs = torch.randn(batch_size)
yaws = torch.randn(batch_size)

ARGS = {
    "rolls": rolls,
    "pitchs": pitchs,
    "yaws": yaws,
    "cuda": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 4) — shape (2, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
semantic_mask_chamfer_dist_cum Ran
ran on a synthesized input
HFAiLab/hdmapnet/evaluation/chamfer_distance.py
code served (permissive licence) · get_code("49b1b7956f5e59b1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensors for seg_pred and seg_label
# Shape: (N, C, H, W) = (2, 3, 4, 5)
# N=2 (batch), C=3 (channels/classes), H=4, W=5 (spatial dims)
N, C, H, W = 2, 3, 4, 5

seg_pred = torch.randint(0, 2, (N, C, H, W)).float()
seg_label = torch.randint(0, 2, (N, C, H, W)).float()

# Ensure at least some non-zero values exist for testing
seg_pred[0, 0, 1:3, 1:3] = 1.0
seg_label[0, 0, 1:2, 1:2] = 1.0

# Scale factors for converting pixel coordinates to actual coordinates
scale_x = 0.5
scale_y = 0.25

# Threshold for distance clamping
threshold = 10.0

ARGS = {
    "seg_pred": seg_pred,
    "seg_label": seg_label,
    "scale_x": scale_x,
    "scale_y": scale_y,
    "threshold": threshold,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
chamfer_distance Not yet run
unverified (harvested, no recorded run)
HFAiLab/hdmapnet/evaluation/chamfer_distance.py
code served (permissive licence) · get_code("bd2738dcfbe8cea9")
How it ran

no invocation recorded.

perspective Not yet run
unverified (harvested, no recorded run)
HFAiLab/hdmapnet/model/base_models/ipm.py
code served (permissive licence) · get_code("f5dde8b46d767cf0")
How it ran

no invocation recorded.

single_instance_line_AP Not yet run
unverified (harvested, no recorded run)
HFAiLab/hdmapnet/evaluation/AP.py
code served (permissive licence) · get_code("723bdf769b19acc1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 6 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
chamfer_distance 1 other paper
1 later
2304.11379 (2023-04)
LiDAR2Map: In Defense of LiDAR-Based Semantic Map Construction Using Online Camera Distillation
get_line_instances_from_mask 1 other paper
1 later
2304.11379 (2023-04)
LiDAR2Map: In Defense of LiDAR-Based Semantic Map Construction Using Online Camera Distillation
line_matching_by_CD 1 other paper
1 later
2304.11379 (2023-04)
LiDAR2Map: In Defense of LiDAR-Based Semantic Map Construction Using Online Camera Distillation
onehot_encoding 1 other paper
1 later
2211.15656 (2022-11)
SuperFusion: Multilevel LiDAR-Camera Fusion for Long-Range HD Map Generation
semantic_mask_chamfer_dist_cum 1 other paper
1 later
2304.11379 (2023-04)
LiDAR2Map: In Defense of LiDAR-Based Semantic Map Construction Using Online Camera Distillation
single_instance_line_AP 1 other paper
1 later
2304.11379 (2023-04)
LiDAR2Map: In Defense of LiDAR-Based Semantic Map Construction Using Online Camera Distillation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Constructing HD semantic maps is a central component of autonomous driving. However, traditional pipelines require a vast amount of human efforts and resources in annotating and maintaining the semantics in the map, which limits its scalability. In this paper, we introduce the problem of HD semantic map learning, which dynamically constructs the local semantics based on onboard sensor observations. Meanwhile, we introduce a semantic map learning method, dubbed HDMapNet. HDMapNet encodes image features from surrounding cameras and/or point clouds from LiDAR, and predicts vectorized map elements in the bird's-eye view. We benchmark HDMapNet on nuScenes dataset and show that in all settings, it performs better than baseline methods. Of note, our camera-LiDAR fusion-based HDMapNet outperforms existing methods by more than 50% in all metrics. In addition, we develop semantic-level and instance-level metrics to evaluate the map learning performance. Finally, we showcase our method is capable of predicting a locally consistent map. By introducing the method and metrics, we invite the community to study this novel map learning problem.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2107.06307")
get_code_for_paper("2107.06307")
have("2107.06307")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2107.06307.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2107.06307.svg)](https://syntology.ai/paper/2107.06307)

Connect an agent — have() is free.