- 12 Feb, 2021 1 commit
-
-
Jeremy Reizenstein authored
Summary: Implements the ascii OFF file format. This was discussed in https://github.com/facebookresearch/pytorch3d/issues/216 Reviewed By: theschnitz Differential Revision: D25788834 fbshipit-source-id: c141d1f4ba3bad24e3c1f280a20aee782bfd74d6
-
- 11 Feb, 2021 2 commits
-
-
Jeremy Reizenstein authored
Summary: Fixes mostly related to the "main" build on circleci. -Avoid error to do with tuple copy from initializer_list which is `explicit` on old compiler. -Add better reporting to copyright test. -Move to PackedTensorAccessor64 from the deprecated PackedTensorAccessor -Avoid some warnings about mismatched comparisons. The "main" build is the only one that runs the test_build stuff. In that area -Fix my bad copyright fix D26275931 (https://github.com/facebookresearch/pytorch3d/commit/3463f418b8a3e3c3e6b6a20007b38eb71938ec7f) / 965c9c -Add test that all tutorials are valid json. Reviewed By: nikhilaravi Differential Revision: D26366466 fbshipit-source-id: c4ab8b7e6647987069f7cb7144aa6ab7c24bcdac
-
Shubham Goel authored
Summary: Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/553 Reviewed By: theschnitz Differential Revision: D26257591 Pulled By: gkioxari fbshipit-source-id: 899a3f733a77361e8572b0900a34b55764ff08f2
-
- 08 Feb, 2021 2 commits
-
-
Nikhila Ravi authored
Summary: - Updated the C++/CUDA mesh rasterization kernels to handle the clipped faces. In particular this required careful handling of the distance calculation for faces which are cut into a quadrilateral by the image plane and then split into two sub triangles i.e. both sub triangles can't be part of the top K faces. - Updated `rasterize_meshes.py` to use the utils functions to clip the meshes and convert the fragments back to in terms of the unclipped mesh - Added end to end tests Reviewed By: jcjohnson Differential Revision: D26169685 fbshipit-source-id: d64cd0d656109b965f44a35c301b7c81f451cfa0
-
Nikhila Ravi authored
Summary: Small update to the cameras and rasterizer to correctly infer the type of camera (perspective vs orthographic). Reviewed By: jcjohnson Differential Revision: D26267225 fbshipit-source-id: a58ed3bc2ab25553d2a4307c734204c1d41b5176
-
- 06 Feb, 2021 1 commit
-
-
Nikhila Ravi authored
Summary: Instead of culling faces behind the camera, partially clip them if they intersect with the image plane. This diff implements the utils functions for clipping. There are 4 cases for the mesh faces which are all handled: ``` Case 1: the triangle is completely in front of the clipping plane (it is left unchanged) Case 2: the triangle is completely behind the clipping plane (it is culled) Case 3: the triangle has exactly two vertices behind the clipping plane (it is clipped into a smaller triangle) Case 4: the triangle has exactly one vertex behind the clipping plane (it is clipped into a smaller quadrilateral and divided into two triangular faces) ``` Reviewed By: jcjohnson Differential Revision: D23108673 fbshipit-source-id: 550a8b6a982d06065dff10aba10d47e8b144ae52
-
- 04 Feb, 2021 1 commit
-
-
Jeremy Reizenstein authored
Summary: These two tests fail (with non-small differences) when the seed is changed or if certain environmental changes are made. We disable them pending investigation. A small change to the tolerance at the failing assertion doesn't help. The change in common_testing helps diagnose this. Reviewed By: shapovalov Differential Revision: D26233419 fbshipit-source-id: 357afc1786825256c9bade101fb15707e4dea5ed
-
- 28 Jan, 2021 2 commits
-
-
Jeremy Reizenstein authored
Summary: Corner case where there's nothing to do in this function. Reviewed By: nikhilaravi Differential Revision: D26073476 fbshipit-source-id: eb061683ffe35c1ffa8384c422a1557a636d52cd
-
Jeremy Reizenstein authored
Summary: We were double counting some pairs in some cases. Specifically if four or more faces share an edge, then some of them were getting double counted. This is a minimal tweak to avoid that. Reviewed By: nikhilaravi Differential Revision: D26073477 fbshipit-source-id: a40032acf3044bb98dd91cb29904614ef64d5599
-
- 25 Jan, 2021 1 commit
-
-
Jeremy Reizenstein authored
Summary: Ensure that `mesh2 = mesh.to(device)` doesn't change the device of `mesh.textures`. Reviewed By: nikhilaravi Differential Revision: D25978610 fbshipit-source-id: 0558cd62132965d8693ebeea05e42b8c1d16cfbf
-
- 22 Jan, 2021 2 commits
-
-
Jeremy Reizenstein authored
Summary: Plotly viewing from a specific camera location requires converting that location in to an (eye, at, up) specification. There may be other reasons to want to do this as well. I create a separate utility function for it. I envisage more such utility functions for manipulating camera information, so I create a separate camera_utils.py file for such things. Reviewed By: nikhilaravi Differential Revision: D25981184 fbshipit-source-id: 0947bf98b212676c021f2fddf775bf436dee3487
-
Jeremy Reizenstein authored
Summary: It is common when trying things out to want to move a whole mesh or point cloud by the same amount. Here we allow the offset functions to broadcast. Also add a sanity check to join_meshes_as_scene which it is easy to call wrongly. Reviewed By: nikhilaravi Differential Revision: D25980593 fbshipit-source-id: cdf1568e1317e3b81ad94ed4e608ba7eef81290b
-
- 21 Jan, 2021 1 commit
-
-
Jeremy Reizenstein authored
Summary: Make `to` on Transform3D carry its member _transforms. Reviewed By: nikhilaravi Differential Revision: D25978611 fbshipit-source-id: 12b39e7a657f28d59ca60800bf9f4193a2c08197
-
- 20 Jan, 2021 1 commit
-
-
Jeremy Reizenstein authored
Summary: Fix recent lint. Reviewed By: nikhilaravi Differential Revision: D25900168 fbshipit-source-id: 6b6e8d35b68c8415ef305dc4719f43eda9316c8f
-
- 07 Jan, 2021 3 commits
-
-
Jeremy Reizenstein authored
Summary: Allow PLY files to not contain faces. Allow loading pointclouds with color, at least encoded according to the way of some cloudcompare examples. TODO: Allow vertex normals to be read, and allow vertex colors to be written. Make the return type of load_ply something more user friendly, like a dict. Noticed in https://github.com/facebookresearch/pytorch3d/issues/209 Reviewed By: nikhilaravi Differential Revision: D22573314 fbshipit-source-id: 72ba1f7c6417f5dfc83f2ebf359eff017057635c
-
Jeremy Reizenstein authored
Summary: In the original implementation, I had considered PLY properties where there are mixed types of elements in a property to be rare and basically unimportant, so the implementation is very naive. If we want to support pointcloud PLY files, we need to handle at least the subcase where there are no lists efficiently because this seems to be very common there. Reviewed By: nikhilaravi, gkioxari Differential Revision: D22573315 fbshipit-source-id: db6f29446d4e555a2e2b37d38c8e4450d061465b
-
Jeremy Reizenstein authored
Summary: We already have code for obj and ply formats. Here we actually make it available in `IO.load_mesh` and `IO.save_mesh`. Reviewed By: theschnitz, nikhilaravi Differential Revision: D25400650 fbshipit-source-id: f26d6d7fc46c48634a948eea4d255afad13b807b
-
- 06 Jan, 2021 3 commits
-
-
David Novotny authored
Summary: Implements the `ImplicitRenderer` and `VolumeRenderer`. Reviewed By: gkioxari Differential Revision: D24418791 fbshipit-source-id: 127f21186d8e210895db1dcd0681f09f230d81a4
-
generatedunixname89002005287564 authored
Reviewed By: zertosh Differential Revision: D25800514 fbshipit-source-id: 191b2753b8fcfbe2386c761241aaeb58939a973e
-
David Novotny authored
Summary: Implements 3 basic raysamplers. Reviewed By: nikhilaravi Differential Revision: D24110643 fbshipit-source-id: eb67d0e56773c7871ebdcb23e7e520302dc1b3c9
-
- 05 Jan, 2021 4 commits
-
-
David Novotny authored
Summary: Implements two basic raymarchers. Reviewed By: gkioxari Differential Revision: D24064250 fbshipit-source-id: 18071bd039995336b7410caa403ea29fafb5c66f
-
David Novotny authored
Summary: Conversion from point clouds to volumes ``` Benchmark Avg Time(μs) Peak Time(μs) Iterations -------------------------------------------------------------------------------- ADD_POINTS_TO_VOLUMES_10_trilinear_[25, 25, 25]_1000 43219 44067 12 ADD_POINTS_TO_VOLUMES_10_trilinear_[25, 25, 25]_10000 43274 45313 12 ADD_POINTS_TO_VOLUMES_10_trilinear_[25, 25, 25]_100000 46281 47100 11 ADD_POINTS_TO_VOLUMES_10_trilinear_[101, 111, 121]_1000 51224 51912 10 ADD_POINTS_TO_VOLUMES_10_trilinear_[101, 111, 121]_10000 52092 54487 10 ADD_POINTS_TO_VOLUMES_10_trilinear_[101, 111, 121]_100000 59262 60514 9 ADD_POINTS_TO_VOLUMES_10_nearest_[25, 25, 25]_1000 15998 17237 32 ADD_POINTS_TO_VOLUMES_10_nearest_[25, 25, 25]_10000 15964 16994 32 ADD_POINTS_TO_VOLUMES_10_nearest_[25, 25, 25]_100000 16881 19286 30 ADD_POINTS_TO_VOLUMES_10_nearest_[101, 111, 121]_1000 19150 25277 27 ADD_POINTS_TO_VOLUMES_10_nearest_[101, 111, 121]_10000 18746 19999 27 ADD_POINTS_TO_VOLUMES_10_nearest_[101, 111, 121]_100000 22321 24568 23 ADD_POINTS_TO_VOLUMES_100_trilinear_[25, 25, 25]_1000 49693 50288 11 ADD_POINTS_TO_VOLUMES_100_trilinear_[25, 25, 25]_10000 51429 52449 10 ADD_POINTS_TO_VOLUMES_100_trilinear_[25, 25, 25]_100000 237076 237377 3 ADD_POINTS_TO_VOLUMES_100_trilinear_[101, 111, 121]_1000 81875 82597 7 ADD_POINTS_TO_VOLUMES_100_trilinear_[101, 111, 121]_10000 106671 107045 5 ADD_POINTS_TO_VOLUMES_100_trilinear_[101, 111, 121]_100000 483740 484607 2 ADD_POINTS_TO_VOLUMES_100_nearest_[25, 25, 25]_1000 16667 18143 31 ADD_POINTS_TO_VOLUMES_100_nearest_[25, 25, 25]_10000 17682 18922 29 ADD_POINTS_TO_VOLUMES_100_nearest_[25, 25, 25]_100000 65463 67116 8 ADD_POINTS_TO_VOLUMES_100_nearest_[101, 111, 121]_1000 48058 48826 11 ADD_POINTS_TO_VOLUMES_100_nearest_[101, 111, 121]_10000 53529 53998 10 ADD_POINTS_TO_VOLUMES_100_nearest_[101, 111, 121]_100000 123684 123901 5 -------------------------------------------------------------------------------- ``` Output with `DEBUG=True` {F338561209} Reviewed By: nikhilaravi Differential Revision: D22017500 fbshipit-source-id: ed3e8ed13940c593841d93211623dd533974012f -
David Novotny authored
Summary: Implemented a data structure for volumes. Reviewed By: gkioxari Differential Revision: D20342920 fbshipit-source-id: ccc23eaa183ed8a4e9cd7674b4dcf31e8a65c3c6
-
David Novotny authored
Summary: Implements the `__getitem__` method for `Transform3D` Reviewed By: nikhilaravi Differential Revision: D23813975 fbshipit-source-id: 5da752ed8ea029ad0af58bb7a7856f0995519b7a
-
- 04 Jan, 2021 1 commit
-
-
David Novotny authored
Summary: Extends `list_to_padded`/`padded_to_list` to work for tensors with an arbitrary number of input dimensions. Reviewed By: nikhilaravi, gkioxari Differential Revision: D23813969 fbshipit-source-id: 52c212a2ecdb3c4dfb6ac47217715e07998f37f1
-
- 24 Dec, 2020 2 commits
-
-
Jeremy Reizenstein authored
Summary: Make no internal functions inside pytorch3d/io interpret str paths except using a PathManager from iopath which they have been given. This means we no longer use any global PathManager object and we no longer use fvcore's deprecated file_io. To preserve the APIs, various top level functions create their own default-initialized PathManager object if they are not provided one. Reviewed By: theschnitz Differential Revision: D25372969 fbshipit-source-id: c176ee31439645fa54a157d6f1aef18b09501569
-
Jeremy Reizenstein authored
Summary: Allowing usort, isort and black to coexist without fighting means we can't have imports commented as deprecated from the same module as other imports. Reviewed By: nikhilaravi Differential Revision: D25372970 fbshipit-source-id: 637f5a0025c0df9fbec47cba73ce5387f4f8b467
-
- 18 Dec, 2020 1 commit
-
-
Nikhila Ravi authored
Summary: Defines a function to run marching cubes algorithm on a single or batch of 3D scalar fields. Returns a mesh's faces and vertices. UPDATES (12/18) - Input data is now specified as a (B, D, H, W) tensor as opposed to a (B, W, H, D) tensor. This will now be compatible with the Volumes datastructure. - Add an option to return output vertices in local coordinates instead of world coordinates. Also added a small fix to remove the dype for device in Transforms3D - if passing in a torch.device instead of str it causes a pyre error. Reviewed By: jcjohnson Differential Revision: D24599019 fbshipit-source-id: 90554a200319fed8736a12371cc349e7108aacd0
-
- 17 Dec, 2020 1 commit
-
-
Nikhila Ravi authored
Summary: Fixes the index out of bound errors for texture sampling from a texture atlas: when barycentric coordinates are 1.0, the integer index into the (R, R) per face texture map is R (max can only be R-1). Reviewed By: gkioxari Differential Revision: D25543803 fbshipit-source-id: 82d0935b981352b49c1d95d5a17f9cc88bad0a82
-
- 15 Dec, 2020 2 commits
-
-
Nikhila Ravi authored
Summary: Similar to non square image rasterization for meshes, apply the same updates to the pointcloud rasterizer. Main API Change: - PointRasterizationSettings now accepts a tuple/list of (H, W) for the image size. Reviewed By: jcjohnson Differential Revision: D25465206 fbshipit-source-id: 7370d83c431af1b972158cecae19d82364623380
-
Evgeniy Zheltonozhskiy authored
Add check for verts and faces being on same device and also checks for pointclouds/features/normals being on the same device (#384) Summary: Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/384 Test Plan: `test_meshes` and `test_points` Reviewed By: gkioxari Differential Revision: D24730524 Pulled By: nikhilaravi fbshipit-source-id: acbd35be5d9f1b13b4d56f3db14f6e8c2c0f7596
-
- 14 Dec, 2020 1 commit
-
-
Nikhila Ravi authored
Summary: Add `return self` to the `to` function for the renderer classes. Reviewed By: bottler Differential Revision: D25534487 fbshipit-source-id: e8dbd35524f0bd40e835439e93184b5a1f1532ca
-
- 09 Dec, 2020 1 commit
-
-
Nikhila Ravi authored
Summary: There are a couple of options for supporting non square images: 1) NDC stays at [-1, 1] in both directions with the distance calculations all modified by (W/H). There are a lot of distance based calculations (e.g. triangle areas for barycentric coordinates etc) so this requires changes in many places. 2) NDC is scaled by (W/H) so the smallest side has [-1, 1]. In this case none of the distance calculations need to be updated and only the pixel to NDC calculation needs to be modified. I decided to go with option 2 after trying option 1! API Changes: - Image size can now be specified optionally as a tuple TODO: - add a benchmark test for the non square case. Reviewed By: jcjohnson Differential Revision: D24404975 fbshipit-source-id: 545efb67c822d748ec35999b35762bce58db2cf4
-
- 30 Nov, 2020 1 commit
-
-
Georgia Gkioxari authored
Summary: Taubin Smoothing for filtering meshes and making them smoother. Taubin smoothing is an iterative approach. Reviewed By: nikhilaravi Differential Revision: D24751149 fbshipit-source-id: fb779e955f1a1f6750e704f1b4c6dfa37aebac1a
-
- 18 Nov, 2020 1 commit
-
-
Georgia Gkioxari authored
Summary: Move icp_data.pth to tests/data Reviewed By: bottler Differential Revision: D25012575 fbshipit-source-id: 9252d2eeca9141c82ad3bf9d3e3331a2eab5203b
-
- 11 Nov, 2020 1 commit
-
-
John Reese authored
Reviewed By: zertosh Differential Revision: D24880203 fbshipit-source-id: 2034cdfc2712209e86d3d05c119c58f979b05c52
-
- 10 Nov, 2020 2 commits
-
-
Christoph Lassner authored
Summary: This fixes issues with `pulsar.test.TestDepth` that we are encountering on CircleCI. The ID equality test is removed, which seems to give different results on different hardware (which is okay, because the exact order of spheres can slightly vary if they're close due to numerical instabilities). The depth map validity test stays in place. Reviewed By: bottler Differential Revision: D24840776 fbshipit-source-id: 2f38ea4880abf202c84d2987fdd71a84c5ef3b05
-
Jeremy Reizenstein authored
Summary: Changes to CI and some minor fixes now that pulsar is part of pytorch3d. Most significantly, add CUB to CI builds. Make CUB_HOME override the CUB already in cudatoolkit (important for cuda11.0 which uses cub 1.9.9 which pulsar doesn't work well with. Make imageio available for testing. Lint fixes. Fix some test verbosity. Avoid use of atomicAdd_block on older GPUs. Reviewed By: nikhilaravi, classner Differential Revision: D24773716 fbshipit-source-id: 2428356bb2e62735f2bc0c15cbe4cff35b1b24b8
-
- 05 Nov, 2020 1 commit
-
-
Dave Schnizlein authored
Summary: Users want to be able to obtain the depth from the renderer. Current work-around requires running the rasterizer and extra time. This change creates a new renderer class that also returns the fragments from the rasterizer. Reviewed By: nikhilaravi Differential Revision: D24432381 fbshipit-source-id: 6552e8a6bfee646791afb34bdb7452fbc4094aed
-
- 04 Nov, 2020 1 commit
-
-
Christoph Lassner authored
Summary: This commit performs pulsar example and test refinements. The examples are fully adjusted to adhere to PEP style guide and additional comments are added. Reviewed By: nikhilaravi Differential Revision: D24723391 fbshipit-source-id: 6d289006f080140159731e7f3a8c98b582164f1a
-