mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 22:30:35 +08:00
mesh rasterizer settings fix
Summary: Fix default setting of `max_faces_per_bin` and update mesh rasterization benchmark tests. The previous setting of `max_faces_per_bin` was wrong and for larger mesh sizes and batch sizes it was causing a significant slow down due to an unecessarily large intermediate tensor being created. Reviewed By: gkioxari Differential Revision: D22301819 fbshipit-source-id: d5e817f5b917fb5633c9c6a8634b6c8ff65e3508
This commit is contained in:
committed by
Facebook GitHub Bot
parent
88f579389f
commit
dd4a35cf9f
@@ -130,7 +130,7 @@ def rasterize_meshes(
|
||||
)
|
||||
|
||||
if max_faces_per_bin is None:
|
||||
max_faces_per_bin = int(max(10000, verts_packed.shape[0] / 5))
|
||||
max_faces_per_bin = int(max(10000, meshes._F / 5))
|
||||
|
||||
# pyre-fixme[16]: `_RasterizeFaceVerts` has no attribute `apply`.
|
||||
return _RasterizeFaceVerts.apply(
|
||||
|
||||
Reference in New Issue
Block a user