Skip to content
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

Merged
merged 5 commits into from
Apr 29, 2024
Merged

Adding cropping for gaussian splat exports #3105

merged 5 commits into from
Apr 29, 2024

Conversation

THE-COB
Copy link
Contributor

@THE-COB THE-COB commented Apr 25, 2024

  • Enabled obb in the viewer command generation
  • Added obb support in the export

@THE-COB THE-COB requested review from cvachha and kerrj April 25, 2024 00:34
@@ -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)
Copy link
Collaborator

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

Copy link
Contributor Author

@THE-COB THE-COB Apr 25, 2024

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?

Copy link
Collaborator

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?

Copy link
Collaborator

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 to None
  • 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!

Copy link
Contributor Author

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

Copy link
Contributor Author

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


n = map_to_tensors["x"].shape[0]
count = n
elif self.use_bounding_box:
Copy link
Collaborator

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

@kerrj
Copy link
Collaborator

kerrj commented Apr 25, 2024

solves #3042

Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@kerrj kerrj enabled auto-merge (squash) April 29, 2024 16:55
@kerrj kerrj merged commit f046cea into main Apr 29, 2024
2 checks passed
@kerrj kerrj deleted the rohan/crop-splat branch April 29, 2024 17:05
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.

None yet

3 participants