Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dnerf viewer and training fix #1065

Merged
merged 2 commits into from
Dec 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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