17 Commits

Author SHA1 Message Date
Jeremy Francis Reizenstein
3fc3ea507b PyTorch>1.9 version str
Make code for downloading linux wheels robust to double-digit PyTorch version.
2021-12-17 06:01:51 -08:00
Jeremy Reizenstein
093999e71f update tutorials for release
Summary: Pre 0.6.1 release, make the tutorials expect wheels with PyTorch 1.10.0

Reviewed By: patricklabatut

Differential Revision: D33016834

fbshipit-source-id: b8c5c1c6158f806c3e55ec668117fa762fa4b75f
2021-12-13 04:38:16 -08:00
Jeremy Reizenstein
b0dd0c8821 rename master branch to main
Summary: Change doc references to master branch to its new name main.

Reviewed By: nikhilaravi

Differential Revision: D30303018

fbshipit-source-id: cfdbb207dfe3366de7e0ca759ed56f4b8dd894d1
2021-08-16 04:06:53 -07:00
Jeremy Reizenstein
addbe49de1 update tutorials for new prebuilt version
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
2021-08-03 08:10:52 -07:00
Nikhila Ravi
a343cf534c Small fix to tutorial
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
2021-06-18 07:40:51 -07:00
Jeremy Reizenstein
d17b121d9d remove skimage import from most tutorials
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
2021-05-05 04:06:43 -07:00
Jeremy Reizenstein
1c45ec9770 Avoid gradients when rendering for visualization
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
2021-04-14 12:52:09 -07:00
Jeremy Reizenstein
124bb5e391 spelling
Summary: Collection of spelling things, mostly in docs / tutorials.

Reviewed By: gkioxari

Differential Revision: D26101323

fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
2021-04-09 09:58:54 -07:00
Jeremy Reizenstein
db6fbfad90 update notebooks for s3 wheels
Summary: Prepare the tutorial notebooks to use wheels from S3 when run on colab.

Reviewed By: nikhilaravi

Differential Revision: D26226932

fbshipit-source-id: 1f9366c3fb4ba195333a5d5dfa3f6876ea934508
2021-02-05 05:52:36 -08:00
Jeremy Reizenstein
ddebdfbcd7 Allow single offset in offset_verts
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
2021-01-22 07:33:31 -08:00
Jeremy Reizenstein
4296fd96c5 curl needs -L
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
2020-11-10 16:35:42 -08:00
Jeremy Reizenstein
de7af4a704 CUB when installing inside tutorials
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
2020-11-10 13:06:08 -08:00
Jeremy Reizenstein
9aeb88b48e tutorial fixes. validate #cameras
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
2020-08-26 08:27:53 -07:00
Jeremy Reizenstein
32484500be tutorial fixes from #336. Wheels with cuda10.1.
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
2020-08-25 13:11:10 -07:00
Nikhila Ravi
90f6a005b0 Tutorials textures updates and fix bug in extending meshes with uv textures
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
2020-08-21 19:20:09 -07:00
Georgia Gkioxari
57a22e7306 camera refactoring
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
2020-08-20 22:22:06 -07:00
Steve Branson
9a5341bde3 Add tutorial for fitting textured mesh to multi-view images
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
2020-07-23 12:14:45 -07:00