Skip to content

Apply PCA camera normalization as one proper rigid transform - #3794

Open
Afloat16 wants to merge 1 commit into
nerfstudio-project:mainfrom
Afloat16:fix/pca-pose-rigid-transform
Open

Afloat16 wants to merge 1 commit into
nerfstudio-project:mainfrom
Afloat16:fix/pca-pose-rigid-transform

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 2, 2026 •

Copy link
Copy Markdown

PCA camera normalization currently applies the column eigenvectors as a world rotation. For covariance C = Q diag(lambda) Q^T, the rotation into principal-axis coordinates is Q^T, so using Q leaves the transformed camera-center covariance nondiagonal and can assign the smallest-variance axis to the wrong world direction.

The up-direction correction also indexes oriented_poses[1:3, :], selecting cameras 1 and 2 instead of rows 1 and 2 of every camera. Negating those entire 3x4 camera blocks produces improper rotations with determinant -1 and breaks the invariant oriented_poses = transform @ poses. This is a follow-up to the indexing change in #3441 / #3417.

Use the transposed principal-axis basis and apply the existing Y/Z row correction across all cameras. The returned transform and camera poses then describe one proper rigid change of world coordinates.

Validation: Windows CPU, Python 3.12.10, Torch 2.7.1+cpu and Open3D 0.19.0; project-pinned pytest 7.1.2 and xdist 2.5.0.

Full repository Ruff 0.12.2 lint/format, Pyright 1.1.331 (203 files, 0 errors, 16 identical baseline warnings), native license checks, notebook metadata checks, and the Sphinx 5.2.1 warnings-as-errors build all pass.

The complete pytest suite with the repository's original configuration reports 93 passed / 2 failed, compared with 81 passed / 2 failed on upstream 50e0e3c. All 12 added regression cases pass. Both failures are identical pre-existing Windows failures in test_deserialize_config1 and test_deserialize_config2: their YAML fixtures instantiate pathlib.PosixPath. No tests were skipped, deselected, or modified.

The component tools were invoked directly because ns-dev-test uses Linux shell command strings. This does not establish a fully green ns-dev-test run; GPU behavior remains untested.

Remote CI update (October 3): the documentation check succeeds, but the build run stops at Pyright after resolving Open3D 0.20.0. Its 19 diagnostics occur in unchanged data parsers, processing utilities, and exporters. The same diagnostics occur in the build for independent PR #3790, whose single COLMAP parsing change is based on the same upstream commit. This comparison supports a dependency compatibility problem; the remote pytest step was skipped, so it does not establish passing remote tests.

The Docker run fails while building the pinned tiny-cuda-nn dependency with ModuleNotFoundError: No module named 'pkg_resources', before installing Nerfstudio source. PR #3790's Docker run shows the same failure. Both CI gates remain failed.

This branch has not been deployed

No deployments
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.

1 participant