This commit is contained in:
Matt Tancik committed 2023-03-22 14:37:05 -07:00
1 parent 6db1d314cc
commit 3ec8c06e83
7 files changed
+18 -1

No files matched your search

+1
View File
@@ -101,6 +101,7 @@ class Model(nn.Module):
# NOTE: call `super().populate_modules()` in subclasses
if self.config.enable_collider:
assert self.config.collider_params is not None
self.collider = NearFarCollider(
near_plane=self.config.collider_params["near_plane"], far_plane=self.config.collider_params["far_plane"]
)
+3
View File
@@ -90,6 +90,8 @@ class TensoRFModel(Model):
config: TensoRF configuration to instantiate model
"""
config: TensoRFModelConfig
def __init__(
self,
config: TensoRFModelConfig,
@@ -303,6 +305,7 @@ class TensoRFModel(Model):
image = batch["image"].to(outputs["rgb"].device)
rgb = outputs["rgb"]
acc = colormaps.apply_colormap(outputs["accumulation"])
assert self.config.collider_params is not None
depth = colormaps.apply_depth_colormap(
outputs["depth"],
accumulation=outputs["accumulation"],
+1
View File
@@ -201,6 +201,7 @@ class NeRFModel(Model):
rgb_fine = outputs["rgb_fine"]
acc_coarse = colormaps.apply_colormap(outputs["accumulation_coarse"])
acc_fine = colormaps.apply_colormap(outputs["accumulation_fine"])
assert self.config.collider_params is not None
depth_coarse = colormaps.apply_depth_colormap(
outputs["depth_coarse"],
accumulation=outputs["accumulation_coarse"],