facebookresearch / pytorch3d

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

Rendering depth and converting them to the needed format #1862

Open ynes99 opened 2 months ago

ynes99 commented 2 months 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 month ago

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