1. 10 Nov, 2020 1 commit
    • 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 22 Oct, 2020 2 commits
  7. 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
  8. 12 Oct, 2020 1 commit
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 21 Aug, 2020 3 commits
    • Georgia Gkioxari's avatar
      camera refactoring · 57a22e73
      Georgia Gkioxari authored
      Summary:
      Refactor cameras
      * CamerasBase was enhanced with `transform_points_screen` that transforms projected points from NDC to screen space
      * OpenGLPerspective, OpenGLOrthographic -> FoVPerspective, FoVOrthographic
      * SfMPerspective, SfMOrthographic -> Perspective, Orthographic
      * PerspectiveCamera can optionally be constructred with screen space parameters
      * Note on Cameras and coordinate systems was added
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23168525
      
      fbshipit-source-id: dd138e2b2cc7e0e0d9f34c45b8251c01266a2063
      57a22e73
    • mlygao@devgpu002.atn3.facebook.com's avatar
      ShapeNetCore & R2N2 tutorial · 9242e7e6
      mlygao@devgpu002.atn3.facebook.com authored
      Summary: Tutorial for ShapeNetCore & R2N2.
      
      Reviewed By: gkioxari
      
      Differential Revision: D22916882
      
      fbshipit-source-id: 752742be87f44919164ec7eafcc9c09c17a0f8a3
      9242e7e6
    • Anton Troynikov's avatar
      Fix 404 link in Renderer Doc (#330) · 370f1c38
      Anton Troynikov authored
      Summary:
      Because of the way Sphinx was parsing this link in Markdown, the link wasn't working properly. This should fix it.
      
      Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/330
      
      Test Plan: Tested via local Sphinx.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23244163
      
      Pulled By: atroyn
      
      fbshipit-source-id: 019712a841d76391a5210dcd98c77a822947204a
      370f1c38
  18. 14 Aug, 2020 1 commit
  19. 29 Jul, 2020 2 commits
    • Nikhila Ravi's avatar
      Texturing API updates · a3932960
      Nikhila Ravi authored
      Summary:
      A fairly big refactor of the texturing API with some breaking changes to how textures are defined.
      
      Main changes:
      - There are now 3 types of texture classes: `TexturesUV`, `TexturesAtlas` and `TexturesVertex`. Each class:
         - has a `sample_textures` function which accepts the `fragments` from rasterization and returns `texels`. This means that the shaders will not need to know the type of the mesh texture which will resolve several issues people were reporting on GitHub.
        -  has a `join_batch` method for joining multiple textures of the same type into a batch
      
      Reviewed By: gkioxari
      
      Differential Revision: D21067427
      
      fbshipit-source-id: 4b346500a60181e72fdd1b0dd89b5505c7a33926
      a3932960
    • Georgia Gkioxari's avatar
      remove composite params from tutorials · 42b5b965
      Georgia Gkioxari authored
      Summary: Remove composite params from tutorial
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22809242
      
      fbshipit-source-id: e5ed4e93fc892baf74e3a464119f0d11973423c3
      42b5b965
  20. 23 Jul, 2020 1 commit
    • Steve Branson's avatar
      Add tutorial for fitting textured mesh to multi-view images · 9a5341bd
      Steve Branson authored
      Summary: Tutorial showing how to create a synthetic dataset by rendering a cow from multiple views, fit a mesh using a differential silhouette renderer, then fit a mesh using an RGB renderer.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22513859
      
      fbshipit-source-id: 24bdaac4ebec6dd01f98e2f5c702065f9335ff33
      9a5341bd
  21. 10 Jul, 2020 1 commit
    • Georgia Gkioxari's avatar
      remove unused params + cubify note · 3d7dea58
      Georgia Gkioxari authored
      Summary:
      This diff
      * removes the unused compositing params
      * adds a note describing cubify
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22426191
      
      fbshipit-source-id: e8aa32040bb594e1dfd7d6d98e29264feefcec7c
      3d7dea58
  22. 03 Jul, 2020 2 commits
    • Jeremy Reizenstein's avatar
      CPU device for tutorials · 275ddade
      Jeremy Reizenstein authored
      Reviewed By: nikhilaravi
      
      Differential Revision: D22357376
      
      fbshipit-source-id: c103f9b0c798d4425d642781b5bfbb1a27310270
      275ddade
    • Jeremy Reizenstein's avatar
      strip output from tutorials · 52979226
      Jeremy Reizenstein authored
      Summary: It's easier to understand code changes if we don't store the output in the notebooks. This is just a run of nbstripout on all the notebooks.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22357375
      
      fbshipit-source-id: bffdb426af2f676d448630d717658d609c224811
      52979226
  23. 29 Jun, 2020 1 commit
    • Luya Gao's avatar
      Adding datasets.rst to modules · b636f295
      Luya Gao authored
      Summary: Adding datasets.rst to modules and update index.rst.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D22187578
      
      fbshipit-source-id: e70cf49fa276db8a106c67a2edab530b6dba2dee
      b636f295
  24. 06 May, 2020 1 commit
    • Nikhila Ravi's avatar
      allow cameras to be None in rasterizer initialization · 17ca6ecd
      Nikhila Ravi authored
      Summary: Fix to enable a mesh/point rasterizer to be initialized without having to specify the camera.
      
      Reviewed By: jcjohnson, gkioxari
      
      Differential Revision: D21362359
      
      fbshipit-source-id: 4f84ea18ad9f179c7b7c2289ebf9422a2f5e26de
      17ca6ecd
  25. 26 Apr, 2020 1 commit
    • Jeremy Reizenstein's avatar
      version 0.2.0 · 686c8666
      Jeremy Reizenstein authored
      Summary: Update version number for version 0.2.0.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D21157358
      
      fbshipit-source-id: 32a5b93e5dc65a31a806a5ce7231f8603fe02e85
      686c8666
  26. 20 Apr, 2020 1 commit
    • Nikhila Ravi's avatar
      coarse rasterization bug fix · 9ef1ee84
      Nikhila Ravi authored
      Summary:
      Fix a bug which resulted in a rendering artifacts if the image size was not a multiple of 16.
      Fix: Revert coarse rasterization to original implementation and only update fine rasterization to reverse the ordering of Y and X axis. This is much simpler than the previous approach!
      
      Additional changes:
      - updated mesh rendering end-end tests to check outputs from both naive and coarse to fine rasterization.
      - added pointcloud rendering end-end tests
      
      Reviewed By: gkioxari
      
      Differential Revision: D21102725
      
      fbshipit-source-id: 2e7e1b013dd6dd12b3a00b79eb8167deddb2e89a
      9ef1ee84
  27. 08 Apr, 2020 1 commit
    • Nikhila Ravi's avatar
      remove bin_size from the settings in the tutorials · 474c8b45
      Nikhila Ravi authored
      Summary: Remove `bin_size` and `max_faces_per_pixel` from being specified. This means the coarse-to-fine rasterization will be used by default and will help avoid confusion with the naive version.
      
      Reviewed By: jcjohnson
      
      Differential Revision: D20908905
      
      fbshipit-source-id: c181c88e844d888aa81a36870918307961dc1175
      474c8b45
  28. 29 Mar, 2020 1 commit
    • Patrick Labatut's avatar
      Address black + isort fbsource linter warnings · d57daa6f
      Patrick Labatut authored
      Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20558373
      
      fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
      d57daa6f
  29. 21 Mar, 2020 1 commit
    • Nikhila Ravi's avatar
      Tutorial updates · 6d34e1c6
      Nikhila Ravi authored
      Summary:
      Add a note about the difference between naive and coarse-to-fine rasterization to all the rendering tutorials.
      
      Update the render pointclouds tutorial to wget the data file.
      
      Reviewed By: gkioxari
      
      Differential Revision: D20575257
      
      fbshipit-source-id: a2806b9452438f97cb754f87e011c6e32e2545e4
      6d34e1c6
  30. 19 Mar, 2020 1 commit
    • Olivia's avatar
      Accumulate points (#4) · 53599770
      Olivia authored
      Summary:
      Code for accumulating points in the z-buffer in three ways:
      1. weighted sum
      2. normalised weighted sum
      3. alpha compositing
      
      Pull Request resolved: https://github.com/fairinternal/pytorch3d/pull/4
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20522422
      
      Pulled By: gkioxari
      
      fbshipit-source-id: 5023baa05f15e338f3821ef08f5552c2dcbfc06c
      53599770