I'd like to render a 3D numpy array consisting of 1 and 0 only, and see it on jupyter notebook(or colab). The array has ball-like shape. I don't have a mesh. Is this rendering possible with this pytorch3d? If it's possible, what pytorch3d api is useful to do this?
I've read "README.md" and it describes some Key features. There are "Render textured meshes" and "Render textured pointclouds". What should I see?
PyTorch's VolumeRenderer can be made do this. You can see a slightly more complicated application of it being used in the fit_textured_volume tutorial.
A simple way to visualise the array, without a renderer, would be to use the function torch.nonzero to convert it to a list of occupied coordinates, which you could then make into a PyTorch3D Pointclouds object. This could then be viewed with plotly.
For @bottler's second suggestion of converting to a pointcloud, you could use the plotly utils similar to this example: https://pytorch3d.org/tutorials/render_colored_points#View-pointclouds-in-Plotly-figures
For @bottler's second suggestion of converting to a pointcloud, you could use the plotly utils similar to this example: https://pytorch3d.org/tutorials/render_colored_points#View-pointclouds-in-Plotly-figures
Thanks for suggesting such a good work.
I'll try to convert my numpy array to a pointcloud. Is there a module for this? Or should I for-loop my 3D numpy array?
I found np.argwhere(input). Thanks!
Oops @bottler said torch.nonzero.
Most helpful comment
PyTorch's VolumeRenderer can be made do this. You can see a slightly more complicated application of it being used in the fit_textured_volume tutorial.
A simple way to visualise the array, without a renderer, would be to use the function
torch.nonzeroto convert it to a list of occupied coordinates, which you could then make into a PyTorch3D Pointclouds object. This could then be viewed with plotly.