Eng/vis multi outputs (#131)

* added dynamic setting options based on graph outputs

* added functionality to view different types of outputs

* fixed first value set to nothing

* moved try except in smaller scope

* thinking I fixed the weird every so often python stops because of exception error

* fixed many dropdown issue; fixed default value issue
This commit is contained in:
evonneng authored and GitHub committed 2022-07-13 14:36:11 -07:00
1 parent ff4f1bb421
commit 069cf2c40f
4 files changed
+115 -66

No files matched your search

+16
View File
@@ -145,6 +145,22 @@ class NGPGraph(Graph):
loss_dict = {"rgb_loss": rgb_loss}
return loss_dict
def process_outputs_as_images(self, outputs): # pylint:disable=no-self-use
"""Do preprocessing to make images valid"""
# TODO: make log_test_image_outputs use this directly
# TODO: implement across all the different graph implementations
acc = visualization.apply_colormap(outputs["accumulation"])
depth = visualization.apply_depth_colormap(
outputs["depth"],
accumulation=outputs["accumulation"],
)
combined_acc = torch.cat([acc], dim=1)
outputs["accumulation"] = combined_acc
combined_depth = torch.cat([depth], dim=1)
outputs["depth"] = combined_depth
depth = visualization.apply_depth_colormap(outputs["depth_occupancy_grid"])
outputs["depth_occupancy_grid"] = combined_depth
def log_test_image_outputs(self, image_idx, step, batch, outputs):
image = batch["image"]
rgb = outputs["rgb"]