moving around files (#616)

moved around files
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-10-02 16:54:34 -07:00
1 parent 9d15ba6a2a
commit c20fed83bb
61 files changed
+226 -332

No files matched your search

+5 -5
View File
@@ -1,15 +1,15 @@
"""
Test visualizations
Test colormaps
"""
import torch
from nerfstudio.utils import visualization
from nerfstudio.utils import colormaps
def test_apply_colormap():
"""Test adding a colormap to data"""
data = torch.rand((10, 20, 1))
colored_data = visualization.apply_colormap(data)
colored_data = colormaps.apply_colormap(data)
assert colored_data.shape == (10, 20, 3)
assert torch.min(colored_data) >= 0
@@ -21,7 +21,7 @@ def test_apply_depth_colormap():
data = torch.rand((10, 20, 1))
accum = torch.rand((10, 20, 1))
accum = accum / torch.max(accum)
colored_data = visualization.apply_depth_colormap(depth=data, accumulation=accum)
colored_data = colormaps.apply_depth_colormap(depth=data, accumulation=accum)
assert colored_data.shape == (10, 20, 3)
assert torch.min(colored_data) >= 0
@@ -32,7 +32,7 @@ def test_apply_boolean_colormap():
"""Test adding a colormap to boolean data"""
data = torch.rand((10, 20, 1))
data = data > 0.5
colored_data = visualization.apply_boolean_colormap(data)
colored_data = colormaps.apply_boolean_colormap(data)
assert colored_data.shape == (10, 20, 3)
assert torch.min(colored_data) >= 0