mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-21 15:15:43 +08:00
Move util functions out of splatfacto (#3538)
* Move util functions out of splatfacto Nothing else currently uses some of the SH utils, but it might make sense to get them out of splatfacto. I also moved the k nearest neighbors to utils since it doesn't depend on the model class. * fix assert * fix sh test * convert to using degrees, not levels
This commit is contained in:
1 parent
e8bf472692
commit
a8888e7d9e
8 files changed
+207
-181
No files matched your search
@@ -125,11 +125,11 @@ def test_tensor_cp_encoder():
|
||||
def test_tensor_sh_encoder():
|
||||
"""Test Spherical Harmonic encoder"""
|
||||
|
||||
levels = 4
|
||||
levels = 5
|
||||
out_dim = levels**2
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
encoder = encodings.SHEncoding(levels=5)
|
||||
encoder = encodings.SHEncoding(levels=6)
|
||||
|
||||
encoder = encodings.SHEncoding(levels=levels)
|
||||
assert encoder.get_out_dim() == out_dim
|
||||
|
||||
Reference in new issue
Block a user