Skip to content

Instantly share code, notes, and snippets.

@justinhchae
Last active June 22, 2023 03:49
Show Gist options
  • Save justinhchae/9182bdaf12099ab334c32c527b7cf4a7 to your computer and use it in GitHub Desktop.
Save justinhchae/9182bdaf12099ab334c32c527b7cf4a7 to your computer and use it in GitHub Desktop.
Example Usage for PyTorch3D Load Obj with High Precision
# 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