Skip to content

Commit

Permalink
Dnerf viewer and training fix (#1065)
Browse files Browse the repository at this point in the history
* dnerf viewer and training fix

* Update viewer_utils.py
  • Loading branch information
myaldiz authored Dec 1, 2022
1 parent 8c3f093 commit 1437a2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nerfstudio/cameras/cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _generate_rays_from_coords(
pixel_area = (dx * dy)[..., None] # ("num_rays":..., 1)
assert pixel_area.shape == num_rays_shape + (1,)

times = self.times[camera_indices, None] if self.times is not None else None
times = self.times[camera_indices, 0] if self.times is not None else None

return RayBundle(
origins=origins,
Expand Down
2 changes: 1 addition & 1 deletion nerfstudio/viewer/server/viewer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ def _render_image_in_viewer(self, camera_object, graph: Model, is_training: bool
)

times = self.vis["renderingState/render_time"].read()
if times:
if times is not None:
times = torch.tensor([float(times)])

camera = Cameras(
Expand Down

0 comments on commit 1437a2f

Please sign in to comment.