akanazawa / cmr

Project repo for Learning Category-Specific Mesh Reconstruction from Image Collections
MIT License
476 stars 85 forks source link

Getting Assertion error when trying to run demo code of CMR #18

Open prahalath opened 4 years ago

prahalath commented 4 years ago

Hi, I'm trying to run the demo code for CMR but my team and I are getting this error across all devices. We'd really appreciate it if you could help us with this. Thank you.

Setting up model.. Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/content/cmr/demo.py", line 119, in app.run(main) File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 299, in run _run_main(main, args) File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 250, in _run_main sys.exit(main(argv)) File "/content/cmr/demo.py", line 107, in main predictor = pred_util.MeshPredictor(opts) File "/content/cmr/nnutils/predictor.py", line 39, in init self.model = mesh_net.MeshNet(img_size, opts, nz_feat=opts.nz_feat) File "/content/cmr/nnutils/mesh_net.py", line 236, in init verts, faces, num_indept, num_sym, num_indept_faces, num_sym_faces = mesh.make_symmetric(verts, faces) File "/content/cmr/utils/mesh.py", line 44, in make_symmetric assert(prop_left_inds.shape[0] == num_sym) AssertionError

shubhtuls commented 4 years ago

Thanks for the interest in the work. Our code depends on an external package meshzoo to create the initial sphere. They recently made a breaking change, which may be causing some issues. I'd recommend trying with an older version from 2018 (https://pypi.org/project/meshzoo/#history) and seeing if the issue persists.

chenyuntc commented 4 years ago

Hi @prahalath
you can try my demo code at https://github.com/chenyuntc/cmr

or copy meshzoo.py https://github.com/chenyuntc/cmr/blob/master/utils/meshzoo.py to your repo and replace the import in utils/mesh.py (pip uninstall meshzoo)