mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-25 18:39:55 +08:00
Cleanup
This commit is contained in:
1 parent
6db1d314cc
commit
3ec8c06e83
7 files changed
+18
-1
No files matched your search
@@ -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"]
|
||||
)
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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"],
|
||||
|
||||
Reference in new issue
Block a user