Add world_up config flag so Y-up scenes render right-side up - #5
Open
alexmgee wants to merge 1 commit into
Open
Conversation
The camera up-vector in _lookat was hardcoded to [0,1,0], which is
correct for standard Y-down 3DGS/COLMAP scenes but renders every view
upside down for Y-up scenes (some exporters and converted .spz files),
silently collapsing detections to orientation-tolerant classes.
Adds PipelineConfig.world_up ("y-down" default, behavior unchanged;
"y-up" flips the camera up-vector to [0,-1,0]), threaded through the
run_local.py / pipeline.py / render_cameras.py CLIs and the
/api/v1/detect form param with the same validation pattern as quality.
README documents the new parameter and offers it as the remedy in the
orientation warning.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #4
What
Adds an opt-in
world_upsetting so splats stored with a Y-up world axis render upright instead of upside down. Default ("y-down", the standard 3DGS/COLMAP convention) leaves current behavior byte-for-byte unchanged.config.py-PipelineConfig.world_up: str = "y-down"plus aWORLD_UP_CHOICESconstant (single source of truth for CLI + API validation, same asQUALITY_PRESETS)render_cameras.py-_build_poses()picks the camera up-vector fromworld_up([0,1,0]for y-down,[0,-1,0]for y-up) and passes it to_lookat; the standalone CLI gains--world_uprun_local.py/pipeline.py---world_up {y-down,y-up}argparse flags, threaded throughPipelineConfig.from_overridesexactly likescore_thresholdserver.py-world_upform param on/api/v1/detectwith a 400 on invalid values (mirrors thequalitycheck), passed through thepipeline.pysubprocess call, included in the job log linesREADME.md- parameter table row + the orientation warning now offers the flag as the remedy instead of re-exporting the fileWhy
In the OpenCV-convention c2w built by
_lookat, image-down for a level view equals theupargument, so it must point at the scene's floor. The hardcoded[0,1,0]is correct for Y-down scenes but renders every view upside down for Y-up scenes, and detections silently collapse to orientation-tolerant classes. On a real 5.08M-splat Y-up indoor scene (medium quality, 12-label prompt, identical gates), fixing orientation took raw OWLv2 detections from 663 to 1,255 and default-gate clusters from 3 (1 label) to 12 (6 labels) - full numbers and mechanism in #4.Design notes
min_peak_scorewhich is also API-only today. Happy to add a form control if you'd like it exposed there.world_upto describe the scene's up-axis convention; happy to rename (up_axis?) if you prefer.Testing
[0,1,0]undery-downand[0,-1,0]undery-up; default poses are identical to pre-change output; rotations stay orthonormal.world_up→ 400 naming the valid choices;y-upreaches the pipeline subprocess argv; omitted → defaulty-down.mediumruns on the real Y-up scene produced the before/after numbers above.