daniilidis-group / neural_renderer

A PyTorch port of the Neural 3D Mesh Renderer
Other
1.12k stars 248 forks source link

Render Silhouette For A Trimesh Object #138

Closed adityab05 closed 1 year ago

adityab05 commented 1 year ago

Hi, I already have a trimesh object i have stored using the below command, mesh.export('name.obj')

Now what I want to do is, Using weak camera perspective get the 2D silhouette rendered. I changed the code in example1.py as seen below, images = renderer(vertices, faces, mode = 'silhouettes') # [batch_size, RGB, image_size, image_size] image = images.detach().cpu().numpy()[0].transpose((1, 2, 0)) # [image_size, image_size, RGB]

but I get an error as seen below, image

How to resolve this ?