Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_mesh problem! #640

Open
TrepangCat opened this issue Sep 10, 2021 · 2 comments
Open

add_mesh problem! #640

TrepangCat opened this issue Sep 10, 2021 · 2 comments

Comments

@TrepangCat
Copy link

When I use add_mesh() many times with tag='train/mesh', I can't click the blue bar to change the mesh shown on the page.

@lanpa
Copy link
Owner

lanpa commented Sep 12, 2021

Hi, do you have any small reproducible code for the issue?

@TrepangCat
Copy link
Author

TrepangCat commented Sep 13, 2021

For example

from tensorboardX import SummaryWriter
import numpy as np
import time
import utils

vox = utils.load_binvox('/media/brl/dataDisk/WangRuowei/3d_2021/gan3d-wrw/data_sample/ShapeNetCore.v2/'
'03001627/1a6f615e8b1b5ae4dbbc9440457e303e/models/model_normalized_solid_64.binvox')
box = vox.as_boxes(colors=(255, 165, 0, 128))
vertices = box.vertices
vertices = np.array(vertices).reshape([1, vertices.shape[0], vertices.shape[1]])
faces = box.faces
faces = np.array(faces).reshape([1, faces.shape[0], faces.shape[1]])

config_dict = {
'camera': {'cls': 'PerspectiveCamera', 'fov': 75},
'lights': [
{
'cls': 'AmbientLight',
'color': '#ffffff',
'intensity': 0.5,
},
{
'cls': 'DirectionalLight',
'color': '#7cfc00',
'intensity': 1,
'position': [1.5, 3, 2.5],
},
{
'cls': 'DirectionalLight',
'color': '#7cfc00',
'intensity': 1,
'position': [-1.5, -3, -2.5],
},
],
'material': {
'cls': 'MeshStandardMaterial',
'roughness': 0.5,
'metalness': 0,
'flatShading': True
# 'wireframe': True,
},
}

writer = SummaryWriter(logdir='./example')

writer.add_mesh(tag='test', vertices=vertices, faces=faces, config_dict=config_dict, global_step=1)
writer.add_mesh(tag='test', vertices=vertices, faces=faces, config_dict=config_dict, global_step=2)

writer.close()

When you use add_mesh() at least twice, the blue bar doesn't work after rotating the mesh with the mouse.
I mean that it is unable to click the blue bar after rotating the mesh with the mouse.
You can change the box in the code to other meshes. I think the problem is reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants