Summary:
Great work! :)
Just found a link in the examples that is not working. This will fix it.
Best,
Alex
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/818
Reviewed By: nikhilaravi
Differential Revision: D30637532
Pulled By: patricklabatut
fbshipit-source-id: ed6c52375d1e760cb0fb2c0a66648dfeb0c6ed46
Summary: Change doc references to master branch to its new name main.
Reviewed By: nikhilaravi
Differential Revision: D30303018
fbshipit-source-id: cfdbb207dfe3366de7e0ca759ed56f4b8dd894d1
Summary: At the next release, the prebuilt PyTorch3D wheels will depend on PyTorch 1.9.0. Update the tutorials to expect this.
Reviewed By: nikhilaravi
Differential Revision: D29614450
fbshipit-source-id: 39978a6a55b62fb7c7e62aaa8f138e47cadd631e
Summary:
API fix for NDC/screen cameras and compatibility with PyTorch3D renderers.
With this new fix:
* Users can define cameras and `transform_points` under any coordinate system conventions. The transformation applies the camera K and RT to the input points, not regarding for PyTorch3D conventions. So this makes cameras completely independent from PyTorch3D renderer.
* Cameras can be defined either in NDC space or screen space. For existing ones, FoV cameras are in NDC space. Perspective/Orthographic can be defined in NDC or screen space.
* The interface with PyTorch3D renderers happens through `transform_points_ndc` which transforms points to the NDC space and assumes that input points are provided according to PyTorch3D conventions.
* Similarly, `transform_points_screen` transforms points to screen space and again assumes that input points are under PyTorch3D conventions.
* For Orthographic/Perspective cameras, if they are defined in screen space, the `get_ndc_camera_transform` allows points to be converted to NDC for use for the renderers.
Reviewed By: nikhilaravi
Differential Revision: D26932657
fbshipit-source-id: 1a964e3e7caa54d10c792cf39c4d527ba2fb2e79
Summary: Fixes#514, so we don't assume user of the tutorial has access to utils.
Reviewed By: nikhilaravi
Differential Revision: D29557294
fbshipit-source-id: 10ac994be65df0822d3ee4e9d690189ff13074a2
Summary: Deprecate the `so3_exponential_map()` function in favor of its alias `so3_exp_map()`: this aligns with the naming of `so3_log_map()` and the recently introduced `se3_exp_map()` / `se3_log_map()` pair.
Reviewed By: bottler
Differential Revision: D29329966
fbshipit-source-id: b6f60b9e86b2995f70b1fbeb16f9feea05c55de9
Summary: Small fix to `fit_textured_mesh.ipynb` tutorial due to a recent change in numpy
Reviewed By: bottler
Differential Revision: D29219990
fbshipit-source-id: f5feeef9eb952720ea7154d066795fbbe64ce7a1
Summary:
The multiplicative factors in function embeddings go from `2**0` to `2**(self.n_harmonic_functions-1)`, and not from `2**0` to `2**self.n_harmonic_functions`.
Pull Request resolved: https://github.com/fairinternal/pytorch3d/pull/13
Reviewed By: nikhilaravi
Differential Revision: D28637894
Pulled By: ignacio-rocco
fbshipit-source-id: da20f39eba9aaa09af5b24be1554a3bfd7556281
Summary: Experimental data loader for taking the default scene from a GLB file and converting it to a single mesh in PyTorch3D.
Reviewed By: nikhilaravi
Differential Revision: D25900167
fbshipit-source-id: bff22ac00298b83a0bd071ae5c8923561e1d81d7
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
Summary: The renderer gets used for visualization only in places. Here we avoid creating an autograd graph during that, which is not needed and can fail because some of the graph which existed earlier might be needed and has not been retained after the optimizer step. See https://github.com/facebookresearch/pytorch3d/issues/624
Reviewed By: gkioxari
Differential Revision: D27593018
fbshipit-source-id: 62ae7a5a790111273aa4c566f172abd36c844bfb
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
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
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
Summary: Prepare the tutorial notebooks to use wheels from S3 when run on colab.
Reviewed By: nikhilaravi
Differential Revision: D26226932
fbshipit-source-id: 1f9366c3fb4ba195333a5d5dfa3f6876ea934508
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
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
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
Summary: Use a more recent PyTorch to build the documentation.
Reviewed By: nikhilaravi
Differential Revision: D25679756
fbshipit-source-id: 83d647f709337110d39886eaa6aad2565d740c6d
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
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
Summary: As mentioned in a comment on https://github.com/facebookresearch/pytorch3d/issues/438, curl must be told to follow redirects.
Reviewed By: nikhilaravi
Differential Revision: D24870138
fbshipit-source-id: 0c8aeb5146f8699bcea03d4108276fc24e9eab6b
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
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
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
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
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
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
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
Summary: We were importing torch, torchvision, PyTorch3D, and sys twice. This is just removing the duplicate (unneeded) imports
Reviewed By: theschnitz
Differential Revision: D24479270
fbshipit-source-id: 1048732f65242eb776c3eef537cb1ae58815c1eb
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
Summary: Change the two affected tutorials to use plot_scene and plot_batch_individually.
Reviewed By: nikhilaravi
Differential Revision: D24235480
fbshipit-source-id: ca9d73bfb7ccf733efaf16299c15927406d7f2aa
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
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
Summary: Add examples of using the Plotly visualization functions to the corresponding tutorial notebooks.
Reviewed By: nikhilaravi
Differential Revision: D23879109
fbshipit-source-id: ea8c45aa6c828eb2f6ea2ae1c8846adc486f92e0
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
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
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
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
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