facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

Rendering depth and converting them to the needed format #1862

Open ynes99 opened 3 weeks ago

ynes99 commented 3 weeks ago

❓ Questions on how to use PyTorch3D

Hi, I'm trying to generate the depth of an object using pytorch3d, so I used MeshRendererWithFragments and extracted the depth value per mentioned in previous issues (fragment.zbuf) but the content of the tensor is in float, is there a way to convert the values close to the format I need (16bit int)?

bottler commented 1 week ago

It seems like this is a question about torch tensors, not pytorch3d, and you may find a solution in the PyTorch documentation.