Skip to content

Add comma2k19 dataset support#19

Merged
stepankonev merged 4 commits into
mainfrom
add-comma2k19-support
Jun 4, 2026
Merged

Add comma2k19 dataset support#19
stepankonev merged 4 commits into
mainfrom
add-comma2k19-support

Conversation

@stepankonev

Copy link
Copy Markdown
Owner

Adds support for the comma2k19 dataset — ~2000 one-minute highway segments, each a single forward-facing 20 Hz comma EON camera (1164×874) plus a fused GNSS/IMU ego pose and CAN telemetry.

Mapping to the unified format

  • cameras — the single FRONT image (EON pinhole intrinsics; identity extrinsics, since the dataset pose is the camera pose).
  • global_position — ego pose in a per-segment local FLU frame, plus ego speed (TrajectoryComponent.SPEED) from the ECEF velocity.
  • past/future_states — ego trajectory via FuturePastStatesFromMatricesAggregator.
  • No lidar, HD map, 3D detections, or driving command (comma2k19 ships none).

Notes

  • Input is unzip-first: segments must be extracted from the distributed Chunk_*.zip archives before processing (same convention as WayveScenes101); the prepare script does the extraction.
  • Video: HEVC random seek is unreliable, so frames are decoded forward-only with a per-worker, per-segment cache; the iterator is segment-major so workers never rewind.
  • Coordinate convention (ECEF → FRD → FLU, Hamilton wxyz) was verified empirically against gravity and trajectory shape; a regression test guards it.
  • Volume knobs: --frame_stride N (every Nth frame) and the cameras_identity_adapter max_size param (downscale image + scale intrinsics) bound the otherwise ~2 TB-at-20 Hz output.

Validation

  • Processed a full chunk (188 segments) end-to-end; verified camera / pose / speed / past-future trajectory across multiple frames of the same segment.
  • pytest + mypy + black + isort + flake8 all green.

Changes

  • New standard_e2e/caching/src_datasets/comma2k19/ (processor, converter, geometry + IO helpers); registered in the process_source_dataset CLI.
  • CamerasIdentityAdapter gains an optional max_size (config-driven downscaling, intrinsics-aware).
  • configs/comma2k19.yaml, scripts/prepare_dataset_comma2k19.sh, tests, README support-matrix row, and docs/datasets.rst entry.

comma2k19 is a single forward-camera highway dataset: a 20 Hz comma EON road
camera plus a fused GNSS/IMU ego pose and CAN telemetry, in ~2000 one-minute
segments. The new processor/converter:

- discover segments from extracted directories or read the distributed
  Chunk_*.zip archives in place (video.hevc staged to scratch, cleaned up);
- decode the HEVC stream forward-only with a per-worker, per-segment cache
  (HEVC random seek is unreliable);
- emit the single FRONT camera (EON pinhole intrinsics, identity extrinsics),
  the ego pose + speed in a per-segment local FLU frame, and the past/future
  ego trajectories via FuturePastStatesFromMatricesAggregator.

Registers the dataset in the process_source_dataset CLI, with a config, a
prepare script, tests (synthetic coordinate-convention checks plus real-frame
checks gated on COMMA2K19_ROOT), and a README support-matrix row.
Add a comma2k19 row and footnote to docs/datasets.rst, matching the existing
per-dataset format: a single forward comma EON camera, the ego pose and speed
in a per-segment local FLU frame, zip-direct / forward-only HEVC decoding, and
no lidar, HD map, 3D detections, or driving command.
Switch comma2k19 to extracted-directories only: the distributed Chunk_*.zip
archives must be unzipped first (as with WayveScenes101). Drop the in-archive
discovery, in-memory zip reads, per-segment scratch video extraction, and the
associated cleanup, leaving a single directory-based path; SegmentRef collapses
to (path, segment_id, route, segment). The prepare script now extracts the
archives before processing.

Add a --image_max_size converter knob that downscales each frame so its longest
side is at most N px, scaling the camera intrinsics to match so projection
still holds. Combined with --frame_stride it bounds the otherwise large output
(~2 TB at native 20 Hz / 1164x874). README, docs, and tests updated.
Resizing belongs in the adapter (transform) layer, not the SourceDatasetProcessor.
The comma2k19 processor again emits raw, full-resolution frames; CamerasIdentityAdapter
gains an optional `max_size` param that downscales each camera image (longest
side <= max_size) and scales its intrinsics to match. Downscaling is configured
per dataset via the adapter's `params: {max_size: N}`, replacing the comma2k19
`--image_max_size` CLI flag. Docs, config, script, and tests updated.
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

@stepankonev stepankonev merged commit f540cca into main Jun 4, 2026
2 of 3 checks passed
@stepankonev stepankonev deleted the add-comma2k19-support branch June 4, 2026 19:07
@stepankonev stepankonev mentioned this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant