Meshes not showing in tensorboard

cfd1: <p>Hi,</p>
<p>I am using pytorch 1.3.1 and tf-nighty (as per the pytorch documentation).<br>
I have tried the <a href="https://pytorch.org/docs/stable/tensorboard.html" rel="nofollow noopener">example code</a> for <code>add_mesh</code> to add a mesh to tensorboard</p>
<pre><code class="lang-auto">from torch.utils.tensorboard import SummaryWriter
vertices_tensor = torch.as_tensor([
    [1, 1, 1],
    [-1, -1, 1],
    [1, -1, -1],
    [-1, 1, -1],
], dtype=torch.float).unsqueeze(0)
colors_tensor = torch.as_tensor([
    [255, 0, 0],
    [0, 255, 0],
    [0, 0, 255],
    [255, 0, 255],
], dtype=torch.int).unsqueeze(0)
faces_tensor = torch.as_tensor([
    [0, 2, 3],
    [0, 3, 1],
    [0, 1, 2],
    [1, 3, 2],
], dtype=torch.int).unsqueeze(0)

writer = SummaryWriter()
writer.add_mesh('my_mesh', vertices=vertices_tensor, colors=colors_tensor, faces=faces_tensor)

writer.close()
</code></pre>
<p>This is what I get<br>
<a href="https://user-images.githubusercontent.com/57766372/69811674-80d7d480-11e6-11ea-9245-8c98b5e18d45.png" rel="nofollow noopener"><img src="https://user-images.githubusercontent.com/57766372/69811674-80d7d480-11e6-11ea-9245-8c98b5e18d45.png" alt="image" width="690" height="250"></a><br>
I can’t find any solutions online to this issue.</p>
<ul>
<li>Does anyone have any suggestion to get this to work?</li>
<li>Has anyone managed to get this to work?</li>
</ul>
<p>I have raised an issue on github <span class="hashtag">#30561</span> and it was suggested to raise it here.</p>
<p>Thanks</p>
<p>Adam</p>

ptrblck: <p>I tried to reproduce the issue using your code, but I get some images:</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/6/5/65be23ba201c941ea00bb60405192796a5aa2812.png" data-download-href="https://discuss.pytorch.org/uploads/default/65be23ba201c941ea00bb60405192796a5aa2812" title="Screenshot%20from%202019-11-30%2018-41-51"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/6/5/65be23ba201c941ea00bb60405192796a5aa2812_2_329x250.png" alt="Screenshot%20from%202019-11-30%2018-41-51" data-base62-sha1="ew3AZukkqdO7E1erdxKaqVuAWVY" width="329" height="250" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/6/5/65be23ba201c941ea00bb60405192796a5aa2812_2_329x250.png, https://discuss.pytorch.org/uploads/default/optimized/3X/6/5/65be23ba201c941ea00bb60405192796a5aa2812_2_493x375.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/6/5/65be23ba201c941ea00bb60405192796a5aa2812_2_658x500.png 2x" data-dominant-color="D5C3B7"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screenshot%20from%202019-11-30%2018-41-51</span><span class="informations">841×638 51.3 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I’m using tensorboard <code>2.0.2</code> with PyTorch <code>1.4.0.dev20191109</code></p>

cfd1: <p>Thanks. I’ll try those versions and see if it works.</p>

