mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-27 11:30:11 +08:00
Switch from point samples to frustum samples
This commit is contained in:
1 parent
609bf32d22
commit
1b20028ea3
17 files changed
+255
-102
No files matched your search
@@ -62,12 +62,12 @@ def test_depth_renderer():
|
||||
weights = torch.ones((3, num_samples))
|
||||
weights /= torch.sum(weights, axis=-1, keepdim=True)
|
||||
|
||||
ts = torch.linspace(0, 100, num_samples)
|
||||
ts = torch.stack([ts, ts, ts], dim=0)
|
||||
bins = torch.linspace(0, 100, num_samples + 1)
|
||||
bins = torch.stack([bins, bins, bins], dim=0)
|
||||
|
||||
depth_renderer = renderers.DepthRenderer()
|
||||
|
||||
depth = depth_renderer(weights=weights, ts=ts)
|
||||
depth = depth_renderer(weights=weights, bins=bins)
|
||||
assert torch.min(depth) > 0
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user