isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.49k stars 2.31k forks source link

Open3d for Tensorboard tutorial example not working on macOS #5691

Open ifried01 opened 2 years ago

ifried01 commented 2 years ago

Checklist

My Question

Hi,

I am trying to use open3d within tensorboard. I am trying to run the example from the official tutorial but am not able to visualize anything on tensorboard (screenshot below).

Screen Shot 2022-11-15 at 10 21 46 AM
import open3d as o3d
# Monkey-patch torch.utils.tensorboard.SummaryWriter
from open3d.visualization.tensorboard_plugin import summary
# Utility function to convert Open3D geometry to a dictionary format
from open3d.visualization.tensorboard_plugin.util import to_dict_batch
from torch.utils.tensorboard import SummaryWriter

cube = o3d.geometry.TriangleMesh.create_box(1, 2, 4)
cube.compute_vertex_normals()
cylinder = o3d.geometry.TriangleMesh.create_cylinder(radius=1.0,
                                                     height=2.0,
                                                     resolution=20,
                                                     split=4)
cylinder.compute_vertex_normals()
colors = [(1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)]
logdir = "demo_logs/pytorch/small_scale"
writer = SummaryWriter(logdir)
for step in range(3):
    cube.paint_uniform_color(colors[step])
    writer.add_3d('cube', to_dict_batch([cube]), step=step)
    cylinder.paint_uniform_color(colors[step])
    writer.add_3d('cylinder', to_dict_batch([cylinder]), step=step)

tensorboard --logdir demo_logs/pytorch

On the tutorial page it says that macOS is not supported yet, but the most recent comment on this issue #4455 seems to indicate that it should work on macOS.

Any idea why the tutorial example is not working on my end?

Thanks in advance.

OS: macOS 11.4 (Big Sur) python: 3.9.6 open3d: 0.16.1 tensorboard: 2.11.0 torch: 1.13.0

ssheorey commented 1 year ago

macOS is not supported as yet. You can only view (i.e. run the web browser) on macOS -- tensorboard needs to run on Linux / Windows.