feat(viewer): add support of rendering pointcloud segmentation#261
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
mojomex
left a comment
There was a problem hiding this comment.
Looking good! Some small feedback:
|
NOTE: Supporting segmentation visualization in |
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>
0f9c924 to
bdce10f
Compare
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
There was a problem hiding this comment.
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
SEGMENTATIONcolor mode and rendering support for LiDAR segmentation point clouds with automatic mode selection based on data availability - Introduced
fix_category_tableto 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.

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:
SEGMENTATIONcolor mode toPointCloudColorModeand support for rendering LiDAR segmentation point clouds in the viewer via the newrender_lidarsegmethod inviewer.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_tableinschema/compatibility.pyto 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
indexfield directly, instead of relying on list position, ensuring consistency across different dataset revisions. [1] [2]Documentation and UI Updates:
README.md,docs/index.md, anddocs/tutorials/render.mdto 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.