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

Update exporter.py to export sh_degree 0 case #3371

Closed
wants to merge 1 commit into from
Closed

Update exporter.py to export sh_degree 0 case #3371

wants to merge 1 commit into from

Conversation

bell-one
Copy link
Contributor

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
image

Edited exporter's ply
image

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.

Current exporter with sh_degree 0 gives color values instead of spherical harmonics coefficients
@bell-one bell-one closed this Aug 19, 2024
@bell-one bell-one deleted the main branch August 19, 2024 10:26
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 <[email protected]>
Co-authored-by: Jianbo Ye <[email protected]>
Co-authored-by: Brent Yi <[email protected]>
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