-
Notifications
You must be signed in to change notification settings - Fork 20
GARfVDB #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
swahtz
wants to merge
39
commits into
openvdb:main
Choose a base branch
from
swahtz:garfvdb
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GARfVDB #308
Changes from 23 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
601285e
Add first-class GARfVDB instance segmentation with portable NanoVDB a…
swahtz 1117de4
Switch CDF to be calculated on data load and not stored in the SAM2 a…
swahtz a1dc408
Add interactive GARfVDB feature-overlay viewer with live controls
swahtz 5d6418c
Merge branch 'main' into garfvdb
swahtz c77005f
Restore changes
swahtz 52c7a74
Fix imports from fvdb-core -> fvdb_reality_capture move
swahtz dc8cb76
Format fix
swahtz 27c2067
Update docs/api/frgs/mesh_basic.rst
swahtz d379fcb
Update docs/api/frgs/mesh_dlnr.rst
swahtz 1573d72
Update docs/api/frgs.rst
swahtz f6ea5f6
Update docs/api/frgs.rst
swahtz cd5f4e2
Update docs/tutorials/instance_segmentation.rst
swahtz eae2e78
Rename "carrier" to "gaussians" in the GARfVDB integration
swahtz 1a7208b
Add .garfvdb to gitignore
swahtz 09ce838
Rename checkpoint "envelope" to "container"
swahtz de91da8
Fix grammar in parse_training_checkpoint docstring
swahtz af4e61b
Document the container schema vs. method version axes
swahtz 5f708f8
Change default image downsample factor to 4 to match reconstruction
swahtz 9a71e02
Add safetensors to docs requirements
swahtz d70720e
Fix mask-selection CDF: index probabilities by mask id, drop -1 padding
swahtz f12232e
Fix JPEG rescale, Resize intrinsics, retry counter, and doc indentation
swahtz a939db5
Convert SAM2 inputs to RGB, apply true 3x3 mask erosion, and keep Gau…
swahtz 497d04a
Apply optimized reconstruction poses before mask generation, persist …
swahtz 1d8606f
Fix docs build
swahtz 5d171e5
Docs build fix
swahtz f430322
Docs build fix
swahtz 2198553
Fix device-mismatch and empty-render-target edge cases (Copilot review)
swahtz 3f78149
Import SummaryWriter lazily so the package imports without tensorboard
swahtz ecd4bb6
Fix GARfVDB artifact tests for the rebuilt fvdb
swahtz a364be4
Formatting fix
swahtz 413de1e
Fix mask-CDF degenerate case and HSV->RGB conversion (Copilot review)
swahtz 8cb9473
Fix ExponentialLRWithRampUpScheduler.get_lr() divide by zero when max…
swahtz 3fb96a1
Fix viewer pca input checking.
swahtz 44e4216
Guard mask-id -1 padding in scale lookups (Copilot review)
swahtz d1743fa
Fix orbit radius and document conditional PCA return shapes (Copilot …
swahtz c99fb9f
Add polling timeout for FileLock on worker threads (Copilot review)
swahtz b517274
Fix --viewer-ip-address help text (Copilot review)
swahtz 45373b9
Merge branch 'main' into garfvdb
swahtz 66dcd5b
Rename frgs instance-segmentation command to segment-instances
swahtz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,3 +78,4 @@ tests/data/ | |
| *.h264 | ||
| *.mp4 | ||
| *.ipynb_checkpoints | ||
| *.garfvdb | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| Training checkpoints | ||
| ==================== | ||
|
|
||
| Reality Capture training checkpoints use a method-neutral, versioned container. The container identifies the stable | ||
| method ID and keeps method-owned optimizer, dataset, and model state inside ``state``. Product extensions such as | ||
| ``.garfvdb`` are not used for resume dispatch. | ||
|
|
||
| Each method owns its method ID and any adapter for checkpoints written before the container was introduced. The | ||
| ``frgs resume`` command separately owns resume-handler registration and output defaults, keeping CLI policy out of | ||
| the serialization layer. | ||
|
|
||
| Container schema versus method | ||
| ------------------------------ | ||
|
|
||
| A checkpoint carries two independent versions — one for the outer container and one for the method payload inside | ||
| it — on orthogonal axes: | ||
|
|
||
| - ``schema`` / ``schema_version`` version the **container format itself**: the fixed set of top-level keys | ||
| (``schema``, ``schema_version``, ``method``, ``method_version``, ``state``) and how they are parsed. ``schema`` is | ||
| a constant string shared by every method, and ``schema_version`` is owned centrally by | ||
| :mod:`fvdb_reality_capture.checkpoints` and selects the reader used to parse the container. Bump it only when the | ||
| container structure changes, which affects every method at once. Nothing method-specific lives at this level. | ||
| - ``method`` / ``method_version`` version the **method-owned payload** carried in ``state``. ``method`` is the stable | ||
| identifier of the training method that produced the checkpoint (for example ``radiance_fields.gaussian_splat`` or | ||
| ``instance_segmentation.garfvdb``) and is the dispatch key used on resume. ``method_version`` versions that | ||
| method's ``state`` layout and is owned by the method's package as a single source of truth, so the writer's | ||
| recorded version and the method's ``state_dict``/``from_state_dict`` cannot drift. Bump it only when that one | ||
| method's ``state`` changes, independently of other methods. | ||
|
|
||
| Everything method-specific — model weights, optimizer and scheduler state, configuration, global step, and method | ||
| metadata — lives inside ``state`` and is opaque to the container layer; only the method interprets it. Because the | ||
| axes are independent, the container can stay at one ``schema_version`` while different methods evolve their | ||
| ``method_version`` separately, and restructuring the container advances ``schema_version`` regardless of any method. | ||
|
|
||
| .. automodule:: fvdb_reality_capture.checkpoints | ||
| :members: TrainingCheckpoint, create_training_checkpoint, load_training_checkpoint, | ||
| parse_training_checkpoint, register_legacy_checkpoint_adapter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| .. code-block:: text | ||
|
|
||
| usage: frgs instance-segmentation [-h] [INSTANCE-SEGMENTATION OPTIONS] PATH | ||
|
|
||
| Train a GARfVDB scale-conditioned instance feature field from an existing Reality Capture reconstruction. | ||
|
|
||
| Example: | ||
|
|
||
| frgs instance-segmentation ./colmap_dataset \ | ||
| --reconstruction-path scene.ply \ | ||
| --out-path scene.garfvdb | ||
|
|
||
| Required inputs are the original posed-image dataset and the matching Reality Capture PLY or checkpoint. | ||
| The output is a portable directory containing NanoVDB encoder grids, safetensors network weights, and the | ||
| exact filtered Gaussian model. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| Instance segmentation | ||
| ===================== | ||
|
|
||
| Portable bundle format | ||
| ---------------------- | ||
|
|
||
| ``.garfvdb`` manifests use the schema name ``fvdb_reality_capture.garfvdb`` and an integer ``schema_version``. | ||
| The current version is available as :data:`ARTIFACT_SCHEMA_VERSION`. Loaders select an exact version-specific | ||
| reader and raise :class:`GARfVDBArtifactVersionError` for unsupported versions. | ||
|
|
||
| GARfVDB | ||
| ------- | ||
|
|
||
| .. currentmodule:: fvdb_reality_capture.instance_segmentation | ||
|
|
||
| .. autoclass:: GARfVDB | ||
| :members: | ||
|
|
||
| .. autoclass:: GARfVDBTrainer | ||
| :members: new, from_state_dict, from_checkpoint_file, train, to_product, state_dict | ||
|
|
||
| .. autoclass:: GARfVDBConfig | ||
| :members: | ||
|
|
||
| .. autoclass:: GARfVDBTrainingConfig | ||
| :members: | ||
|
|
||
| .. autoclass:: GARfVDBTransformConfig | ||
| :members: | ||
|
|
||
| .. autoclass:: GARfVDBMaskAttribute | ||
| :members: | ||
|
|
||
| .. autoclass:: GenerateGARfVDBMasks | ||
| :members: | ||
|
|
||
| .. autoexception:: GARfVDBArtifactError | ||
|
|
||
| .. autoexception:: GARfVDBArtifactVersionError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.