mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-03 22:38:48 +08:00
added flag to view dataset from get-go (#366)
* added logic to comp rays/s on train and vis * added test and fixed vis rays/sec * added flag to just visualize dataset * added new script for viewing only dataset
This commit is contained in:
1 parent
e344396153
commit
e7cca834c8
4 files changed
+56
-4
No files matched your search
@@ -234,13 +234,12 @@ class VisualizerState:
|
||||
|
||||
self.outputs_set = False
|
||||
|
||||
def init_scene(self, dataset: InputDataset) -> None:
|
||||
def init_scene(self, dataset: InputDataset, start_train=True) -> None:
|
||||
"""Draw some images and the scene aabb in the viewer.
|
||||
|
||||
Args:
|
||||
dataset: dataset to render in the scene
|
||||
"""
|
||||
|
||||
# clear the current scene
|
||||
self.vis["sceneState/sceneBounds"].delete()
|
||||
self.vis["sceneState/cameras"].delete()
|
||||
@@ -257,6 +256,9 @@ class VisualizerState:
|
||||
json_ = dataset.dataset_inputs.scene_bounds.to_json()
|
||||
self.vis["sceneState/sceneBounds"].write(json_)
|
||||
|
||||
# set the initial state whether to train or not
|
||||
self.vis["renderingState/isTraining"].write(start_train)
|
||||
|
||||
# set the properties of the camera
|
||||
# self.vis["renderingState/camera"].write(json_)
|
||||
|
||||
@@ -284,7 +286,7 @@ class VisualizerState:
|
||||
local_step = step
|
||||
run_loop = not is_training
|
||||
while run_loop:
|
||||
if self._is_render_step(local_step):
|
||||
if self._is_render_step(local_step) and step > 0:
|
||||
self._render_image_in_viewer(graph)
|
||||
is_training = self.vis["renderingState/isTraining"].read()
|
||||
run_loop = not is_training
|
||||
|
||||
Reference in new issue
Block a user