mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-04 23:08:44 +08:00
1 parent
7280541350
commit
7346f97590
2 files changed
+5
-4
No files matched your search
@@ -244,7 +244,7 @@ class Cameras(TensorDataclass):
|
|||||||
if times.ndim == 0 or times.shape[-1] != 1:
|
if times.ndim == 0 or times.shape[-1] != 1:
|
||||||
times = times.unsqueeze(-1).to(self.device)
|
times = times.unsqueeze(-1).to(self.device)
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"times must be a tensor, got {type(times)}")
|
raise ValueError(f"times must be None or a tensor, got {type(times)}")
|
||||||
|
|
||||||
return times
|
return times
|
||||||
|
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ class ViewerState:
|
|||||||
# set the initial state whether to train or not
|
# set the initial state whether to train or not
|
||||||
self.vis["renderingState/isTraining"].write(start_train)
|
self.vis["renderingState/isTraining"].write(start_train)
|
||||||
|
|
||||||
self.vis["renderingState/render_time"].write(str(0))
|
# self.vis["renderingState/render_time"].write(str(0))
|
||||||
|
|
||||||
# set the properties of the camera
|
# set the properties of the camera
|
||||||
# self.vis["renderingState/camera"].write(json_)
|
# self.vis["renderingState/camera"].write(json_)
|
||||||
@@ -756,8 +756,9 @@ class ViewerState:
|
|||||||
dim=0,
|
dim=0,
|
||||||
)
|
)
|
||||||
|
|
||||||
times = float(self.vis["renderingState/render_time"].read())
|
times = self.vis["renderingState/render_time"].read()
|
||||||
times = torch.tensor([times])
|
if times:
|
||||||
|
times = torch.tensor([float(times)])
|
||||||
|
|
||||||
camera = Cameras(
|
camera = Cameras(
|
||||||
fx=intrinsics_matrix[0, 0],
|
fx=intrinsics_matrix[0, 0],
|
||||||
|
|||||||
Reference in new issue
Block a user