Skip to content

feat(tier4): T4Devkit on 1.0 records (0.x converted on loading) - #310

Merged
jacoblambert merged 5 commits into
v1-devfrom
v1/devkit-load
Oct 22, 2026
Merged

jacoblambert merged 5 commits into
v1-devfrom
v1/devkit-load

Conversation

@jacoblambert

@jacoblambert jacoblambert commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

T4Devkit now loads every dataset through load_dataset() (#304): 1.0 datasets are read as they are, and 0.x datasets are converted to 1.0 records when loading (#307, #308). Lookups, boxes, time series and rendering all work on 1.0 records, and T4Devkit never checks the dataset version.

Breaking: the tables T4Devkit exposes are 1.0 records.

The constructor is unchanged: T4Devkit(data_root, revision=None, verbose=True), and revision still picks the version folder.

Breaking changes for users

Before (0.x records) Now (1.0 records)
t4.calibrated_sensor gone: calibration is on t4.sensor (translation, rotation, camera.intrinsic, camera.width / height, lidar.fields)
sample_data.calibrated_sensor_token sample_data.sensor_token
sample_data.width / height sensor.camera.width / height
t4.surface_ann, sample.surface_anns rows of t4.object_ann with instance_token: None, in sample.ann_2ds
t4.lidarseg gone; 0.x LiDAR segmentation is not loaded or rendered
instance.instance_name instance.name
links "" (next, prev, ...) None
render_calibration(sensor, calibration, resolution) render_calibration(sensor)
load_table(), fix_category_table() removed (no caller left; the category index rule is in the 0.x conversion, #308)

New tables: t4.vehicle, t4.route, t4.scenario, t4.caption.

Commits

  1. feat(loader): load datasets through load_dataset()
    • Tables come from load_dataset(). get / get_table / get_idx use 1.0 table names through T4Tables (new T4Tables.get_idx), and the shortcut fields (sample.data, ann_3ds, ann_2ds, sensor.first_sd_token, ...) come from T4Tables, so T4Devkit's own reverse index is removed.
    • dataset_id / version come from manifest.json for 1.0, from the folder names for 0.x.
    • get_sample_data takes intrinsics, image size and extrinsics from the sensor row.
    • Needed to keep the samples and real data working: None links in box_velocity / get_box3ds; unknown visibility (visibility_token: None) → UNAVAILABLE; a Box2D without instance gets uuid=None.
  2. feat(tier4): label confidence and time series on 1.0 records
    • The time series helper (future paths of get_box3d(future_seconds=)) walks links until None; before, every future path failed on get(None).
    • Box confidence is the label's; labels without one (manual) keep 1.0.
  3. fix(sample): store a real RLE road mask in the 1.0 sample
    • The 1.0 sample's road mask (test(sample): add T4Dataset 1.0 sample dataset #295) had counts: "0", which is not a base64 RLE; the rendering test was the first to decode it. The generator now computes it with pycocotools; object_ann.json and its manifest hash are updated.
  4. feat(helper): render 1.0 records and data files
    • Frames are read by their own format: LiDAR with LidarPointCloud.from_file(path, frame_index=, fields=sensor.lidar.fields) (Parquet, PCD, .bin). Camera image files are still passed as paths (sent encoded); video frames are decoded with load_image().
    • One first frame per channel, skipping sensors without frames (source LiDARs of a merged channel crashed rendering before). render_pointcloud uses the first LiDAR channel.
    • render_instance handles instances labeled only in 2D (first / last annotation is an object_ann) or with no annotation.
    • 2D masks: one loop over object_ann, former surface_ann regions included. Class IDs: category.index, or the list position when it is not set.
    • Removed: lidarseg rendering and the use of SegmentationPointCloud.

Tests

  • tests/test_tier4.py: every T4Devkit test runs on both samples (0.x converted on loading, and 1.0).
  • New: unknown visibility, autolabel confidence, future paths, and test_rendering (scene, instance and pointcloud of both samples rendered to .rrd files, no viewer window). There were no rendering tests before.
  • tests/viewer/test_viewer.py: render_calibration with a 1.0 sensor row.

@jacoblambert
jacoblambert added this pull request to stack #309 October 13, 2026 10:06
@jacoblambert
jacoblambert removed this pull request from stack #309 October 14, 2026 13:14
@jacoblambert
jacoblambert added this pull request to stack #315 October 14, 2026 13:16
@jacoblambert
jacoblambert force-pushed the v1/convert-v0-rest branch 2 times, most recently from 46e7e29 to 58bb6a9 Compare October 15, 2026 05:23
@jacoblambert
jacoblambert force-pushed the v1/devkit-load branch 2 times, most recently from 554bf6a to 5a4e45b Compare October 15, 2026 05:40
@jacoblambert
jacoblambert marked this pull request as ready for review October 15, 2026 06:17
ktro2828
ktro2828 previously approved these changes Oct 20, 2026

@ktro2828 ktro2828 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jacoblambert
jacoblambert removed this pull request from stack #315 October 22, 2026 08:55
Base automatically changed from v1/convert-v0-rest to v1-dev October 22, 2026 09:54
@jacoblambert
jacoblambert merged commit 9559c79 into v1-dev Oct 22, 2026
0 of 5 checks passed
@jacoblambert
jacoblambert deleted the v1/devkit-load branch October 22, 2026 09:54
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.

2 participants