-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Error loading ShapeNet meshes with texture #4362
Comments
In fact, I also meet the same bug when I used the API read_triangle_mesh in the Shapenet-v1. |
And I think that maybe the .obj file has some problem. |
The same issue with 02691156/de45798ef57fe2d131b4f9e586a6d334 |
How can we solve it? I simply removed that particular data.. |
It seems the error is with the texture files. If you put the .obj file in a separate folder, it loads in Open3D correctly. If you need the textures, take a look at this answer: https://blender.stackexchange.com/questions/89010/materials-not-applied-after-importing-obj-shapenet/188192#188192 . You can convert the buggy .obj model from ShapeNet to a .glb model using https://github.com/CesiumGS/obj2gltf. |
The same issue with 02691156/31b201b7346e6cd15e9e2656aff7dd5b |
For more context on the ShapeNet bug (Stanford url download): it comes from png files having jpg extensions, nothing wrong with the obj file by itself. As mentioned by @Saafke, gets solved by moving to different directory. In terms of possible fix to o3d: I am able to load the images with matplotlib though. It might be that o3d uses file extensions rather than first bytes to determine file type. |
@tomas-aftalion yeah, you are right. https://gist.github.com/leommoore/f9e57ba2aa4bf197ebc5 0x89 0x50 is png magic number. And open3d does read based on file extension in the name and not using magic number. Open3D/cpp/open3d/io/ImageIO.cpp Line 23 in c7718fd
|
Describe the bug
When loading specific ShapeNet meshes with Open3D > 0.11, the process ends after printing 'Not a JPEG file: starts with 0x89 0x50'.
In contrast, Open3D version 0.8.0 with python 3.7.9 returns a mesh.
To Reproduce
Steps to reproduce the behavior:
From within your ShapeNetCore.v2 directory...
(same for this model: 03467517/2cbc0faddf227502bbc745a3524d966b/models)
Expected behavior
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: