1. 05 May, 2021 1 commit
    • Jeremy Reizenstein's avatar
      remove skimage import from most tutorials · d17b121d
      Jeremy Reizenstein authored
      Summary:
      Several tutorials were importing skimage and not using it (and it is not an official dependency of PyTorch3D).
      
      Also several had a bad call to plt.grid.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D28185822
      
      fbshipit-source-id: adabfd0d4d339e1081c26b7b28f5e3953b492f2e
      d17b121d
  2. 14 Apr, 2021 1 commit
  3. 09 Apr, 2021 1 commit
    • Jeremy Reizenstein's avatar
      spelling · 124bb5e3
      Jeremy Reizenstein authored
      Summary: Collection of spelling things, mostly in docs / tutorials.
      
      Reviewed By: gkioxari
      
      Differential Revision: D26101323
      
      fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
      124bb5e3
  4. 17 Mar, 2021 2 commits
    • Jeremy Reizenstein's avatar
      Remove _read_image from densepose example · 6c4151a8
      Jeremy Reizenstein authored
      Summary:
      As noted in #601, the example notebook was using an internal function _read_image from PyTorch3D, which has changed signature recently. It is not meant to be used externally. Switch to using PIL directly.
      
      Other changes: (1) removed unused skimage import. (2) some small tidyups. We now don't have places where cells modify values set by other cells. (3) removed bad calls to `plt.grid` which have no effect.
      
      Reviewed By: theschnitz, nikhilaravi
      
      Differential Revision: D27080372
      
      fbshipit-source-id: 2fce651b3e5d7a4619f0a2b298c5db18c8fa1e2c
      6c4151a8
    • Jeremy Reizenstein's avatar
      Tidy comments around imports · 8e1bcd55
      Jeremy Reizenstein authored
      Summary: Make black and isort stop disagreeing by removing some unneeded comments around import statements. pyre ignores are moved.
      
      Reviewed By: theschnitz
      
      Differential Revision: D27118137
      
      fbshipit-source-id: 9926d0f21142adcf9b5cfe1d394754317f6386df
      8e1bcd55
  5. 26 Feb, 2021 1 commit
    • Nikhila Ravi's avatar
      pulsar image size bug fix · 4bb3fff5
      Nikhila Ravi authored
      Summary: Small change to swap how height/width are inferred from the image_size setting.
      
      Reviewed By: gkioxari
      
      Differential Revision: D26648340
      
      fbshipit-source-id: 2c657a115c96cadf3ac63be87b0e1bfba10c9315
      4bb3fff5
  6. 05 Feb, 2021 1 commit
    • Jeremy Reizenstein's avatar
      update notebooks for s3 wheels · db6fbfad
      Jeremy Reizenstein authored
      Summary: Prepare the tutorial notebooks to use wheels from S3 when run on colab.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D26226932
      
      fbshipit-source-id: 1f9366c3fb4ba195333a5d5dfa3f6876ea934508
      db6fbfad
  7. 22 Jan, 2021 2 commits
    • imlixinyang's avatar
      Update generate_cow_renders.py (#529) · 2ee11c78
      imlixinyang authored
      Summary:
      Typo fixed.
      
      Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/529
      
      Reviewed By: bottler
      
      Differential Revision: D26008651
      
      Pulled By: nikhilaravi
      
      fbshipit-source-id: 76d5baadba7bcd3577397adb842e964ee4490b7d
      2ee11c78
    • Jeremy Reizenstein's avatar
      Allow single offset in offset_verts · ddebdfbc
      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
      ddebdfbc
  8. 07 Jan, 2021 1 commit
    • Jeremy Reizenstein's avatar
      skeleton of pluggable IO · b183dcb6
      Jeremy Reizenstein authored
      Summary: Unified interface for loading and saving meshes and pointclouds.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D25372968
      
      fbshipit-source-id: 6fe57cc3704a89d81d13e959bee707b0c7b57d3b
      b183dcb6
  9. 06 Jan, 2021 2 commits
    • David Novotny's avatar
      Tutorial - Fit neural radiance field · 9fc661f8
      David Novotny authored
      Summary: Implements a simple nerf tutorial.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24650983
      
      fbshipit-source-id: b3db51c0ed74779ec9b510350d1675b0ae89422c
      9fc661f8
    • David Novotny's avatar
      Tutorial - Fit textured volume. · 01f86dde
      David Novotny authored
      Summary: Implements a notebook that fits a volume to multiple views of the cow mesh.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24553385
      
      fbshipit-source-id: 367ca39e176b40df2c5946c9c05d3be824dc8d1c
      01f86dde
  10. 24 Dec, 2020 1 commit
    • Jeremy Reizenstein's avatar
      iopath dependency · 513a6476
      Jeremy Reizenstein authored
      Summary: Add ioPath as a dependency of PyTorch3D in preparation for using the new PathManager.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D25372971
      
      fbshipit-source-id: d8aa661d2de975e747dd494edc42bf843990cf68
      513a6476
  11. 22 Dec, 2020 1 commit
    • Jeremy Reizenstein's avatar
      requirements for readthedocs · 0a309ec6
      Jeremy Reizenstein authored
      Summary: Use a more recent PyTorch to build the documentation.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D25679756
      
      fbshipit-source-id: 83d647f709337110d39886eaa6aad2565d740c6d
      0a309ec6
  12. 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
  13. 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
  14. 11 Nov, 2020 1 commit
  15. 10 Nov, 2020 2 commits
    • Jeremy Reizenstein's avatar
      CUB when installing inside tutorials · de7af4a7
      Jeremy Reizenstein authored
      Summary:
      We now require CUB for building, here we make the tutorials include it.
      
      Also make the installation cell do nothing if it has already succeeded.
      
      I use curl not wget, and `os.environ` to set the variables not shell methods, because they are more likely to work on Windows.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24860574
      
      fbshipit-source-id: 5be86af15e53f8db016ee0e96fb43153bd69adbc
      de7af4a7
    • 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
  16. 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
  17. 03 Nov, 2020 2 commits
    • Christoph Lassner's avatar
      examples and docs. · 039e0260
      Christoph Lassner authored
      Summary: This diff updates the documentation and tutorials with information about the new pulsar backend. 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.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24498129
      
      fbshipit-source-id: e312b0169a72b13590df6e4db36bfe6190d742f9
      039e0260
    • 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
  18. 29 Oct, 2020 1 commit
    • Jeremy Reizenstein's avatar
      import vis parts separately · fdcf3687
      Jeremy Reizenstein authored
      Summary: We envision `pytorch3d.vis` to contain submodules with different dependencies. Allow (and require) them to be imported independently.
      
      Reviewed By: theschnitz
      
      Differential Revision: D24622519
      
      fbshipit-source-id: 44840f70f5fd2bd410405bf09546024e48238744
      fdcf3687
  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. 22 Oct, 2020 2 commits
  21. 21 Oct, 2020 2 commits
    • Amitav Baruah's avatar
      Render PyTorch3d cameras in plotly · 005a334f
      Amitav Baruah authored
      Summary: Take in a renderer with camera(s) and render the cameras as wireframes in the corresponding plotly plots
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24151706
      
      fbshipit-source-id: f8e86d61f3d991500bafc0533738c79b96bda630
      005a334f
    • Amitav Baruah's avatar
      Update tutorials to reflect plotly refactor · 3d1863ce
      Amitav Baruah authored
      Summary: Change the two affected tutorials to use plot_scene and plot_batch_individually.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24235480
      
      fbshipit-source-id: ca9d73bfb7ccf733efaf16299c15927406d7f2aa
      3d1863ce
  22. 12 Oct, 2020 1 commit
  23. 06 Oct, 2020 1 commit
    • Amitav Baruah's avatar
      Rename visualization to vis · 5d65a0cf
      Amitav Baruah authored
      Summary: Importing from pytorch3d.visualization is wordy, so shortened the path to the vis module and updated the relevant imports.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24116527
      
      fbshipit-source-id: e0e4da7d48c5afedec07482d7be43362b6822445
      5d65a0cf
  24. 01 Oct, 2020 2 commits
    • Amitav Baruah's avatar
      Add note explaining plotly visualizations · 5c9485c7
      Amitav Baruah authored
      Summary: Add markdown note explaining why PyTorch3D has plotly visualizations, examples, and how to save these visualizations as an image.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23976283
      
      fbshipit-source-id: cbbaffd1f0ebe3466841e42fdb454d85773152cd
      5c9485c7
    • Amitav Baruah's avatar
      Add plotly visualization examples · a03fd732
      Amitav Baruah authored
      Summary: Add examples of using the Plotly visualization functions to the corresponding tutorial notebooks.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23879109
      
      fbshipit-source-id: ea8c45aa6c828eb2f6ea2ae1c8846adc486f92e0
      a03fd732
  25. 21 Sep, 2020 1 commit
    • Amitav Baruah's avatar
      Add tutorial notebook for rendering densepose · f34f4073
      Amitav Baruah authored
      Summary:
      Add a notebook demonstrating how to use Pytorch3D to render a textured mesh with the DensePose textures and the SMPL model
      
      {F336408690}
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23784314
      
      fbshipit-source-id: c92f32fb9b9468eb7ec26bf58dcabb1f26d92e7b
      f34f4073
  26. 14 Sep, 2020 1 commit
    • Amitav Baruah's avatar
      Add example of rendering pointclouds with a background color. · 61121b9f
      Amitav Baruah authored
      Summary:
      Add cells to the rendering_colored_points tutorial showing how to initialize a renderer and compositor that will render pointclouds with a background color.
      
      {F333731292}
      {F334136799}
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23632503
      
      fbshipit-source-id: e9ce0178b41e74baf912bd82ca1db41b680fc68f
      61121b9f
  27. 10 Sep, 2020 1 commit
    • Amitav Baruah's avatar
      Correctly create reference image silhouette · f2eb34dc
      Amitav Baruah authored
      Summary: Previously the tutorial code assumed that the reference image had a black background, resulting in an empty silhouette mask. Since the background is white, this change allows the model to find the correct silhouette mask.
      
      Reviewed By: nikhilaravi, sbranson
      
      Differential Revision: D23502202
      
      fbshipit-source-id: c3a570f93efd480323f27cb081db0a9fb54be219
      f2eb34dc
  28. 26 Aug, 2020 2 commits
    • Nikhila Ravi's avatar
      small website updates · c25fd836
      Nikhila Ravi authored
      Summary: Small fixes to website rendering
      
      Reviewed By: jcjohnson
      
      Differential Revision: D23281746
      
      fbshipit-source-id: c9dc8edd5e52f39d4e0e19f10ecc7e035b39feda
      c25fd836
    • Jeremy Reizenstein's avatar
      tutorial fixes. validate #cameras · 9aeb88b4
      Jeremy Reizenstein authored
      Summary:
      Update the installation cells to import torch.
      Replace use of deprecated Textures in deform tutorial.
      Correct the deform tutorial's idea of its own name.
      Fix typo in batched part of render_textured_meshes which meant only one mesh was being rendered with a batch of cameras.
      Add an error check in the rasterizer to make the error friendly from such a mistake elsewhere.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23345462
      
      fbshipit-source-id: 1d5bd25db052f7ef687b7168d7aee5cc4dce8952
      9aeb88b4
  29. 25 Aug, 2020 1 commit
    • Jeremy Reizenstein's avatar
      tutorial fixes from #336. Wheels with cuda10.1. · 32484500
      Jeremy Reizenstein authored
      Summary:
      Add a document to explain how to run the tutorials.
      Fix API of TexturesVertex in fit_textured_mesh.
      Prepare cuda 10.1 wheels (not 10.2) for linux to be available on pypi - this matches what colab has.
      Change the tutorials to use these new wheels.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23324479
      
      fbshipit-source-id: 60e92a3f46a2d878f811b7703638f8d1dae143d9
      32484500
  30. 22 Aug, 2020 2 commits
    • Nikhila Ravi's avatar
      Tutorials textures updates and fix bug in extending meshes with uv textures · 90f6a005
      Nikhila Ravi authored
      Summary:
      Found a bug in extending textures with vertex uv coordinates. This was due to the padded -> list conversion of vertex uv coordinates i.e.                 The number of vertices in the mesh and in verts_uvs can differ
      e.g. if a vertex is shared between 3 faces, it can
      have up to 3 different uv coordinates. Therefore we cannot convert directly from padded to list using _num_verts_per_mesh
      
      Reviewed By: bottler
      
      Differential Revision: D23233595
      
      fbshipit-source-id: 0c66d15baae697ead0bdc384f74c27d4c6539fc9
      90f6a005
    • Nikhila Ravi's avatar
      Website and docs updates · d3307658
      Nikhila Ravi authored
      Summary:
      - Added sbranson's fit mesh tutorial to the website
      - Updated rendering docs with info about texturing and new shader types.
      
      TODO:
      - add pointcloud rendering tutorial to the website as well (https://github.com/facebookresearch/pytorch3d/blob/master/docs/tutorials/render_colored_points.ipynb)
      - docs for camera
      - update some tutorials which depended on the Textures from structures.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23143977
      
      fbshipit-source-id: 6843c9bf3ce11115c459c64da5b0ad778dc92177
      d3307658