Skip to content

GARfVDB Training Visualization Fixes#59

Merged
swahtz merged 15 commits into
openvdb:mainfrom
swahtz:fix/garfvdb_vis
Apr 1, 2026
Merged

GARfVDB Training Visualization Fixes#59
swahtz merged 15 commits into
openvdb:mainfrom
swahtz:fix/garfvdb_vis

Conversation

@swahtz

@swahtz swahtz commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the integration of GARfVDB with the nanovdb-editor's overlay rendering feature. This has several correctness fixes as well as fixes for crashes which are dependent on merging openvdb/nanovdb-editor#166 first to be able to utilize.

swahtz added 8 commits March 16, 2026 13:04
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…te the image_view on first add_image

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…eckpoint

- Adjusted overlay width to 1440 and height to 720 to match the nanovdb-editor viewport for correct alignment.
- Removed unused original training image size assertions and added handling for field of view (FOV) changes in camera state checks.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
@swahtz swahtz marked this pull request as ready for review March 31, 2026 03:28
@swahtz swahtz requested a review from Copilot March 31, 2026 03:28

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 PR fixes GARfVDB’s integration with nanovdb-editor overlay rendering by aligning overlay projection with the viewer camera (via FOV), adjusting defaults to match the editor viewport, and addressing a known fvdb JaggedTensor shape edge case that could break feature aggregation.

Changes:

  • Update overlay rendering in view_checkpoint.py and train_segmentation.py to derive intrinsics from the viewer FOV and adjust default overlay dimensions for correct viewport alignment.
  • Reorder viewer initialization to avoid Vulkan/CUDA initialization-order crashes; make overlay creation safer (lazy creation in checkpoint viewer).
  • Fix GARfVDBModel.get_encoded_features() aggregation when fvdb returns a 1-level jagged tensor.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
instance_segmentation/garfvdb/view_checkpoint.py Viewer init moved earlier; overlay now lazily created; projection derived from viewer FOV; camera-change tracking updated to include FOV.
instance_segmentation/garfvdb/train_segmentation.py Viewer init reordered (before CUDA); overlay defaults updated; overlay projection derived from viewer FOV; visualization callback wiring refactored.
instance_segmentation/garfvdb/garfvdb/model.py Guard jsum to avoid incorrect reduction when fvdb returns a 1-level JaggedTensor.
instance_segmentation/garfvdb/garfvdb_environment.yml Update environment dependencies (compiler/tooling + additional packages).
.gitignore Ignore .ply data files.

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

Comment thread instance_segmentation/garfvdb/train_segmentation.py Outdated
Comment thread instance_segmentation/garfvdb/train_segmentation.py Outdated
Comment thread instance_segmentation/garfvdb/train_segmentation.py
Comment thread instance_segmentation/garfvdb/train_segmentation.py Outdated
Comment thread instance_segmentation/garfvdb/view_checkpoint.py
swahtz added 7 commits April 1, 2026 11:57
… handling for inverse calculation in train_segmentation.py

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
- Moved the visualization callback assignment to the runner creation in train_segmentation.py.
- Added getter and setter for the visualization callback in GaussianSplatScaleConditionedSegmentation class to improve encapsulation.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…I to prevent further attempts.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…nerate camera states, preventing potential errors during rendering.

- Added checks for zero-length vectors in eye direction, right, and up vectors to ensure valid transformations.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
…ting the segmentation overlay image fails, providing clearer feedback on the issue and disabling overlay visualization for the session.

Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
@swahtz swahtz enabled auto-merge (squash) April 1, 2026 00:23
@swahtz swahtz disabled auto-merge April 1, 2026 00:23
@swahtz swahtz merged commit d45ac93 into openvdb:main Apr 1, 2026
8 checks passed
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