nerfstudio
nerfstudio copied to clipboard
Need better way to handle adding colormap on output images for Visualizer
I added some func to handle the colormap stuff https://github.com/plenoptix/pyrad/blob/069cf2c40fb3ab68c483501f18713992b3c00d8a/pyrad/graphs/instant_ngp.py#L148-L162
And set it as a base class thing to get everything to work: https://github.com/plenoptix/pyrad/blob/069cf2c40fb3ab68c483501f18713992b3c00d8a/pyrad/graphs/base.py#L139-L145
But i dont think this is best way to handle, so need to figure out a more robust way of handling this across implementations
This is where the function is referenced in visualizer code: https://github.com/plenoptix/pyrad/blob/069cf2c40fb3ab68c483501f18713992b3c00d8a/pyrad/viewer/server/viewer_utils.py#L79
I think all outputs that are images [HxWxC] should be sent to the viewer regardless of the channel dimensions. The viewer should have logic to determine the way to visualize depending on the type and dimensions.
[HxWx3] (float, uint8) -> display image
[HxWx1] (float) -> display with colormap
[HxWx1] (int) -> display with semantic colormap
[HxWx1] (bool) -> Two color output
Anything not HxW is not sent.
The options for the colormaps will be dropdowns in the viewer UI.