-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adding cropping for gaussian splat exports #3105
Conversation
THE-COB
commented
Apr 25, 2024
- Enabled obb in the viewer command generation
- Added obb support in the export
nerfstudio/scripts/exporter.py
Outdated
@@ -491,6 +491,20 @@ class ExportGaussianSplat(Exporter): | |||
Export 3D Gaussian Splatting model to a .ply | |||
""" | |||
|
|||
use_bounding_box: Optional[bool] = False | |||
"""Only query points within the bounding box""" | |||
bounding_box_min: Optional[Tuple[float, float, float]] = (-1, -1, -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can safely get rid of the old style min/max bounding box code, OBB should be the new way of defining bounding boxes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we still keep the use_bounding_box parameter or just check if the obb is None? Also should I get rid of it in the standard NeRF exporter as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having the boolean is useful for toggling is more easily from the command line so maybe let's keep it. I'd be in favor of removing the old min/max code from the other export too, @brentyi what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having the boolean is useful for toggling is more easily from the command line so maybe let's keep it.
To me it seems cleaner to:
- default the
obb
parameter toNone
- remove the boolean since it's redundant
I'd be in favor of removing the old min/max code from the other export too
+1 for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I'll do that tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I have done it
nerfstudio/scripts/exporter.py
Outdated
|
||
n = map_to_tensors["x"].shape[0] | ||
count = n | ||
elif self.use_bounding_box: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, can get rid of the old version
solves #3042 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks!