Skip to content

per-vertex annotation data — OpenLane's visible/occluded, which PolylineGeometry cannot carry #352

Description

@JArmandoAnaya

The decision

OpenLane 2D marks each vertex of a lane as visible or occluded. PolylineGeometry.points is
list[tuple[float, float]] — coordinates and nothing else — so VisionSet has nowhere to carry
that information.

The lanes-format port (#223) ships the conservative default: the visibility array is written
all-visible, and the loss is documented rather than hidden. Whether to extend the annotation
model with per-vertex data is a domain decision, and that port deliberately did not take it.

Where the current behaviour is written down

At HEAD 47dc1f0:

  • src/visionset/formats/lanes/__init__.py — the module docstring, in the paragraph beginning
    "The loss worth naming out loud is OpenLane's per-point visibility."
  • src/visionset/formats/lanes/__init__.py:367"visibility": [1] * len(lane.points), the
    line that actually writes it
  • src/visionset/formats/lanes/README.md:33 — the package's own statement of what is not carried
  • tests/formats/test_lanes.py:617
    test_openlane_writes_every_point_visible_because_the_domain_has_no_other_answer, which pins
    the default so that changing it has to be deliberate

Why this was not a stop-and-flag during the port

The brief for #223 set its halt condition at per-annotation data that no exporter could do
without. Per-vertex visibility is neither: it is per-vertex, and no exporter requires it —
v1's own _get_point_visibility defaults to "visible", so OpenLane ran and emitted an
all-visible array there too. Nothing was blocked, so the model was left alone and the decision
left open.

What extending the model would cost

Not a small change, which is the argument for deciding it rather than drifting into it:

  • a domain change — PolylineGeometry.points is currently a flat coordinate list, so
    per-vertex attributes mean either a parallel array or a richer point type. A parallel array can
    disagree in length with the points it describes, so it needs a validator; a richer point type
    changes the shape every existing caller reads;
  • a wire change behind it, reaching openapi.json, the generated TypeScript client,
    tests/fixtures/wire_annotations.json, and the annotator's hand-written mirror in
    frontend/annotator/src/core/wire.ts;
  • no migration — geometry rides in the annotation's JSON column — but every stored polyline
    predates the field, so reading has to tolerate its absence for good;
  • a question the domain has so far refused to answer: what per-vertex data means in general.
    "Visible / occluded" is one format's vocabulary. A generic per-vertex attribute map is the
    honest generalisation, and it is a much larger change than the one format that wants it.

Likely pairing

This probably pairs with the 0.2 polyline drawing tool (#342). If per-vertex visibility exists, a
person has to be able to see and set it — which is a rendering decision, an occluded run drawn
differently, and an interaction decision, how a vertex is toggled, on top of the domain change.
The two are probably one workstream, and doing the domain half first with no way to author the
data would ship a field only an SDK caller can reach.

What a decision looks like

One of:

  1. Leave it. All-visible stays, the declaration stays truthful, and OpenLane consumers get a
    usable file. This issue then ends.
  2. A generic per-vertex attribute map, decided together with the polyline drawing tool — lanes are writable and reviewable, not yet drawable #342 so the tool can author it.
  3. A visibility array specific to PolylineGeometry — the cheapest and least general
    option, and the one that invites the next format-specific field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    formatsvisionset.formats — importers/exporterskernelvisionset.kernel — domain, ports, adapters, services

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions