highwayscene-proto 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- highwayscene_proto-1.0.0/LICENSE +21 -0
- highwayscene_proto-1.0.0/MANIFEST.in +1 -0
- highwayscene_proto-1.0.0/PKG-INFO +194 -0
- highwayscene_proto-1.0.0/README.md +156 -0
- highwayscene_proto-1.0.0/proto/highwayscene/common/calibration.proto +21 -0
- highwayscene_proto-1.0.0/proto/highwayscene/data/pointcloud.proto +13 -0
- highwayscene_proto-1.0.0/proto/highwayscene/frame.proto +11 -0
- highwayscene_proto-1.0.0/proto/highwayscene/label/object.proto +41 -0
- highwayscene_proto-1.0.0/proto/highwayscene/sensors/camera.proto +21 -0
- highwayscene_proto-1.0.0/proto/highwayscene/sensors/lidar.proto +35 -0
- highwayscene_proto-1.0.0/pyproject.toml +88 -0
- highwayscene_proto-1.0.0/setup.cfg +4 -0
- highwayscene_proto-1.0.0/src/a42/__init__.py +50 -0
- highwayscene_proto-1.0.0/src/a42/__main__.py +6 -0
- highwayscene_proto-1.0.0/src/a42/cli.py +6 -0
- highwayscene_proto-1.0.0/src/a42/common.py +5 -0
- highwayscene_proto-1.0.0/src/a42/data.py +5 -0
- highwayscene_proto-1.0.0/src/a42/frame.py +5 -0
- highwayscene_proto-1.0.0/src/a42/io.py +19 -0
- highwayscene_proto-1.0.0/src/a42/label.py +9 -0
- highwayscene_proto-1.0.0/src/a42/pointcloud.py +7 -0
- highwayscene_proto-1.0.0/src/a42/py.typed +1 -0
- highwayscene_proto-1.0.0/src/a42/sensors.py +8 -0
- highwayscene_proto-1.0.0/src/highwayscene/__init__.py +44 -0
- highwayscene_proto-1.0.0/src/highwayscene/__main__.py +6 -0
- highwayscene_proto-1.0.0/src/highwayscene/cli.py +119 -0
- highwayscene_proto-1.0.0/src/highwayscene/common.py +22 -0
- highwayscene_proto-1.0.0/src/highwayscene/data.py +18 -0
- highwayscene_proto-1.0.0/src/highwayscene/frame.py +18 -0
- highwayscene_proto-1.0.0/src/highwayscene/io.py +244 -0
- highwayscene_proto-1.0.0/src/highwayscene/label.py +50 -0
- highwayscene_proto-1.0.0/src/highwayscene/pointcloud.py +108 -0
- highwayscene_proto-1.0.0/src/highwayscene/py.typed +1 -0
- highwayscene_proto-1.0.0/src/highwayscene/sensors.py +62 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/PKG-INFO +194 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/SOURCES.txt +42 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/dependency_links.txt +1 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/entry_points.txt +3 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/requires.txt +17 -0
- highwayscene_proto-1.0.0/src/highwayscene_proto.egg-info/top_level.txt +2 -0
- highwayscene_proto-1.0.0/tests/test_bindings.py +41 -0
- highwayscene_proto-1.0.0/tests/test_cli.py +39 -0
- highwayscene_proto-1.0.0/tests/test_io.py +90 -0
- highwayscene_proto-1.0.0/tests/test_pointcloud.py +76 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alexander Baumann
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include proto *.proto
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: highwayscene-proto
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Reference Python reader and Protobuf schema for HighwayScene records
|
|
5
|
+
Author: Alexander Baumann
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://highwayscene.github.io/
|
|
8
|
+
Project-URL: Dataset, https://huggingface.co/datasets/iis-esslingen/HighwayScene
|
|
9
|
+
Project-URL: Repository, https://github.com/HighwayScene/highwayscene-proto
|
|
10
|
+
Project-URL: Issues, https://github.com/HighwayScene/highwayscene-proto/issues
|
|
11
|
+
Keywords: lidar,point-cloud,protobuf,highwayscene,dataset
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: betterproto==1.2.5
|
|
24
|
+
Requires-Dist: numpy<3,>=1.24
|
|
25
|
+
Provides-Extra: visualization
|
|
26
|
+
Requires-Dist: open3d<1,>=0.18; extra == "visualization"
|
|
27
|
+
Provides-Extra: codegen
|
|
28
|
+
Requires-Dist: black==26.5.1; extra == "codegen"
|
|
29
|
+
Requires-Dist: betterproto[compiler]==1.2.5; extra == "codegen"
|
|
30
|
+
Requires-Dist: grpcio-tools==1.83.0; extra == "codegen"
|
|
31
|
+
Requires-Dist: protobuf==7.35.1; extra == "codegen"
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: build<2,>=1.2; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest<10,>=8; extra == "dev"
|
|
35
|
+
Requires-Dist: ruff<1,>=0.11; extra == "dev"
|
|
36
|
+
Requires-Dist: twine<7,>=5; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# highwayscene-proto
|
|
40
|
+
|
|
41
|
+
`highwayscene-proto` is the reference Python reader and Protobuf schema for
|
|
42
|
+
[HighwayScene](https://huggingface.co/datasets/iis-esslingen/HighwayScene), a
|
|
43
|
+
multi-sensor static roadside LiDAR dataset. It provides generated message
|
|
44
|
+
classes, memory-efficient record iteration, random frame access, and typed
|
|
45
|
+
NumPy views of point-cloud channels.
|
|
46
|
+
|
|
47
|
+
HighwayScene accompanies the paper **“Beam-Wise Statistical Background
|
|
48
|
+
Subtraction for Static Roadside LiDAR: A Cross-Sensor Benchmark Study.”** See
|
|
49
|
+
the [project page](https://highwayscene.github.io/) for the paper, code,
|
|
50
|
+
dataset, and benchmark resources.
|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
Install the reader from PyPI:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
python -m pip install highwayscene-proto
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
For development from a checkout:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python -m pip install -e '.[dev]'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Python 3.10 or newer is required.
|
|
67
|
+
|
|
68
|
+
## Quick start
|
|
69
|
+
|
|
70
|
+
Stream frames from a record without loading the complete file:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from highwayscene import LaserName, decode_pointcloud, iter_frames
|
|
74
|
+
|
|
75
|
+
for frame in iter_frames("HighwayScene/test/record.pb"):
|
|
76
|
+
print(frame.frame_id, frame.frame_timestamp_ns)
|
|
77
|
+
for scan in frame.lidars:
|
|
78
|
+
sensor = LaserName(scan.laser_name).name
|
|
79
|
+
points = decode_pointcloud(scan.pointcloud)
|
|
80
|
+
print(sensor, points.xyz.shape, points.channel_id)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Use `RecordFile` when you need indexed access:
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from highwayscene import RecordFile, decode_pointcloud
|
|
87
|
+
|
|
88
|
+
record = RecordFile("HighwayScene/test/record.pb")
|
|
89
|
+
frame = record[12]
|
|
90
|
+
xyz = decode_pointcloud(frame.lidars[0].pointcloud).xyz
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The existing generated-module imports remain available:
|
|
94
|
+
|
|
95
|
+
```python
|
|
96
|
+
from highwayscene.frame import Frame
|
|
97
|
+
from highwayscene.sensors import LaserName, LidarScan
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Imports through the former `a42` package name remain available as compatibility aliases.
|
|
101
|
+
New code should use the `highwayscene` namespace.
|
|
102
|
+
|
|
103
|
+
Inspect a file or a complete split from the command line:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
highwayscene-inspect HighwayScene/test --limit 3
|
|
107
|
+
highwayscene-inspect HighwayScene/test/record.pb --json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Dataset download and layout
|
|
111
|
+
|
|
112
|
+
Download HighwayScene with Git LFS or `huggingface_hub`:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='iis-esslingen/HighwayScene', repo_type='dataset', local_dir='HighwayScene')"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
The point-cloud records are organized by benchmark split:
|
|
119
|
+
|
|
120
|
+
```text
|
|
121
|
+
HighwayScene/
|
|
122
|
+
├── train/*.pb
|
|
123
|
+
├── val/*.pb
|
|
124
|
+
├── test/*.pb
|
|
125
|
+
└── label/...
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The labels under `label/` belong to the background-subtraction benchmark and
|
|
129
|
+
are consumed by the
|
|
130
|
+
[`roadside-lidar-background-subtraction`](https://github.com/HighwayScene/roadside-lidar-background-subtraction)
|
|
131
|
+
repository. They are separate from the optional `object_list` field in the
|
|
132
|
+
Protobuf schema.
|
|
133
|
+
|
|
134
|
+
## Record format
|
|
135
|
+
|
|
136
|
+
Each `.pb` file is a sequence of messages. Every message consists of a
|
|
137
|
+
four-byte unsigned little-endian payload length followed by one serialized
|
|
138
|
+
`highwayscene.frame.Frame` message:
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
[uint32 payload bytes][serialized Frame][uint32 payload bytes][serialized Frame]...
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The schema is available under [`proto/highwayscene`](proto/highwayscene). Cartesian coordinates
|
|
145
|
+
are interleaved little-endian `float32` values. Populated auxiliary channels
|
|
146
|
+
contain one value per Cartesian point:
|
|
147
|
+
|
|
148
|
+
| Field | NumPy dtype | Availability |
|
|
149
|
+
| --- | --- | --- |
|
|
150
|
+
| `cartesian` | `<f4`, shaped `(N, 3)` | all sensors |
|
|
151
|
+
| `intensity` | `<u2` | sensor-dependent |
|
|
152
|
+
| `ambient` | `<u2` | sensor-dependent |
|
|
153
|
+
| `velocity` | `<f4` | Aeva Aeries II |
|
|
154
|
+
| `reflectivity` | `<u2` | sensor-dependent |
|
|
155
|
+
| `timestamp_offset` | `<u8` | sensor-dependent |
|
|
156
|
+
| `channel_id` | `<u2` | sensors with fixed beam IDs |
|
|
157
|
+
| `horizontal_id` | `<u2` | Blickfeld Qb2 scan positions |
|
|
158
|
+
|
|
159
|
+
`decode_pointcloud()` validates byte alignment and channel lengths. Its default
|
|
160
|
+
arrays are zero-copy, read-only views. Pass `copy=True` when writable arrays
|
|
161
|
+
are required.
|
|
162
|
+
|
|
163
|
+
## Sensor identifiers
|
|
164
|
+
|
|
165
|
+
The HighwayScene classification sensors use these enum values:
|
|
166
|
+
|
|
167
|
+
| Sensor | `LaserName` |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| Blickfeld Qb2 | `CLASS_QB2` |
|
|
170
|
+
| Ouster OS0 | `CLASS_OS0` |
|
|
171
|
+
| Aeva Aeries II | `CLASS_AERIES_II` |
|
|
172
|
+
|
|
173
|
+
The remaining enum values are retained for wire compatibility with the
|
|
174
|
+
HighwayScene record format.
|
|
175
|
+
|
|
176
|
+
## Schema generation
|
|
177
|
+
|
|
178
|
+
Generated `betterproto` bindings are committed so users do not need a Protobuf
|
|
179
|
+
compiler. To regenerate them after an intentional schema change:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
python -m pip install -e '.[codegen]'
|
|
183
|
+
./scripts/generate_bindings.sh
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Never renumber or reuse an existing Protobuf field. CI verifies that committed
|
|
187
|
+
bindings match the schemas.
|
|
188
|
+
|
|
189
|
+
## Licensing
|
|
190
|
+
|
|
191
|
+
This reader and its Protobuf schemas are released under the [MIT License](LICENSE).
|
|
192
|
+
The HighwayScene dataset is distributed separately under
|
|
193
|
+
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/); using
|
|
194
|
+
this package does not change the dataset license.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# highwayscene-proto
|
|
2
|
+
|
|
3
|
+
`highwayscene-proto` is the reference Python reader and Protobuf schema for
|
|
4
|
+
[HighwayScene](https://huggingface.co/datasets/iis-esslingen/HighwayScene), a
|
|
5
|
+
multi-sensor static roadside LiDAR dataset. It provides generated message
|
|
6
|
+
classes, memory-efficient record iteration, random frame access, and typed
|
|
7
|
+
NumPy views of point-cloud channels.
|
|
8
|
+
|
|
9
|
+
HighwayScene accompanies the paper **“Beam-Wise Statistical Background
|
|
10
|
+
Subtraction for Static Roadside LiDAR: A Cross-Sensor Benchmark Study.”** See
|
|
11
|
+
the [project page](https://highwayscene.github.io/) for the paper, code,
|
|
12
|
+
dataset, and benchmark resources.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Install the reader from PyPI:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
python -m pip install highwayscene-proto
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
For development from a checkout:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python -m pip install -e '.[dev]'
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Python 3.10 or newer is required.
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
Stream frames from a record without loading the complete file:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from highwayscene import LaserName, decode_pointcloud, iter_frames
|
|
36
|
+
|
|
37
|
+
for frame in iter_frames("HighwayScene/test/record.pb"):
|
|
38
|
+
print(frame.frame_id, frame.frame_timestamp_ns)
|
|
39
|
+
for scan in frame.lidars:
|
|
40
|
+
sensor = LaserName(scan.laser_name).name
|
|
41
|
+
points = decode_pointcloud(scan.pointcloud)
|
|
42
|
+
print(sensor, points.xyz.shape, points.channel_id)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Use `RecordFile` when you need indexed access:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from highwayscene import RecordFile, decode_pointcloud
|
|
49
|
+
|
|
50
|
+
record = RecordFile("HighwayScene/test/record.pb")
|
|
51
|
+
frame = record[12]
|
|
52
|
+
xyz = decode_pointcloud(frame.lidars[0].pointcloud).xyz
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The existing generated-module imports remain available:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from highwayscene.frame import Frame
|
|
59
|
+
from highwayscene.sensors import LaserName, LidarScan
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Imports through the former `a42` package name remain available as compatibility aliases.
|
|
63
|
+
New code should use the `highwayscene` namespace.
|
|
64
|
+
|
|
65
|
+
Inspect a file or a complete split from the command line:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
highwayscene-inspect HighwayScene/test --limit 3
|
|
69
|
+
highwayscene-inspect HighwayScene/test/record.pb --json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Dataset download and layout
|
|
73
|
+
|
|
74
|
+
Download HighwayScene with Git LFS or `huggingface_hub`:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='iis-esslingen/HighwayScene', repo_type='dataset', local_dir='HighwayScene')"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The point-cloud records are organized by benchmark split:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
HighwayScene/
|
|
84
|
+
├── train/*.pb
|
|
85
|
+
├── val/*.pb
|
|
86
|
+
├── test/*.pb
|
|
87
|
+
└── label/...
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The labels under `label/` belong to the background-subtraction benchmark and
|
|
91
|
+
are consumed by the
|
|
92
|
+
[`roadside-lidar-background-subtraction`](https://github.com/HighwayScene/roadside-lidar-background-subtraction)
|
|
93
|
+
repository. They are separate from the optional `object_list` field in the
|
|
94
|
+
Protobuf schema.
|
|
95
|
+
|
|
96
|
+
## Record format
|
|
97
|
+
|
|
98
|
+
Each `.pb` file is a sequence of messages. Every message consists of a
|
|
99
|
+
four-byte unsigned little-endian payload length followed by one serialized
|
|
100
|
+
`highwayscene.frame.Frame` message:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
[uint32 payload bytes][serialized Frame][uint32 payload bytes][serialized Frame]...
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The schema is available under [`proto/highwayscene`](proto/highwayscene). Cartesian coordinates
|
|
107
|
+
are interleaved little-endian `float32` values. Populated auxiliary channels
|
|
108
|
+
contain one value per Cartesian point:
|
|
109
|
+
|
|
110
|
+
| Field | NumPy dtype | Availability |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| `cartesian` | `<f4`, shaped `(N, 3)` | all sensors |
|
|
113
|
+
| `intensity` | `<u2` | sensor-dependent |
|
|
114
|
+
| `ambient` | `<u2` | sensor-dependent |
|
|
115
|
+
| `velocity` | `<f4` | Aeva Aeries II |
|
|
116
|
+
| `reflectivity` | `<u2` | sensor-dependent |
|
|
117
|
+
| `timestamp_offset` | `<u8` | sensor-dependent |
|
|
118
|
+
| `channel_id` | `<u2` | sensors with fixed beam IDs |
|
|
119
|
+
| `horizontal_id` | `<u2` | Blickfeld Qb2 scan positions |
|
|
120
|
+
|
|
121
|
+
`decode_pointcloud()` validates byte alignment and channel lengths. Its default
|
|
122
|
+
arrays are zero-copy, read-only views. Pass `copy=True` when writable arrays
|
|
123
|
+
are required.
|
|
124
|
+
|
|
125
|
+
## Sensor identifiers
|
|
126
|
+
|
|
127
|
+
The HighwayScene classification sensors use these enum values:
|
|
128
|
+
|
|
129
|
+
| Sensor | `LaserName` |
|
|
130
|
+
| --- | --- |
|
|
131
|
+
| Blickfeld Qb2 | `CLASS_QB2` |
|
|
132
|
+
| Ouster OS0 | `CLASS_OS0` |
|
|
133
|
+
| Aeva Aeries II | `CLASS_AERIES_II` |
|
|
134
|
+
|
|
135
|
+
The remaining enum values are retained for wire compatibility with the
|
|
136
|
+
HighwayScene record format.
|
|
137
|
+
|
|
138
|
+
## Schema generation
|
|
139
|
+
|
|
140
|
+
Generated `betterproto` bindings are committed so users do not need a Protobuf
|
|
141
|
+
compiler. To regenerate them after an intentional schema change:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
python -m pip install -e '.[codegen]'
|
|
145
|
+
./scripts/generate_bindings.sh
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Never renumber or reuse an existing Protobuf field. CI verifies that committed
|
|
149
|
+
bindings match the schemas.
|
|
150
|
+
|
|
151
|
+
## Licensing
|
|
152
|
+
|
|
153
|
+
This reader and its Protobuf schemas are released under the [MIT License](LICENSE).
|
|
154
|
+
The HighwayScene dataset is distributed separately under
|
|
155
|
+
[CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/); using
|
|
156
|
+
this package does not change the dataset license.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.common;
|
|
3
|
+
|
|
4
|
+
message SensorCalibration {
|
|
5
|
+
string sensor_name = 1;
|
|
6
|
+
repeated float extrinsic = 2;
|
|
7
|
+
|
|
8
|
+
float vertical_fov = 3;
|
|
9
|
+
float horizontal_fov = 4;
|
|
10
|
+
|
|
11
|
+
uint32 vertical_scanlines = 5;
|
|
12
|
+
uint32 horizontal_scanlines = 6;
|
|
13
|
+
|
|
14
|
+
float horizontal_angle_spacing = 7;
|
|
15
|
+
|
|
16
|
+
repeated float beam_altitude_angles = 8;
|
|
17
|
+
repeated float beam_azimuth_angles = 9;
|
|
18
|
+
|
|
19
|
+
string frame_mode = 10;
|
|
20
|
+
string scan_pattern = 11;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.data;
|
|
3
|
+
|
|
4
|
+
message PointCloud {
|
|
5
|
+
bytes cartesian = 1;
|
|
6
|
+
bytes intensity = 2;
|
|
7
|
+
bytes ambient = 3;
|
|
8
|
+
bytes velocity = 4;
|
|
9
|
+
bytes reflectivity = 5; // Reflectivity = Intensity * r²
|
|
10
|
+
bytes timestamp_offset = 6; // Offset to Scan Timestamp in ns
|
|
11
|
+
bytes channel_id = 7;
|
|
12
|
+
bytes horizontal_id = 8;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.frame;
|
|
3
|
+
|
|
4
|
+
import "highwayscene/sensors/lidar.proto";
|
|
5
|
+
|
|
6
|
+
// Groups synchronized sensor scans into one dataset frame.
|
|
7
|
+
message Frame {
|
|
8
|
+
uint64 frame_timestamp_ns = 1;
|
|
9
|
+
repeated highwayscene.sensors.LidarScan lidars = 2;
|
|
10
|
+
uint32 frame_id = 3;
|
|
11
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.label;
|
|
3
|
+
|
|
4
|
+
import "highwayscene/data/pointcloud.proto";
|
|
5
|
+
|
|
6
|
+
message Position {
|
|
7
|
+
float x = 1;
|
|
8
|
+
float y = 2;
|
|
9
|
+
float z = 3;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message Dimensions {
|
|
13
|
+
float x = 1;
|
|
14
|
+
float y = 2;
|
|
15
|
+
float z = 3;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message Orientation {
|
|
19
|
+
float x = 1;
|
|
20
|
+
float y = 2;
|
|
21
|
+
float z = 3;
|
|
22
|
+
float w = 4;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message Velocity {
|
|
26
|
+
float x = 1;
|
|
27
|
+
float y = 2;
|
|
28
|
+
float z = 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message ObjectBBox {
|
|
32
|
+
uint32 id = 1;
|
|
33
|
+
uint64 timestamp_ns = 2;
|
|
34
|
+
Position position = 3;
|
|
35
|
+
Dimensions dimension = 4;
|
|
36
|
+
Orientation orientation = 5;
|
|
37
|
+
Velocity velocity = 6;
|
|
38
|
+
highwayscene.data.PointCloud pointcloud = 7;
|
|
39
|
+
string obj_class = 8;
|
|
40
|
+
float obj_class_score = 9;
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.sensors;
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// Camera-specific metadata.
|
|
6
|
+
message CameraCalibration {
|
|
7
|
+
string sensor_name = 1;
|
|
8
|
+
// Intrinsic matrix in row-major order, when available.
|
|
9
|
+
repeated double intrinsic = 2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// A single camera image.
|
|
13
|
+
message CameraFrame {
|
|
14
|
+
string sensor_name = 1;
|
|
15
|
+
uint64 frame_timestamp_ns = 2; // Timestamp used for sensor synchronization.
|
|
16
|
+
uint32 width = 3;
|
|
17
|
+
uint32 height = 4;
|
|
18
|
+
string encoding = 5; // "jpeg", "png", "raw_bgr", ...
|
|
19
|
+
bytes image_data = 6;
|
|
20
|
+
CameraCalibration calibration = 7;
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package highwayscene.sensors;
|
|
3
|
+
|
|
4
|
+
import "highwayscene/common/calibration.proto";
|
|
5
|
+
import "highwayscene/label/object.proto";
|
|
6
|
+
import "highwayscene/data/pointcloud.proto";
|
|
7
|
+
|
|
8
|
+
// Identifies the LiDAR sensor that produced a scan.
|
|
9
|
+
enum LaserName {
|
|
10
|
+
UNKNOWN_NAME = 0;
|
|
11
|
+
WIM_HOR = 1;
|
|
12
|
+
ANPR_HOR = 2;
|
|
13
|
+
AMPEL_HOR = 3;
|
|
14
|
+
WIM_VER = 4;
|
|
15
|
+
ANPR_VER = 5;
|
|
16
|
+
AMPEL_VER = 6;
|
|
17
|
+
CLASS_QB2 = 7;
|
|
18
|
+
CLASS_OS0 = 8;
|
|
19
|
+
CLASS_AERIES_II = 9;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Data captured by one LiDAR sensor for a single sweep.
|
|
23
|
+
message LidarScan {
|
|
24
|
+
LaserName laser_name = 1;
|
|
25
|
+
uint64 scan_timestamp_ns = 2;
|
|
26
|
+
|
|
27
|
+
// Encoded point-cloud channels.
|
|
28
|
+
highwayscene.data.PointCloud pointcloud = 3;
|
|
29
|
+
|
|
30
|
+
// Sensor calibration metadata.
|
|
31
|
+
highwayscene.common.SensorCalibration calibration = 4;
|
|
32
|
+
|
|
33
|
+
// Optional objects associated with this scan.
|
|
34
|
+
repeated highwayscene.label.ObjectBBox object_list = 5;
|
|
35
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "highwayscene-proto"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Reference Python reader and Protobuf schema for HighwayScene records"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [
|
|
14
|
+
{name = "Alexander Baumann"},
|
|
15
|
+
]
|
|
16
|
+
keywords = ["lidar", "point-cloud", "protobuf", "highwayscene", "dataset"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 5 - Production/Stable",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"betterproto==1.2.5",
|
|
29
|
+
"numpy>=1.24,<3",
|
|
30
|
+
]
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
visualization = [
|
|
34
|
+
"open3d>=0.18,<1",
|
|
35
|
+
]
|
|
36
|
+
codegen = [
|
|
37
|
+
"black==26.5.1",
|
|
38
|
+
"betterproto[compiler]==1.2.5",
|
|
39
|
+
"grpcio-tools==1.83.0",
|
|
40
|
+
"protobuf==7.35.1",
|
|
41
|
+
]
|
|
42
|
+
dev = [
|
|
43
|
+
"build>=1.2,<2",
|
|
44
|
+
"pytest>=8,<10",
|
|
45
|
+
"ruff>=0.11,<1",
|
|
46
|
+
"twine>=5,<7",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[project.scripts]
|
|
50
|
+
highwayscene-inspect = "highwayscene.cli:entrypoint"
|
|
51
|
+
a42-inspect = "highwayscene.cli:entrypoint"
|
|
52
|
+
|
|
53
|
+
[project.urls]
|
|
54
|
+
Homepage = "https://highwayscene.github.io/"
|
|
55
|
+
Dataset = "https://huggingface.co/datasets/iis-esslingen/HighwayScene"
|
|
56
|
+
Repository = "https://github.com/HighwayScene/highwayscene-proto"
|
|
57
|
+
Issues = "https://github.com/HighwayScene/highwayscene-proto/issues"
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.packages.find]
|
|
60
|
+
where = ["src"]
|
|
61
|
+
|
|
62
|
+
[tool.setuptools.package-data]
|
|
63
|
+
highwayscene = ["py.typed"]
|
|
64
|
+
a42 = ["py.typed"]
|
|
65
|
+
|
|
66
|
+
[tool.pytest.ini_options]
|
|
67
|
+
addopts = "-ra"
|
|
68
|
+
testpaths = ["tests"]
|
|
69
|
+
|
|
70
|
+
[tool.ruff]
|
|
71
|
+
line-length = 100
|
|
72
|
+
target-version = "py310"
|
|
73
|
+
|
|
74
|
+
[tool.ruff.lint]
|
|
75
|
+
select = ["B", "D", "E", "F", "I", "UP"]
|
|
76
|
+
ignore = ["D203", "D213"]
|
|
77
|
+
|
|
78
|
+
[tool.ruff.lint.pydocstyle]
|
|
79
|
+
convention = "google"
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint.per-file-ignores]
|
|
82
|
+
"examples/*.py" = ["D"]
|
|
83
|
+
"src/highwayscene/common.py" = ["ALL"]
|
|
84
|
+
"src/highwayscene/data.py" = ["ALL"]
|
|
85
|
+
"src/highwayscene/frame.py" = ["ALL"]
|
|
86
|
+
"src/highwayscene/label.py" = ["ALL"]
|
|
87
|
+
"src/highwayscene/sensors.py" = ["ALL"]
|
|
88
|
+
"tests/*.py" = ["D"]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Compatibility API for the former ``a42`` package name."""
|
|
2
|
+
|
|
3
|
+
from highwayscene import DEFAULT_MAX_MESSAGE_BYTES as DEFAULT_MAX_MESSAGE_BYTES
|
|
4
|
+
from highwayscene import CameraCalibration as CameraCalibration
|
|
5
|
+
from highwayscene import CameraFrame as CameraFrame
|
|
6
|
+
from highwayscene import Dimensions as Dimensions
|
|
7
|
+
from highwayscene import Frame as Frame
|
|
8
|
+
from highwayscene import LaserName as LaserName
|
|
9
|
+
from highwayscene import LidarScan as LidarScan
|
|
10
|
+
from highwayscene import ObjectBBox as ObjectBBox
|
|
11
|
+
from highwayscene import Orientation as Orientation
|
|
12
|
+
from highwayscene import PointCloud as PointCloud
|
|
13
|
+
from highwayscene import PointCloudArrays as PointCloudArrays
|
|
14
|
+
from highwayscene import PointCloudFormatError as PointCloudFormatError
|
|
15
|
+
from highwayscene import Position as Position
|
|
16
|
+
from highwayscene import RecordFile as RecordFile
|
|
17
|
+
from highwayscene import RecordFormatError as RecordFormatError
|
|
18
|
+
from highwayscene import SensorCalibration as SensorCalibration
|
|
19
|
+
from highwayscene import Velocity as Velocity
|
|
20
|
+
from highwayscene import __version__ as __version__
|
|
21
|
+
from highwayscene import decode_pointcloud as decode_pointcloud
|
|
22
|
+
from highwayscene import iter_directory as iter_directory
|
|
23
|
+
from highwayscene import iter_frame_stream as iter_frame_stream
|
|
24
|
+
from highwayscene import iter_frames as iter_frames
|
|
25
|
+
from highwayscene import iter_record_paths as iter_record_paths
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"DEFAULT_MAX_MESSAGE_BYTES",
|
|
29
|
+
"CameraCalibration",
|
|
30
|
+
"CameraFrame",
|
|
31
|
+
"Dimensions",
|
|
32
|
+
"Frame",
|
|
33
|
+
"LaserName",
|
|
34
|
+
"LidarScan",
|
|
35
|
+
"ObjectBBox",
|
|
36
|
+
"Orientation",
|
|
37
|
+
"PointCloud",
|
|
38
|
+
"PointCloudArrays",
|
|
39
|
+
"PointCloudFormatError",
|
|
40
|
+
"Position",
|
|
41
|
+
"RecordFile",
|
|
42
|
+
"RecordFormatError",
|
|
43
|
+
"SensorCalibration",
|
|
44
|
+
"Velocity",
|
|
45
|
+
"decode_pointcloud",
|
|
46
|
+
"iter_directory",
|
|
47
|
+
"iter_frame_stream",
|
|
48
|
+
"iter_frames",
|
|
49
|
+
"iter_record_paths",
|
|
50
|
+
]
|