Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement multitexture obj high precision #1574

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

justinhchae
Copy link

@justinhchae justinhchae commented Jun 22, 2023

Pull Request from Esri's AI Prototypes Team. Seeking to implement multitexture support for OBJ WITH point sampling direct from OBJ data structures AND WITH support for vertices in real-world projected spatial coordinates. This PR includes all features that exist in #1572 and in #1573. Each PR is split into its major components due to the orthogonal nature of each branch.

We leverage PyTorch3D quite a bit on our applied research in mesh segmentation and often use obj datasets that depict entire cities or entire regions. They mostly all require multiple texture files and we eventually need to subset meshes for nearly all stages of the pipeline. In addition, we are experimenting with feature extraction methods that generally involve using point cloud based techniques - such approaches require sampling at least one point per face and linking all sampled points to their origin faces. These features and more are implemented in this branch. Further, many of our input meshes have XYZ vertices that exist in real space. As a result, depending on the location on earth), the coordinates for vertices may be so high that they are rounded if the verts data struct is only fp.32. To accommodate verts in fp.64, we modified several data structures to include OBJ, Meshes, and Transforms3D.

We've written a story about the full scope of changes at GeoAI/PyTorch3D.

Key Excerpt from our article:

multitexture-obj-high-precision: Adds support to pytorch3d.io.obj_io and pytorch3d.ops.sample_points_from_obj by reading obj vertices with floating point precision 64, i.e., double tensors. Although PyTorch3D currently allows one to control the output of decimal place, if vertex coordinates of a mesh in an obj are based on real-world coordinates, there is a chance that vertex values lose significant numeric precision. In practice, this means that vertex coordinates of mesh faces could be offset by up to a meter or more. Linked to issue #1570.

Issues Addressed Include: #1570.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants