mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 02:45:34 +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:
|
||||
times = times.unsqueeze(-1).to(self.device)
|
||||
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
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ class ViewerState:
|
||||
# set the initial state whether to train or not
|
||||
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
|
||||
# self.vis["renderingState/camera"].write(json_)
|
||||
@@ -756,8 +756,9 @@ class ViewerState:
|
||||
dim=0,
|
||||
)
|
||||
|
||||
times = float(self.vis["renderingState/render_time"].read())
|
||||
times = torch.tensor([times])
|
||||
times = self.vis["renderingState/render_time"].read()
|
||||
if times:
|
||||
times = torch.tensor([float(times)])
|
||||
|
||||
camera = Cameras(
|
||||
fx=intrinsics_matrix[0, 0],
|
||||
|
||||
Reference in new issue
Block a user