cfd1: <p>I have tried with the following conda environment with no success.</p>
<pre><code class="lang-auto"># Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
absl-py                   0.8.1                    py36_0  
astor                     0.8.0                    pypi_0    pypi
blas                      1.0                         mkl  
c-ares                    1.15.0            h7b6447c_1001  
ca-certificates           2019.10.16                    0  
cachetools                3.1.1                    pypi_0    pypi
certifi                   2019.9.11                py36_0  
cffi                      1.13.2           py36h2e261b9_0  
chardet                   3.0.4                    pypi_0    pypi
cudatoolkit               10.1.243             h6bb024c_0  
freetype                  2.9.1                h8a8886c_1  
gast                      0.2.2                    pypi_0    pypi
google-auth               1.7.1                    pypi_0    pypi
google-auth-oauthlib      0.4.1                    pypi_0    pypi
google-pasta              0.1.8                    pypi_0    pypi
grpcio                    1.25.0                   pypi_0    pypi
h5py                      2.10.0                   pypi_0    pypi
idna                      2.8                      pypi_0    pypi
intel-openmp              2019.4                      243  
jpeg                      9b                   h024ee3a_2  
keras-applications        1.0.8                    pypi_0    pypi
keras-preprocessing       1.1.0                    pypi_0    pypi
libedit                   3.1.20181209         hc058e9b_0  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libpng                    1.6.37               hbc83047_0  
libprotobuf               3.10.1               hd408876_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
libtiff                   4.1.0                h2733197_0  
markdown                  3.1.1                    py36_0  
mkl                       2019.4                      243  
mkl-service               2.3.0            py36he904b0f_0  
mkl_fft                   1.0.15           py36ha843d7b_0  
mkl_random                1.1.0            py36hd6b4f25_0  
ncurses                   6.1                  he6710b0_1  
ninja                     1.9.0            py36hfd86e86_0  
numpy                     1.17.4           py36hc1035e2_0  
numpy-base                1.17.4           py36hde5b4d6_0  
oauthlib                  3.1.0                    pypi_0    pypi
olefile                   0.46                       py_0  
openssl                   1.1.1d               h7b6447c_3  
opt-einsum                3.1.0                    pypi_0    pypi
pillow                    6.2.1            py36h34e0f95_0  
pip                       19.3.1                   py36_0  
protobuf                  3.10.1           py36he6710b0_0  
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.7                    pypi_0    pypi
pycparser                 2.19                       py_0  
python                    3.6.9                h265db76_0  
pytorch                   1.4.0.dev20191127 py3.6_cuda10.1.243_cudnn7.6.3_0    pytorch-nightly
readline                  7.0                  h7b6447c_5  
requests                  2.22.0                   pypi_0    pypi
requests-oauthlib         1.3.0                    pypi_0    pypi
rsa                       4.0                      pypi_0    pypi
scipy                     1.3.3                    pypi_0    pypi
setuptools                42.0.1                   py36_0  
six                       1.13.0                   py36_0  
sqlite                    3.30.1               h7b6447c_0  
tensorboard               2.0.2                    pypi_0    pypi
tensorflow-estimator      2.0.1                    pypi_0    pypi
tensorflow-gpu            2.0.0                    pypi_0    pypi
tensorflow-graphics-gpu   1.0.0                    pypi_0    pypi
termcolor                 1.1.0                    pypi_0    pypi
tk                        8.6.8                hbc83047_0  
torchvision               0.5.0.dev20191127      py36_cu101    pytorch-nightly
urllib3                   1.25.7                   pypi_0    pypi
werkzeug                  0.16.0                     py_0  
wheel                     0.33.6                   py36_0  
wrapt                     1.11.2                   pypi_0    pypi
xz                        5.2.4                h14c3975_4  
zlib                      1.2.11               h7b6447c_3  
zstd                      1.3.7                h0b5b093_0  
</code></pre>
<p>I have also ran inspect</p>
<pre><code class="lang-auto">$ tensorboard --logdir tests --port 0 --inspect
======================================================================
Processing event files... (this can take a few minutes)
======================================================================

Found event files in:
tests

These tags are in tests:
audio -
histograms -
images -
scalars -
tensor
   my_mesh_COLOR
   my_mesh_FACE
   my_mesh_VERTEX
======================================================================

Event statistics for tests:
audio -
graph -
histograms -
images -
scalars -
sessionlog:checkpoint -
sessionlog:start -
sessionlog:stop -
tensor
   first_step           0
   last_step            0
   max_step             0
   min_step             0
   num_steps            1
   outoforder_steps     []
======================================================================
</code></pre>
<p>I still don’t get a mesh rendered.</p>
<p>I have also tried with pytorch 1.3.1 with tensorboard 2.0.2 also with no luck.</p>
<p>I’m using firefox to view the tensorboard.</p>

cfd1: <p>The issue was firefox. It works with chrome.</p>

ghasemikasra39: <p>I have the same issue. The example code works for me fine. But I have a bigger mesh from Trimesh. Tensorboard shows a blank white screen.</p>