Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Problems with trimesh #40

Open
bugdary opened this issue Oct 27, 2019 · 6 comments
Open

Problems with trimesh #40

bugdary opened this issue Oct 27, 2019 · 6 comments

Comments

@bugdary
Copy link

bugdary commented Oct 27, 2019

Does anyone encounter problems when trying to dump the scene?
I installed trimesh = 2.35.39 and I get the following problem :

Finished detection. 37 object detected.
Traceback (most recent call last):
File "demo.py", line 101, in
MODEL.dump_results(end_points, dump_dir, DC, True)
File "D:\Projects\Depth\votenet\models\dump_helper.py", line 86, in dump_results
pc_util.write_oriented_bbox(obbs[objectness_prob>DUMP_CONF_THRESH,:], os.path.join(dump_dir, '%06d_pred_confident_bbox.ply'%(idx_beg+i)))
File "D:\Projects\Depth\votenet\utils\pc_util.py", line 421, in write_oriented_bbox
mesh_list = trimesh.util.concatenate(scene.dump())
File "d:\ProgramData\Anaconda3\envs\pytorch_1_1_python36\lib\site-packages\trimesh\scene\scene.py", line 499, in dump
for node_name in self.graph.nodes_geometry:
File "d:\ProgramData\Anaconda3\envs\pytorch_1_1_python36\lib\site-packages\trimesh\caching.py", line 88, in get_cached
value = function(*args, **kwargs)
File "d:\ProgramData\Anaconda3\envs\pytorch_1_1_python36\lib\site-packages\trimesh\scene\transforms.py", line 224, in nodes_geometry
'geometry' in self.transforms.node[n]):
AttributeError: 'EnforcedForest' object has no attribute 'node'

Any ideas ?

@bugdary
Copy link
Author

bugdary commented Oct 28, 2019

I solved the issues by upgrading to the latest version of Trimesh and changing the following line:

trimesh.io.export.export_mesh(mesh_list, out_filename, file_type='ply')

to

mesh_list.export(out_filename)

Thanks for sharing your code.

@jingnanshi
Copy link

I encountered the same error. After some digging, it looks like it is caused by the fact that the version of networkx installed is too new. For a method that does not involve changing the code: before installing trimesh, do pip install 'networkx>=2.2,<2.3'.

@gkd2020
Copy link

gkd2020 commented Feb 20, 2020

I have a similar problem. But the warning information is different. I don't know what to do. Can someone help me?

Constructed model.
Loaded checkpoint /home/votenet-master/demo_files/pretrained_votenet_on_sunrgbd.tar (epoch: 180)
Loaded point cloud data: /home/votenet-master/demo_files/input_pc_sunrgbd.ply
Inference time: 0.138507
Finished detection. 9 object detected.
Traceback (most recent call last):
File "demo.py", line 101, in
MODEL.dump_results(end_points, dump_dir, DC, True)
File "/home/votenet-master/models/dump_helper.py", line 86, in dump_results
pc_util.write_oriented_bbox(obbs[objectness_prob>DUMP_CONF_THRESH,:], os.path.join(dump_dir, '%06d_pred_confident_bbox.ply'%(idx_beg+i)))
File "/home/votenet-master/utils/pc_util.py", line 421, in write_oriented_bbox
mesh_list = trimesh.util.concatenate(scene.dump())
File "/usr/local/lib/python3.6/dist-packages/trimesh/scene/scene.py", line 499, in dump
for node_name in self.graph.nodes_geometry:
File "/usr/local/lib/python3.6/dist-packages/trimesh/caching.py", line 88, in get_cached
value = function(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/trimesh/scene/transforms.py", line 224, in nodes_geometry
'geometry' in self.transforms.node[n]):
AttributeError: 'EnforcedForest' object has no attribute 'node'

Is there any outstanding scholar who can help me. Thanks

@jingnanshi
Copy link

@ai-starter have you tried pip install 'networkx>=2.2,<2.3' before installing trimesh? Your error message seems to be the same.

@gkd2020
Copy link

gkd2020 commented Feb 24, 2020

@ai-starter have you tried pip install 'networkx>=2.2,<2.3' before installing trimesh? Your error message seems to be the same.

Thanks,It is useful! But I have another problem. When I open the results with meshleb, it looks weird. The result is some combination of cubes, which is different from what we see in the paper.
what happen? I look forward to your reply. Thanks
2020-02-24 16-47-11屏幕截图

@jingnanshi
Copy link

jingnanshi commented Feb 24, 2020

You need to change meshlab to only show the wireframes. Also, please open a new issue for this.

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

No branches or pull requests

3 participants