Skip to content

feat(viewer): add support of rendering pointcloud segmentation#261

Merged
ktro2828 merged 9 commits into
mainfrom
feat/viewer/lidarseg
Feb 2, 2026
Merged

feat(viewer): add support of rendering pointcloud segmentation#261
ktro2828 merged 9 commits into
mainfrom
feat/viewer/lidarseg

Conversation

@ktro2828

Copy link
Copy Markdown
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 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

github-actions Bot commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ❌

Overall Coverage

Lines Covered Coverage Threshold Status
4235 3473 82% 50% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
t4_devkit/helper/rendering.py 14% 🔴
t4_devkit/viewer/color.py 85% 🟢
t4_devkit/viewer/viewer.py 86% 🟢
TOTAL 62% 🔴

updated for commit: bdce10f by action🐍

@ktro2828 ktro2828 marked this pull request as ready for review January 30, 2026 00:42

@mojomex mojomex 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.

Looking good! Some small feedback:

Comment thread docs/tutorials/render.md Outdated
Comment thread t4_devkit/helper/rendering.py
@ktro2828

Copy link
Copy Markdown
Collaborator Author

NOTE: Supporting segmentation visualization in render_pointcloud(...) makes the code complicated, so I skip this time. I would address in the future if needed.

ktro2828 and others added 8 commits January 30, 2026 16:27
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>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
…xceptions

Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
@ktro2828 ktro2828 force-pushed the feat/viewer/lidarseg branch from 0f9c924 to bdce10f Compare January 30, 2026 07:27

@mojomex mojomex 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.

The ✅ in README.md and docs/index.md is missing for lidarseg.
Otherwise looking good!

It looks like your rebase/force-push destroyed some of my changes from #256, e.g.:

  • 966e90b - fix infinite loop
  • 85f78e2 - ✅ in README.md and docs/index.md for lidarseg

@ktro2828

Copy link
Copy Markdown
Collaborator Author

@mojomex Sorry for making you confused 🙏 It seems the commit you mentioned has been included! Please try checking again!
(I confirmed it works without any exceptions)

Screenshot from 2026-01-30 18-42-52

@mojomex mojomex 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.

Works perfectly!
I left a few nit-picky comments but the PR overall looks very good. Feel free to merge anytime.

Comment thread t4_devkit/viewer/viewer.py Outdated
Comment thread t4_devkit/viewer/viewer.py Outdated
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
Copilot AI review requested due to automatic review settings February 2, 2026 22:25

Copilot AI 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.

Pull request overview

This pull request adds support for rendering LiDAR segmentation point clouds in the viewer, improves compatibility with different dataset revisions by handling category indices correctly, and makes map rendering more robust by checking for file existence.

Changes:

  • Added SEGMENTATION color mode and rendering support for LiDAR segmentation point clouds with automatic mode selection based on data availability
  • Introduced fix_category_table to ensure consistent category index handling across dataset revisions
  • Updated documentation and UI to reflect the new segmentation rendering capability

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
t4_devkit/viewer/viewer.py Added segmentation pointcloud rendering support with conditional logic for handling segmentation data
t4_devkit/viewer/color.py Added SEGMENTATION enum value to PointCloudColorMode
t4_devkit/helper/rendering.py Implemented automatic segmentation detection, updated rendering methods to support segmentation mode, and added error handling for futures
docs/tutorials/render.md Added tutorial section for rendering LiDAR segmentation with code examples
docs/index.md Updated feature table to mark PointCloud Segmentation as supported
README.md Updated feature table to mark PointCloud Segmentation as supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread t4_devkit/viewer/color.py
Comment thread t4_devkit/helper/rendering.py
Comment thread t4_devkit/helper/rendering.py
@ktro2828 ktro2828 merged commit a62b4b3 into main Feb 2, 2026
0 of 5 checks passed
@ktro2828 ktro2828 deleted the feat/viewer/lidarseg branch February 2, 2026 22:26
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