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:
evonneng authored and GitHub committed 2022-09-08 13:29:17 -07:00
1 parent e344396153
commit e7cca834c8
4 files changed
+56 -4

No files matched your search

+5 -3
View File
@@ -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