"vscode:/vscode.git/clone" did not exist on "eb64e201b8cf69bb009783057327b4122ec53224"
  1. 06 Jan, 2021 1 commit
    • David Novotny's avatar
      Raysampling · e6bc960f
      David Novotny authored
      Summary: Implements 3 basic raysamplers.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24110643
      
      fbshipit-source-id: eb67d0e56773c7871ebdcb23e7e520302dc1b3c9
      e6bc960f
  2. 05 Jan, 2021 4 commits
    • David Novotny's avatar
      Raymarching · 1af1a36b
      David Novotny authored
      Summary: Implements two basic raymarchers.
      
      Reviewed By: gkioxari
      
      Differential Revision: D24064250
      
      fbshipit-source-id: 18071bd039995336b7410caa403ea29fafb5c66f
      1af1a36b
    • David Novotny's avatar
      Point clouds to volumes · aa9bcaf0
      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
      aa9bcaf0
    • David Novotny's avatar
      Volumes data structure. · 03ee1dbf
      David Novotny authored
      Summary: Implemented a data structure for volumes.
      
      Reviewed By: gkioxari
      
      Differential Revision: D20342920
      
      fbshipit-source-id: ccc23eaa183ed8a4e9cd7674b4dcf31e8a65c3c6
      03ee1dbf
    • David Novotny's avatar
      __getitem__ for Transform3D · 1e4a2e86
      David Novotny authored
      Summary: Implements the `__getitem__` method for `Transform3D`
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23813975
      
      fbshipit-source-id: 5da752ed8ea029ad0af58bb7a7856f0995519b7a
      1e4a2e86
  3. 04 Jan, 2021 1 commit
  4. 24 Dec, 2020 2 commits
    • Jeremy Reizenstein's avatar
      PathManager passing · 25c065e9
      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
      25c065e9
    • Jeremy Reizenstein's avatar
      lint · b9562157
      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
      b9562157
  5. 18 Dec, 2020 1 commit
    • Nikhila Ravi's avatar
      Classic Marching Cubes algorithm implementation · ebac66da
      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
      ebac66da
  6. 17 Dec, 2020 1 commit
    • Nikhila Ravi's avatar
      Texture Atlas sampling bug fix · 01759d8f
      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
      01759d8f
  7. 15 Dec, 2020 2 commits
  8. 14 Dec, 2020 1 commit
  9. 09 Dec, 2020 1 commit
    • Nikhila Ravi's avatar
      Non square image rasterization for meshes · d07307a4
      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
      d07307a4
  10. 30 Nov, 2020 1 commit
    • Georgia Gkioxari's avatar
      taubin smoothing · 112959e0
      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
      112959e0
  11. 18 Nov, 2020 1 commit
    • Georgia Gkioxari's avatar
      move icp_data.pth to tests/data · 5fb63b45
      Georgia Gkioxari authored
      Summary: Move icp_data.pth to tests/data
      
      Reviewed By: bottler
      
      Differential Revision: D25012575
      
      fbshipit-source-id: 9252d2eeca9141c82ad3bf9d3e3331a2eab5203b
      5fb63b45
  12. 11 Nov, 2020 1 commit
  13. 10 Nov, 2020 2 commits
    • Christoph Lassner's avatar
      Fix flaky CircleCI test. · fb2763dc
      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
      fb2763dc
    • Jeremy Reizenstein's avatar
      pulsar build and CI changes · d220ee2f
      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
      d220ee2f
  14. 05 Nov, 2020 1 commit
    • Dave Schnizlein's avatar
      Add MeshRendererWithFragments class to also return fragments after rendering · 83fef0a5
      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
      83fef0a5
  15. 04 Nov, 2020 1 commit
    • Christoph Lassner's avatar
      Example and test updates. · b6be3b95
      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
      b6be3b95
  16. 03 Nov, 2020 2 commits
    • Christoph Lassner's avatar
      pulsar interface unification. · 960fd6d8
      Christoph Lassner authored
      Summary:
      This diff builds on top of the `pulsar integration` diff to provide a unified interface for the existing PyTorch3D point renderer and Pulsar. For more information about the pulsar backend, see the release notes and the paper (https://arxiv.org/abs/2004.07484). For information on how to use the backend, see the point cloud rendering notebook and the examples in the folder docs/examples.
      
      The unified interfaces are completely consistent. Switching the render backend is as easy as using `renderer = PulsarPointsRenderer(rasterizer=rasterizer).to(device)` instead of `renderer = PointsRenderer(rasterizer=rasterizer, compositor=compositor)` and adding the `gamma` parameter to the forward function. All PyTorch3D camera types are supported as far as possible; keyword arguments are properly forwarded to the camera. The `PerspectiveCamera` and `OrthographicCamera` require znear and zfar as additional parameters for the forward pass.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D21421443
      
      fbshipit-source-id: 4aa0a83a419592d9a0bb5d62486a1cdea9d73ce6
      960fd6d8
    • Christoph Lassner's avatar
      pulsar integration. · b19fe1de
      Christoph Lassner authored
      Summary:
      This diff integrates the pulsar renderer source code into PyTorch3D as an alternative backend for the PyTorch3D point renderer. This diff is the first of a series of three diffs to complete that migration and focuses on the packaging and integration of the source code.
      
      For more information about the pulsar backend, see the release notes and the paper (https://arxiv.org/abs/2004.07484). For information on how to use the backend, see the point cloud rendering notebook and the examples in the folder `docs/examples`.
      
      Tasks addressed in the following diffs:
      * Add the PyTorch3D interface,
      * Add notebook examples and documentation (or adapt the existing ones to feature both interfaces).
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23947736
      
      fbshipit-source-id: a5e77b53e6750334db22aefa89b4c079cda1b443
      b19fe1de
  17. 30 Oct, 2020 1 commit
    • Dave Schnizlein's avatar
      Update cameras to accept projection matrix as input · 36fb257e
      Dave Schnizlein authored
      Summary: To initialize the Cameras class currently we require the principal point, focal length and other parameters to be specified from which we calculate the intrinsic matrix. In some cases the matrix might be directly available e.g. from a dataset and the associated metadata for an image.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24489509
      
      fbshipit-source-id: 1b411f19c5f6c8074bcfbf613f3339d5e242c119
      36fb257e
  18. 29 Oct, 2020 1 commit
    • Jeremy Reizenstein's avatar
      remove texture_vis test · 0e5f4f76
      Jeremy Reizenstein authored
      Summary: This recently added test is sensitive to the version of PIL because of different algorithms to draw ellipses/circles. Remove it as there is no obvious safe way to test this. Replace with a test for the underlying centres_for_image().
      
      Reviewed By: theschnitz
      
      Differential Revision: D24622465
      
      fbshipit-source-id: e46d7384df491c71ac87ba8bbbce89507ac40080
      0e5f4f76
  19. 27 Oct, 2020 1 commit
    • Jeremy Reizenstein's avatar
      images for debugging TexturesUV · aa4cc0ad
      Jeremy Reizenstein authored
      Summary: New methods to directly plot a TexturesUV map with its used points, using PIL and matplotlib.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23782968
      
      fbshipit-source-id: 692970857b5be13a35a3175dc82ac03963a73555
      aa4cc0ad
  20. 21 Oct, 2020 1 commit
    • Jeremy Reizenstein's avatar
      axis_angle representation of rotations · c93c4dd7
      Jeremy Reizenstein authored
      Summary: We can represent a rotation as a vector in the axis direction, whose length is the rotation anticlockwise in radians around that axis.
      
      Reviewed By: gkioxari
      
      Differential Revision: D24306293
      
      fbshipit-source-id: 2e0f138eda8329f6cceff600a6e5f17a00e4deb7
      c93c4dd7
  21. 16 Oct, 2020 1 commit
  22. 15 Oct, 2020 2 commits
    • Jeremy Reizenstein's avatar
      matrix_to_quaternion corner case · 4d52f9fb
      Jeremy Reizenstein authored
      Summary: Issue #119. The function `sqrt(max(x, 0))` is not convex and has infinite gradient at 0, but 0 is a subgradient at 0. Here we implement it in such a way as to give 0 as the gradient.
      
      Reviewed By: gkioxari
      
      Differential Revision: D24306294
      
      fbshipit-source-id: 48d136faca083babad4d64970be7ea522dbe9e09
      4d52f9fb
    • John Reese's avatar
      apply black 20.8b1 formatting update · 2d397236
      John Reese authored
      Summary:
      allow-large-files
      
      black_any_style
      
      Reviewed By: zertosh
      
      Differential Revision: D24325133
      
      fbshipit-source-id: b4afe80d1e8b2bc993f4b8e3822c02964df47462
      2d397236
  23. 07 Oct, 2020 1 commit
    • Nikhila Ravi's avatar
      Fix texture atlas for objs which only have material properties · f5383a7e
      Nikhila Ravi authored
      Summary:
      Fix for GitHub issue #381.
      
      The example mesh provided in the issue only had material properties but no texture image. The current implementation of texture atlassing generated an atlas using both the material properties and the texture image but only worked if there was a texture image and associated vertex uv coordinates. I have now modified the texture atlas creation so that it doesn't require an image and can work with materials which only have material properties.
      
      Reviewed By: gkioxari
      
      Differential Revision: D24153068
      
      fbshipit-source-id: 63e9d325db09a84b336b83369d5342ce588a9932
      f5383a7e
  24. 06 Oct, 2020 2 commits
    • Georgia Gkioxari's avatar
      add texture vertex sampling functionality to textures · e651a429
      Georgia Gkioxari authored
      Summary: Enhance every texture type with `faces_verts_textures_packed` that allows users to query the texture of each vertex in mesh
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24058778
      
      fbshipit-source-id: 19d0e3a244fa96aae462c47bf52e07dfd3b7c6f0
      e651a429
    • Georgia Gkioxari's avatar
      extend sample_points_from_meshes with texture · 327bd2b9
      Georgia Gkioxari authored
      Summary:
      Enhanced `sample_points_from_meshes` with texture sampling
      
      * This new feature is used to return textures corresponding to the sampled points in `sample_points_from_meshes`
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24031525
      
      fbshipit-source-id: 8e5d8f784cc38aa391aa8e84e54423bd9fad7ad1
      327bd2b9
  25. 01 Oct, 2020 1 commit
    • Patrick Labatut's avatar
      Fix a few linting warnings · 8219a52c
      Patrick Labatut authored
      Summary: Fix a few linting warnings
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20720810
      
      fbshipit-source-id: c5b6a25fdd7971cc8743b54bbe162464a874071d
      8219a52c
  26. 24 Sep, 2020 1 commit
    • Nikhila Ravi's avatar
      Support for moving the renderer to a new device · 956d3a01
      Nikhila Ravi authored
      Summary:
      Support for moving all the tensors of the renderer to another device by calling `renderer.to(new_device)`
      
      Currently the `MeshRenderer`, `MeshRasterizer` and `SoftPhongShader` (and other shaders) are all of type `nn.Module` which already supports easily moving tensors of submodules (defined as class attributes) to a different device. However the class attributes of the rasterizer and shader (e.g. cameras, lights, materials), are of type `TensorProperties`, not nn.Module so we need to explicity create a `to` method to move these tensors to device. Note that the `TensorProperties` class already has a `to` method so we only need to call `cameras.to(device)` and don't need to worry about the internal tensors.
      
      The other option is of course making these other classes (cameras, lights etc) also of type nn.Module.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23885107
      
      fbshipit-source-id: d71565c442181f739de4d797076ed5d00fb67f8e
      956d3a01
  27. 23 Sep, 2020 1 commit
    • andrijazz's avatar
      resouces filenames with spaces (#358) · b1eee579
      andrijazz authored
      Summary:
      I'm constantly encountering 3D models with resources that have spaces in their filenames (especially on Windows) and therefore they can't be loaded in pytorch3d. Let me know what you think.
      
      Thanks
      
      Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/358
      
      Reviewed By: bottler
      
      Differential Revision: D23798492
      
      Pulled By: nikhilaravi
      
      fbshipit-source-id: 4d85b7ee05339486d2e5ef53a531f8e6052251c5
      b1eee579
  28. 21 Sep, 2020 1 commit
    • Jeremy Reizenstein's avatar
      save_ply binary · 197f1d62
      Jeremy Reizenstein authored
      Summary:
      Make save_ply save to binary instead of ascii. An option makes the previous functionality available. save_ply's API accepts a stream, but this is undocumented; that stream must now be a binary stream not a text stream.
      
      Avoiding warnings about making tensors from immutable numpy arrays.
      
      Possible performance improvement when reading binary files.
      
      Fix reading zero-length binary lists.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22333118
      
      fbshipit-source-id: b423dfd3da46e047bead200255f47a7707306811
      197f1d62
  29. 19 Sep, 2020 1 commit
  30. 14 Sep, 2020 1 commit
    • Amitav Baruah's avatar
      Add background color support to compositors · 872ff8c7
      Amitav Baruah authored
      Summary: Support rendering different color backgrounds for pointclouds for both compositors
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23611043
      
      fbshipit-source-id: ab029650d51349340372c5bd66700e6577d48851
      872ff8c7
  31. 10 Sep, 2020 1 commit
    • Amitav Baruah's avatar
      Fix look_at corner case · eb517dd7
      Amitav Baruah authored
      Summary: When the camera is vertically oriented, calculating the look_at x-axis (also known as the "right" vector) does not succeed, resulting in the x-axis being placed at the origin. Adds a check to correctly calculate the x-axis if this case occurs.
      
      Reviewed By: nikhilaravi, sbranson
      
      Differential Revision: D23511859
      
      fbshipit-source-id: ee5145cdbecdbe2f7c7d288588bd0899480cb327
      eb517dd7