Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Data
*.ply

# Generated version file
fvdb/version.py

Expand Down
7 changes: 6 additions & 1 deletion instance_segmentation/garfvdb/garfvdb/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,12 @@ def get_encoded_features(self, input: GARfVDBInput) -> torch.Tensor:
if not self.model_config.enc_feats_one_idx_per_ray:
# Weighted sum of the enc_feats and transmittance weights
enc_feats.jdata = enc_feats.jdata * weights.jdata.unsqueeze(-1)
enc_feats = enc_feats.jsum(dim=0, keepdim=True)
# When every pixel has exactly 1 contributor, fvdb returns a
# 1-level JaggedTensor [C,[R]] instead of 2-level [C,[R,[K]]].
# jsum(dim=0) on a 1-level tensor would collapse pixels within
# each camera rather than depth samples within each pixel.
if isinstance(enc_feats.lshape[0], list):
enc_feats = enc_feats.jsum(dim=0, keepdim=True)

epsilon = 1e-6
enc_feats.jdata = enc_feats.jdata / (torch.linalg.norm(enc_feats.jdata, dim=-1, keepdim=True) + epsilon)
Expand Down
11 changes: 11 additions & 0 deletions instance_segmentation/garfvdb/garfvdb/training/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,17 @@ def device(self) -> torch.device:
return torch.device(dev)
return dev

@property
def viz_callback(self) -> Callable[["GaussianSplatScaleConditionedSegmentation", int], None] | None:
"""Get or set the visualization callback invoked at epoch boundaries."""
return self._viz_callback

@viz_callback.setter
def viz_callback(
self, callback: Callable[["GaussianSplatScaleConditionedSegmentation", int], None] | None
) -> None:
self._viz_callback = callback

@staticmethod
def _init_model(
model_config: GARfVDBModelConfig,
Expand Down
12 changes: 10 additions & 2 deletions instance_segmentation/garfvdb/garfvdb_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ channels:
- conda-forge
- nodefaults
dependencies:
- fvdb-core>=0.4.2,<0.5.0
- cxx-compiler
- blas=*=mkl
- python=3.12
- pytorch-gpu=2.8.0
- cuda-version=12.9
- pytorch-gpu=2.10.0
- cuda-version>=12.9
- pip
- git
- gitpython
Expand All @@ -16,6 +18,8 @@ dependencies:
- tyro
- scikit-learn
- py-opencv
- open-clip-torch
- openusd
- imageio
- sam2
- pyproj
Expand All @@ -32,3 +36,7 @@ dependencies:
- rapidsai::cuml
- cupy
- matplotlib
- pip:
- dlnr_lite
- fvdb-reality-capture>=0.4.0<0.5.0
- nanovdb-editor>=0.0.24
5 changes: 3 additions & 2 deletions instance_segmentation/garfvdb/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ dependencies = [
"tqdm",
"tyro",
"tensorboard",
"fvdb-core",
"fvdb-reality-capture",
"fvdb-core>=0.4.2,<0.5.0",
"nanovdb-editor>=0.0.24,<0.2.0",
"fvdb-reality-capture>=0.4.0<0.5.0",
"pycocotools",
"matplotlib",
"pillow",
Expand Down
Loading
Loading