yufu-wang / tram

TRAM: Global Trajectory and Motion of 3D Humans from in-the-wild Videos
MIT License
130 stars 7 forks source link

some bugs when running on my video. #5

Open ygx2011 opened 1 month ago

ygx2011 commented 1 month ago

when running the final step, always occured:

Traceback (most recent call last): File "/mnt/d/tram/tram/scripts/tram_video.py", line 152, in rend = renderer.render_with_ground_multiple(verts_list, faces, verts_colors, File "/mnt/d/tram/tram/scripts/../lib/vis/renderer.py", line 316, in render_with_ground_multiple results = self.renderer(mesh, cameras=cameras, lights=lights, materials=materials) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/pytorch3d/renderer/mesh/renderer.py", line 61, in forward fragments = self.rasterizer(meshes_world, kwargs) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl return forward_call(*args, **kwargs) File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/pytorch3d/renderer/mesh/rasterizer.py", line 252, in forward pix_to_face, zbuf, bary_coords, dists = rasterize_meshes( File "/home/yinggx/miniconda3/envs/tram/lib/python3.10/site-packages/pytorch3d/renderer/mesh/rasterize_meshes.py", line 215, in rasterize_meshes raise ValueError( ValueError: bin_size too small, number of faces per bin must be less than 22; got 30

yufu-wang commented 1 month ago

Thank you for trying our code. This problem is a common issue with pytorch3d and can be solved by changing the parameters bin_size and max_faces_per_bin. First increase the bin_size, then max_faces_per_bin if there're warnings. Setting bin_size to -1 will make it work in all cases but slow down the rendering a bit.

Please let me know if you encounter other issue.

ygx2011 commented 1 month ago

Thank you for trying our code. This problem is a common issue with pytorch3d and can be solved by changing the parameters bin_size and max_faces_per_bin. First increase the bin_size, then max_faces_per_bin if there're warnings. Setting bin_size to -1 will make it work in all cases but slow down the rendering a bit.

Please let me know if you encounter other issue.

thank you very much~