Skip to main content

highwayscene-proto

highwayscene-proto is the reference Python reader and Protobuf schema for HighwayScene, a multi-sensor static roadside LiDAR dataset. It provides generated message classes, memory-efficient record iteration, random frame access, and typed NumPy views of point-cloud channels.

HighwayScene accompanies the paper “Beam-Wise Statistical Background Subtraction for Static Roadside LiDAR: A Cross-Sensor Benchmark Study.” See the project page for the paper, code, dataset, and benchmark resources.

Installation

Install the reader from PyPI:

python -m pip install highwayscene-proto

For development from a checkout:

python -m pip install -e '.[dev]'

Python 3.10 or newer is required.

Quick start

Stream frames from a record without loading the complete file:

from highwayscene import LaserName, decode_pointcloud, iter_frames

for frame in iter_frames("HighwayScene/test/record.pb"):
    print(frame.frame_id, frame.frame_timestamp_ns)
    for scan in frame.lidars:
        sensor = LaserName(scan.laser_name).name
        points = decode_pointcloud(scan.pointcloud)
        print(sensor, points.xyz.shape, points.channel_id)

Use RecordFile when you need indexed access:

from highwayscene import RecordFile, decode_pointcloud

record = RecordFile("HighwayScene/test/record.pb")
frame = record[12]
xyz = decode_pointcloud(frame.lidars[0].pointcloud).xyz

The existing generated-module imports remain available:

from highwayscene.frame import Frame
from highwayscene.sensors import LaserName, LidarScan

Imports through the former a42 package name remain available as compatibility aliases. New code should use the highwayscene namespace.

Inspect a file or a complete split from the command line:

highwayscene-inspect HighwayScene/test --limit 3
highwayscene-inspect HighwayScene/test/record.pb --json

Dataset download and layout

Download HighwayScene with Git LFS or huggingface_hub:

python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='iis-esslingen/HighwayScene', repo_type='dataset', local_dir='HighwayScene')"

The point-cloud records are organized by benchmark split:

HighwayScene/
├── train/*.pb
├── val/*.pb
├── test/*.pb
└── label/...

The labels under label/ belong to the background-subtraction benchmark and are consumed by the roadside-lidar-background-subtraction repository. They are separate from the optional object_list field in the Protobuf schema.

Record format

Each .pb file is a sequence of messages. Every message consists of a four-byte unsigned little-endian payload length followed by one serialized highwayscene.frame.Frame message:

[uint32 payload bytes][serialized Frame][uint32 payload bytes][serialized Frame]...

The schema is available under proto/highwayscene. Cartesian coordinates are interleaved little-endian float32 values. Populated auxiliary channels contain one value per Cartesian point:

Field NumPy dtype Availability
cartesian <f4, shaped (N, 3) all sensors
intensity <u2 sensor-dependent
ambient <u2 sensor-dependent
velocity <f4 Aeva Aeries II
reflectivity <u2 sensor-dependent
timestamp_offset <u8 sensor-dependent
channel_id <u2 sensors with fixed beam IDs
horizontal_id <u2 Blickfeld Qb2 scan positions

decode_pointcloud() validates byte alignment and channel lengths. Its default arrays are zero-copy, read-only views. Pass copy=True when writable arrays are required.

Sensor identifiers

The HighwayScene classification sensors use these enum values:

Sensor LaserName
Blickfeld Qb2 CLASS_QB2
Ouster OS0 CLASS_OS0
Aeva Aeries II CLASS_AERIES_II

The remaining enum values are retained for wire compatibility with the HighwayScene record format.

Schema generation

Generated betterproto bindings are committed so users do not need a Protobuf compiler. To regenerate them after an intentional schema change:

python -m pip install -e '.[codegen]'
./scripts/generate_bindings.sh

Never renumber or reuse an existing Protobuf field. CI verifies that committed bindings match the schemas.

Licensing

This reader and its Protobuf schemas are released under the MIT License. The HighwayScene dataset is distributed separately under CC BY-NC-SA 4.0; using this package does not change the dataset license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

highwayscene_proto-1.0.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

highwayscene_proto-1.0.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file highwayscene_proto-1.0.0.tar.gz.

File metadata

  • Download URL: highwayscene_proto-1.0.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for highwayscene_proto-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5d34c8b3d27294609a415c57958e55c6861eeb8b03bbb56262538b5ff796b4e7
MD5 b6308b2681dc32c54bad34daadc5ade7
BLAKE2b-256 b84676a5edabf84949e50806bd3795b9d86ea13dff508a66cd676134af1d0b96

See more details on using hashes here.

Provenance

The following attestation bundles were made for highwayscene_proto-1.0.0.tar.gz:

Publisher: publish.yml on HighwayScene/highwayscene-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file highwayscene_proto-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for highwayscene_proto-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25b8738595235ce74e01bf320ab60d59d45ea5fc9b76bac1a33201a6d2f18321
MD5 c2b539a4cb989ba789fe0f6ecec10ef9
BLAKE2b-256 d517e1b281cfee834be83d111e3b765bf92214b6a9f50ea7f71de26cc9f705f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for highwayscene_proto-1.0.0-py3-none-any.whl:

Publisher: publish.yml on HighwayScene/highwayscene-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page