Skip to content

Conversation

@ktro2828
Copy link
Collaborator

What

This pull request adds support for rendering LiDAR segmentation point clouds, improves compatibility across different dataset revisions, and refines the handling of category indices. It also updates the documentation and user interface to reflect these new features and changes. The most important changes are grouped below:

LiDAR Segmentation Support:

  • Added a new SEGMENTATION color mode to PointCloudColorMode and support for rendering LiDAR segmentation point clouds in the viewer via the new render_lidarseg method in viewer.py. The rendering helper now automatically chooses segmentation rendering if segmentation data is available. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Category Index Compatibility:

  • Introduced fix_category_table in schema/compatibility.py to ensure category indices are correctly populated, handling cases where some or all indices are missing, and raising an error if the data is inconsistent. This function is now used during dataset initialization. [1] [2] [3]

  • Updated all usages of category indices to use the index field directly, instead of relying on list position, ensuring consistency across different dataset revisions. [1] [2]

Documentation and UI Updates:

  • Updated documentation in README.md, docs/index.md, and docs/tutorials/render.md to reflect new support for point cloud segmentation and to provide usage examples for rendering LiDAR segmentation. [1] [2] [3]

Other Improvements:

  • Improved map rendering by making it conditional on the existence of the map file, preventing errors if the file is missing.

  • Updated type hints and imports to support the new segmentation point cloud functionality.

ktro2828 and others added 4 commits January 30, 2026 09:33
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
* chore(deps): restrict rerun-sdk to versions >=0.20.0,<0.28.0 (#248)

* Bump version from 0.5.2 to 0.5.3 (#247)

* Bump version from 0.5.2 to 0.5.3

* Pin rerun-sdk dependency to version 0.20.0

* refactor: update custom validator definition (#250)

* refactor: update custom validator definition

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* Update t4_devkit/schema/tables/base.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: modity type of size to tuple[int, int] (#251)

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>

* fix: abstract away category indexing differences

Semseg and non-semseg datasets behave differently (position-based vs. explicit indexing).
Now computing index field in case position-based indexing is used.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): don't fail when map is not present

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix iteration freezing when skipping  a pointcloud without lidarseg file

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* feat(rendering): auto-enable SEGMENTATION coloring when lidarseg is available

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* docs: checkmark for semseg viz

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* fix(rendering): fix wrongly named `color_mode` args

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

* refactor(compatibility): move to schema package

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>

---------

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Co-authored-by: Kotaro Uetake <60615504+ktro2828@users.noreply.github.com>
Co-authored-by: Samrat Thapa <38401989+SamratThapa120@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 self-assigned this Jan 30, 2026
@github-actions github-actions bot added documentation Improvements or additions to documentation new-feature New feature or request labels Jan 30, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 30, 2026

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
4194 3463 83% 50% 🟢

New Files

File Coverage Status
t4_devkit/schema/compatibility.py 89% 🟢
TOTAL 89% 🟢

Modified Files

File Coverage Status
t4_devkit/helper/rendering.py 15% 🔴
t4_devkit/tier4.py 82% 🟢
t4_devkit/viewer/color.py 85% 🟢
t4_devkit/viewer/viewer.py 87% 🟢
TOTAL 67% 🔴

updated for commit: e53fdeb by action🐍

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 marked this pull request as ready for review January 30, 2026 00:42
Copy link
Contributor

@mojomex mojomex left a comment

Choose a reason for hiding this comment

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

Looking good! Some small feedback:

>>> viewer.render_lidarseg(seconds, lidar_channel, pointcloud)
```

<!--![Render LiDAR Segmentation](../assets/render_lidarseg.png)-->
Copy link
Contributor

Choose a reason for hiding this comment

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

This image is still commented out. I don't know if we have any internal data that's OK to share as an image. You can probably judge best which data to use.

self._t4 = t4
self._label2id: dict[str, int] = {
category.name: idx for idx, category in enumerate(self._t4.category)
category.name: category.index for category in self._t4.category
Copy link
Contributor

@mojomex mojomex Jan 30, 2026

Choose a reason for hiding this comment

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

This is part of #254 but I had it merged into #256 so it made its way into here 🙇

We can either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation new-feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants