Update exporter.py to export sh_degree 0 case#3371
Closed
bell-one wants to merge 1 commit intonerfstudio-project:mainfrom
bell-one:main
Closed
Update exporter.py to export sh_degree 0 case#3371bell-one wants to merge 1 commit intonerfstudio-project:mainfrom bell-one:main
bell-one wants to merge 1 commit intonerfstudio-project:mainfrom
bell-one:main
Conversation
Current exporter with sh_degree 0 gives color values instead of spherical harmonics coefficients
This was referenced Aug 20, 2024
brentyi
added a commit
that referenced
this pull request
Aug 28, 2024
* Update exporter.py for sh_degree 0 Change to write sh coefficients instead of color values * Add flag for use_sh0_renderer Add sh0 renderer case for model.config.sh_degree == 0 * fix ruff * add warning if use_sh0_renderer is used when higher order of SH is available * fix rgb export for color-only training * use ply_color_mode * better handling ply_color_mode=='rgb' when sh_degree>0 * clean RGB2SH * fix issues * update description --------- Co-authored-by: bell-one <bellone1991@gmail.com> Co-authored-by: Jianbo Ye <jianboye@amazon.com> Co-authored-by: Brent Yi <yibrenth@gmail.com>
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.
Current exporter with sh_degree 0 gives color values instead of spherical harmonics coefficients
Which cannot be rendered with sh_degree 0 renderers such as WebGL Viewer by antimatter15
Current exporter's ply

Edited exporter's ply

If directly reference shs_0 value with model.shs_0, it makes infinity values and check
If a model trained with sh degree 0 is directly referenced as model.shs_0 in the exporter,
an infinite value occurs, so the cases are divided and recover sh value with colors.