Last active
June 22, 2023 03:49
-
-
Save justinhchae/9182bdaf12099ab334c32c527b7cf4a7 to your computer and use it in GitHub Desktop.
Example Usage for PyTorch3D Load Obj with High Precision
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install direct from our forked repository: https://github.com/Esri/pytorch3d/tree/multitexture-obj-high-precision | |
!pip install 'git+https://github.com/Esri/pytorch3d.git@multitexture-obj-high-precision' | |
from pytorch3d.io import load_obj | |
# the current pytorch3d API for load_obj | |
obj = load_obj( | |
path_to_obj_file, | |
load_textures=True, | |
) | |
# the high-precision branch of the forked pytorch3d API for load_obj | |
obj = load_obj( | |
path_to_obj_file, | |
load_textures=True, | |
high_precision=True, # the resulting vertex tensors are returned as floating point 64 tensors | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment