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

while visualing est poses, tless models' are not uploaded #90

Open
smoothumut opened this issue May 25, 2023 · 5 comments
Open

while visualing est poses, tless models' are not uploaded #90

smoothumut opened this issue May 25, 2023 · 5 comments

Comments

@smoothumut
Copy link

Hi thanks for your great work.
While trying to run vis_est_poses.py it gives error.
in renderer_vispy.py file, the line 402 below gives the error. because the model doesnt have "normals" key and values

    vertices = np.array(list(zip(model["pts"], model["normals"], colors, texture_uv)), vertices_type)

what am I missing,
thanks in advance

@thodan
Copy link
Owner

thodan commented May 25, 2023

What model are you using?

@smoothumut
Copy link
Author

Hi Thodan, thanks for your reply. I am using tless models if that is what you are asking

@thodan
Copy link
Owner

thodan commented May 26, 2023

Please have a look exactly what PLY file (containing the object model) is loaded. All PLY files from the T-LESS dataset include the surface normals (saved as items nx, ny and nz), so model["normals"] should be defined.

@SajjadPSavoji
Copy link

I am facing the same problem when trying to visualize gt pose for lmo. Did anybody figure out how to resolve this ? I got the ply models from huggingface, so don't really think the ply files are corrupted.

@SajjadPSavoji
Copy link

SajjadPSavoji commented Oct 31, 2024

just for the sake of other people who will end up here, I am assuming that some of the models in some datasets do not have the normals. I implemented a temporary work-around that sets the shading to ''flat" for such cases. Also it is fixing the issue only with vispy, if you are using other renderers, it wont fix your problem.

modify renderer_vispy.py: line 425

try: vertices = np.array( list(zip(model["pts"], model["normals"], colors, texture_uv)), vertices_type, ) except: self.shading = "flat" vertices_type = [ ("a_position", np.float32, 3), ("a_color", np.float32, colors.shape[1]), ("a_texcoord", np.float32, 2), ] vertices = np.array( list(zip(model["pts"], colors, texture_uv)), vertices_type )

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

3 participants