pytorch3d icon indicating copy to clipboard operation
pytorch3d copied to clipboard

Mesh Rasterisation taking unexpectedly long time

Open KaLiMaLi555 opened this issue 2 years ago • 2 comments

Hey folks! I want to rasterize a mesh and get pix_to_face and zbuf outputs. But the rasterization call is taking unexpectedly long time to complete.

I am trying to rasterize a (5368, 7152) sized image of 6M faces mesh.

The average time for a rasterization call is 7s. I don't know if this is the expected behaviour with pytorch3d since other libraries take way less time.

I am using the pytorch3d.renderer.mesh.rasterizer.MeshRasterizer class.

Raster settings
 'image_size': (5368, 7152),
 'blur_radius': 0.0,
 'faces_per_pixel': 1,
 'bin_size': None,
 'max_faces_per_bin': None,
 'perspective_correct': None,
 'cull_backfaces': True,
 'clip_barycentric_coords': False,
 'cull_to_frustum': True,
 'z_clip_value': 1.0,
Gpu specs:
Tesla T4, Cuda 11.6, with 16Gb of gpu ram 

It would be really helpful if someone can point me to something I am doing incorrectly.

KaLiMaLi555 avatar Feb 15 '23 05:02 KaLiMaLi555

What other libraries are you comparing with, and how long do they take?

If you aren't relying on the rasterisation itself being differentiable, you could use MeshRasterizerOpenGL.

bottler avatar Feb 15 '23 12:02 bottler

What other libraries are you comparing with, and how long do they take?

If you aren't relying on the rasterisation itself being differentiable, you could use MeshRasterizerOpenGL.

Sorry to bother, but could you refer me to a link or document on how to properly install necessary dependencies for MeshRasterizerOpenGL to work?

HernandoR avatar Oct 19 '24 03:10 HernandoR