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

add a way to orient based on main direction of the surface #3364

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

hoanhle
Copy link
Contributor

@hoanhle hoanhle commented Aug 14, 2024

essentially implement #1887

toy problem visualization
image

orientation_method == "up" Screencast from 08-26-2024 01:31:40 PM.webm

orientation_method == "align" Screencast from 08-26-2024 12:53:25 PM.webm

@hoanhle hoanhle changed the title add a way to orient based on main direction of the flat surface add a way to orient based on main direction of the surface Aug 14, 2024
@jb-ye
Copy link
Collaborator

jb-ye commented Aug 15, 2024

@hoanhle Could you share a sample visualization of this new orientation method?

@hoanhle hoanhle force-pushed the feature/implement_a_new_orientation_method branch from 5dd54b1 to 50863bf Compare August 26, 2024 10:36
Copy link
Collaborator

@jb-ye jb-ye left a comment

Choose a reason for hiding this comment

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

I feel major refactor of current nerfstudio parser are needed to achieve a clean separation between orientation logics from data parsing.

(1) Currently orientation and centering logics is simply go through helper function: camera_utils.auto_orient_and_center_poses. This is important, because the same helper function is used in multiple parsers (e.g. colmap parser, etc). The current PR only applies to one specific parser and it makes maintaining these logics much more difficult.

(2) Because the new align method depends on the point cloud loaded from PLY, we need to first load point cloud (if they exist) and then compute orientation transforms. This require some refactor of existing codes.

As such, I feel the current PR is not ready to merge until (1) and (2) are addressed.

"vertical",
"align",
"none",
] = "vertical"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should you keep the default method be "up"?

@@ -258,6 +270,7 @@ def _generate_dataparser_outputs(self, split="train"):

# in x,y,z order
# assumes that the scene is centered at the origin
# _ = self.config.scene_scale
Copy link
Collaborator

Choose a reason for hiding this comment

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

delete this comment?

@hoanhle
Copy link
Contributor Author

hoanhle commented Aug 27, 2024

I feel major refactor of current nerfstudio parser are needed to achieve a clean separation between orientation logics from data parsing.

(1) Currently orientation and centering logics is simply go through helper function: camera_utils.auto_orient_and_center_poses. This is important, because the same helper function is used in multiple parsers (e.g. colmap parser, etc). The current PR only applies to one specific parser and it makes maintaining these logics much more difficult.

(2) Because the new align method depends on the point cloud loaded from PLY, we need to first load point cloud (if they exist) and then compute orientation transforms. This require some refactor of existing codes.

As such, I feel the current PR is not ready to merge until (1) and (2) are addressed.

@jb-ye This makes sense to me. I will proceed with the refactoring unless you know of a simpler way to achieve the same result.

@jb-ye
Copy link
Collaborator

jb-ye commented Aug 27, 2024

@hoanhle That would be great, I'd love to help review your change once they are ready.

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