134 Commits

Author SHA1 Message Date
Jeremy Reizenstein
dc2c7e489f docs build remove mock after D45600232
Summary: We now use unittest.mock

Reviewed By: shapovalov

Differential Revision: D45868799

fbshipit-source-id: cd1042dc2c49c82c7b9e024f761c496049a31beb
2023-06-16 04:50:30 -07:00
Richard Higgins
88429853b9 1-line tutorial notebook plotting change to fix blank figure problem (#1549)
Summary:
Hi,

Not sure this is the best fix. But while running this notebook, I only ever saw a blank canvas when trying to visualize the dolphin. It might be that I have a broken dependency, like plotly. I also don't know what the visualization is "supposed" to look like.

But incase other people have this issue, this one line change solved the whole problem for me. Now I have a happy, rotatable dolphin.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1549

Reviewed By: shapovalov

Differential Revision: D46350930

Pulled By: bottler

fbshipit-source-id: e19aa71eb05a93e2955262a2c90d1f0d09576228
2023-06-16 04:35:15 -07:00
Jeremy Reizenstein
928efdd640 fix camera plot for new matplotlib
Summary: fixes https://github.com/facebookresearch/pytorch3d/issues/1554 , needed for Matplotlib 3.6+

Reviewed By: patricklabatut

Differential Revision: D46438822

fbshipit-source-id: f3c06ad5d8e881a635edd14f96d498dca73c169f
2023-06-07 05:10:10 -07:00
generatedunixname89002005287564
ec87284c4b Replace third-party mock with unittest.mock] vision/fair
Reviewed By: bottler

Differential Revision: D45600232

fbshipit-source-id: f41b95c6fca86d241666b54755a128cd33f6dd32
2023-05-05 09:36:30 -07:00
Xiao Xuan
f5a117c74b fix: correct typo in cameras.md (#1501)
Summary:
If my understanding is right, prp_screen[1] should be 32 rather than 48.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1501

Reviewed By: shapovalov

Differential Revision: D45044406

Pulled By: bottler

fbshipit-source-id: 7dd93312db4986f4701e642ba82d94333466b921
2023-05-05 08:13:39 -07:00
Jeremy Reizenstein
274b6df918 update notebooks for 0.7.3
Summary:
Allow pytorch2.0 download:
```
sed -i 's/startswith(\\"1.13.\\")/startswith\(\(\\"1.13.\\", \\"2.0.\\"\)\)/' *b
```

Remove lines which download and install CUB:
```
sed -i.bak '/1.10\.0/d' *b
rm *.bak
```

Reviewed By: davidsonic

Differential Revision: D44343299

fbshipit-source-id: e8399b5dd10068c717178ba9ffb0630bacca3253
2023-04-04 07:48:02 -07:00
Jeremy Reizenstein
013ff4fd90 doc fix load_point_cloud => load_pointcloud
Summary:
spelling errors in io.md

see https://github.com/facebookresearch/pytorch3d/discussions/1450

Reviewed By: davidsonic

Differential Revision: D43269978

fbshipit-source-id: 4bbe1f00bdeda4c51b7620e7b9cc065840303530
2023-03-09 10:11:13 -08:00
yurimalheiros
1b4b67fd7f Minor fixes to the Fit Mesh tutorial (#1423)
Summary:
- Fix the numbers in the headers. Currently, there are no header number 2, the tutorial jump from 1 to 3.
- Clean some unnecessary code.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1423

Reviewed By: shapovalov

Differential Revision: D42478609

Pulled By: bottler

fbshipit-source-id: c49fc10b7d38c3573c92fea737101e6c06bbea38
2023-01-15 08:56:12 -08:00
Jeremy Reizenstein
6c053a6cea Update notebooks for 0.7.2
Summary: Expect pytorch 1.13

Reviewed By: davidsonic

Differential Revision: D42072731

fbshipit-source-id: 13ba4e7de18060dc4e5c0e10f850f17a88750fc9
2022-12-15 16:15:45 -08:00
Jeremy Reizenstein
9a0b0c2e74 renderer and vis readthedocs #1363
Summary: Autogenerate docs for the renderer too. This will be helpful but make a slightly ugly TOC

Reviewed By: kjchalup

Differential Revision: D40977315

fbshipit-source-id: 10831de3ced68080cb5671c5dc31d4da8500f761
2022-11-15 14:10:22 -08:00
Jeremy Reizenstein
c54e048666 more readthedocs
Summary: Quote formats, spelling

Reviewed By: shapovalov

Differential Revision: D40913734

fbshipit-source-id: d6dea65d5204b3c463c656a07ef9b447b7be6a0a
2022-11-02 05:19:15 -07:00
David Novotny
f7ac7b604a readthedocs fixes
Summary: Fixes readthedocs. Sphinx build looks good.

Reviewed By: bottler

Differential Revision: D40893196

fbshipit-source-id: bf00384b921d4ef54e64745ed39172358c2f9bb3
2022-11-01 05:46:13 -07:00
Jeremy Reizenstein
cd113efd98 Add implicitron to readthedocs
Summary: Try to document implicitron. Most of this is autogenerated.

Reviewed By: shapovalov

Differential Revision: D40623742

fbshipit-source-id: 453508277903b7d987b1703656ba1ee09bc2c570
2022-10-31 14:44:41 -07:00
Jeremy Reizenstein
88620b6847 attempt to fix doc build #1363
Summary: installing from git: is failing

Reviewed By: shapovalov

Differential Revision: D40635668

fbshipit-source-id: 604ba5425e14caeabe4e178bf7f851f2163419bd
2022-10-27 07:26:36 -07:00
Ji Hou
a2659e1730 Update iou3d.md (#1351)
Summary:
fix a typo

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1351

Reviewed By: shapovalov

Differential Revision: D40209834

Pulled By: bottler

fbshipit-source-id: 118133e0eab2df211e5c4f04371f2c695a9ceced
2022-10-15 21:41:02 -07:00
Darijan Gudelj
ad8907d373 ImplicitronRayBundle
Summary: new implicitronRayBundle with added cameraIDs and camera counts. Added to enable a single raybundle inside Implicitron and easier extension in the future. Since RayBundle is named tuple and RayBundleHeterogeneous is dataclass and RayBundleHeterogeneous cannot inherit RayBundle. So if there was no ImplicitronRayBundle every function that uses RayBundle now would have to use Union[RayBundle, RaybundleHeterogeneous] which is confusing and unecessary complicated.

Reviewed By: bottler, kjchalup

Differential Revision: D39262999

fbshipit-source-id: ece160e32f6c88c3977e408e966789bf8307af59
2022-10-03 08:36:47 -07:00
Jeremy Reizenstein
d6a197be36 make expand_args_fields optional
Summary: Call expand_args_field when instantiating an object.

Reviewed By: shapovalov

Differential Revision: D39541931

fbshipit-source-id: de8e1038927ff0112463394412d5d8c26c4a1e17
2022-09-22 08:36:09 -07:00
Jeremy Reizenstein
5e7707b157 Update SMPL url
Summary: Fix issue #1306

Reviewed By: kjchalup

Differential Revision: D38941342

fbshipit-source-id: 306ea698ab6af22b874df6e2abdaa9021b65e1ef
2022-08-23 13:19:18 -07:00
Jeremy Reizenstein
c49ebad249 tutorial fix: add visdom
Summary: need to pip install visdom in new volumes tutorial.

Reviewed By: kjchalup

Differential Revision: D38501905

fbshipit-source-id: 534bf097e41f05b3389e9420e6dd2b61a4517861
2022-08-09 20:48:51 -07:00
Jeremy Reizenstein
65e5bb3ea1 update notebooks for 0.7.0
Summary: We now expect pytorch 1.12

Reviewed By: patricklabatut

Differential Revision: D38425758

fbshipit-source-id: a22e672fcb0dc18f7d6424323d9cc6aaf5fcb4c6
2022-08-09 17:52:37 -07:00
Jeremy Reizenstein
b28754f8e1 config system tutorial
Summary: new

Reviewed By: kjchalup

Differential Revision: D38425731

fbshipit-source-id: 0fd8f524df6b29ceb8c7c9a674022412c1efc3b5
2022-08-04 13:24:15 -07:00
Jeremy Reizenstein
89d8eebc5a volumes tutorial
Summary: new

Reviewed By: kjchalup

Differential Revision: D38425739

fbshipit-source-id: 23e7a1dd01c034b231511acecf40ea0deb9a067f
2022-08-04 13:19:38 -07:00
Jeremy Reizenstein
14bd5e28e8 provide cow dataset
Summary: Make a dummy single-scene dataset using the code from generate_cow_renders (used in existing NeRF tutorials)

Reviewed By: kjchalup

Differential Revision: D38116910

fbshipit-source-id: 8db6df7098aa221c81d392e5cd21b0e67f65bd70
2022-08-01 01:52:12 -07:00
Jeremy Reizenstein
44ca5f95d9 Add vis to readthedocs
Summary: pytorch3d/vis has been missing. Reduce prominence of common.

Reviewed By: patricklabatut

Differential Revision: D36008733

fbshipit-source-id: bbc9fbb031c8dc95870087fa48df29410ae69e35
2022-05-06 04:07:43 -07:00
Jeremy Reizenstein
a268b18e07 update tutorials for version 0.6.2
Summary: colab is now 1.11.0

Differential Revision: D35980556

fbshipit-source-id: 988a06c652518fb61ccbef2e7197e3422a706250
2022-04-28 04:48:24 -07:00
Krzysztof Chalupka
7ea0756b05 fit_textured_mesh tutorial fixes
Summary: Updated to FoV cameras and added perspective_correct=False, otherwise it'll nan out.

Reviewed By: bottler

Differential Revision: D35970900

fbshipit-source-id: 569b8de0b124d415f4b841924ddc85585cee2dda
2022-04-27 12:18:03 -07:00
Krzysztof Chalupka
c3c4495c7a Fix image links in renderer documentation
Summary: Repo has jpgs but docs/website want pngs.

Reviewed By: nikhilaravi

Differential Revision: D35596475

fbshipit-source-id: 4cafd405c06c0eb339001a8db2422dbbd1f8f28a
2022-04-14 16:37:07 -07:00
Tim Hatch
34bbb3ad32 apply import merging for fbcode/vision/fair (2 of 2)
Summary:
Applies new import merging and sorting from µsort v1.0.

When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.

Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.

For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting

Reviewed By: bottler

Differential Revision: D35553814

fbshipit-source-id: be49bdb6a4c25264ff8d4db3a601f18736d17be1
2022-04-13 06:51:33 -07:00
h5jam
0a7c354dc1 fix typo on NeRF tutorial (#1163)
Summary:
Hello, I'm Seungoh from South Korea.

I'm finding typo while I'm learning tutorials.
Wrong numbers are changed to right numbers.

Thank you.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1163

Reviewed By: patricklabatut

Differential Revision: D35546843

Pulled By: bottler

fbshipit-source-id: b6e70cdf821fd4a108dfd416e8f4bcb3ecbeb449
2022-04-13 04:35:05 -07:00
Jeremy Reizenstein
67778caee8 avoid deprecated raysamplers
Summary: Migrate away from NDCGridRaysampler and GridRaysampler to their more flexible replacements.

Reviewed By: patricklabatut

Differential Revision: D33281584

fbshipit-source-id: 65f8702e700a32d38f7cd6bda3924bb1707a0633
2022-01-24 10:52:23 -08:00
Jeremy Reizenstein
174738c33e safer pip install in doc
Summary: Add --no-cache and --no-index to all commands which try to download wheels from S3, to avoid hitting pypi.

Reviewed By: nikhilaravi

Differential Revision: D33507975

fbshipit-source-id: ee796e43cc1864e475cd73c248e9900487012f25
2022-01-21 06:28:32 -08:00
Jeremy Reizenstein
741777b5b5 More company name & License
Summary: Manual adjustments for license changes.

Reviewed By: patricklabatut

Differential Revision: D33405657

fbshipit-source-id: 8a21735726f3aece9f9164da9e3b272b27db8032
2022-01-04 11:43:38 -08:00
Jeremy Reizenstein
9eeb456e82 Update license for company name
Summary: Update all FB license strings to the new format.

Reviewed By: patricklabatut

Differential Revision: D33403538

fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
2022-01-04 11:43:38 -08:00
Jeremy Reizenstein
eb2bbf8433 screen space docstrings fix
Summary: Fix some comments to match the recent change to transform_points_screen.

Reviewed By: patricklabatut

Differential Revision: D33243697

fbshipit-source-id: dc8d182667a9413bca2c2e3657f97b2f7a47c795
2021-12-21 04:31:33 -08:00
Jeremy Reizenstein
1152a93b72 PyTorch>1.9 version str
Summary: Make code for downloading linux wheels robust to double-digit PyTorch minor version.

Reviewed By: nikhilaravi

Differential Revision: D33170562

fbshipit-source-id: 559a97cc98ff8411e235a9f9e29f84b7a400c716
2021-12-18 15:49:17 -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
bf3bc6f8e3 screen cameras lose -1
Summary:
All the renderers in PyTorch3D (pointclouds including pulsar, meshes, raysampling) use align_corners=False style. NDC space goes between the edges of the outer pixels. For a non square image with W>H, the vertical NDC space goes from -1 to 1 and the horizontal from -W/H to W/H.

However it was recently pointed out that functionality which deals with screen space inside the camera classes is inconsistent with this. It unintentionally uses align_corners=True. This fixes that.

This would change behaviour of the following:
- If you create a camera in screen coordinates, i.e. setting in_ndc=False, then anything you do with the camera which touches NDC space may be affected, including trying to use renderers. The transform_points_screen function will not be affected...
- If you call the function “transform_points_screen” on a camera defined in NDC space results will be different. I have illustrated in the diff how to get the old results from the new results but this probably isn’t the right long-term solution..

Reviewed By: gkioxari

Differential Revision: D32536305

fbshipit-source-id: 377325a9137282971dcb7ca11a6cba3fc700c9ce
2021-12-07 15:04:20 -08:00
Patrick Labatut
e4456dba2f Facebook -> Meta Platforms on website footer + docs
Summary: Update company copyright on website footer + documentation pages, see [guidelines](https://www.internalfb.com/intern/wiki/Open_Source/Launch_an_OSS_Project/Launch_Preparation/Automated_Checkup/Terms_Of_Use_&_Privacy_Policy/).

Reviewed By: bottler

Differential Revision: D32649563

fbshipit-source-id: f285be79c185496832c5d41b839ee974234a8fa5
2021-11-24 10:07:15 -08:00
Ignacio Rocco
16ebf54e69 NDC doc fix (#28)
Summary:
- Added clarifications about NDC coordinate system for square and non-square images.

Pull Request resolved: https://github.com/fairinternal/pytorch3d/pull/28

Reviewed By: nikhilaravi

Differential Revision: D31681444

Pulled By: bottler

fbshipit-source-id: f71eabe9b3dd54b9372cef617e08f837f316555b
2021-10-17 07:41:57 -07:00
Jeremy Reizenstein
14dd2611ee Remove version number from docs title
Summary: Small docs fixes: spelling. Avoid things which get out of date quickly: year, version.

Reviewed By: patricklabatut

Differential Revision: D31659927

fbshipit-source-id: b0111140bdaf3c6cadc09f70621bf5656909ca02
2021-10-16 15:06:23 -07:00
Georgia Gkioxari
1360d69ffb minor note fix
Summary: A small fix for the iou3d note

Reviewed By: bottler

Differential Revision: D31370686

fbshipit-source-id: 6c97302b5c78de52915f31be70f234179c4b246d
2021-10-03 17:17:47 -07:00
Georgia Gkioxari
1b1ba5612f Note for iou3d
Summary:
A note for our new algorithm for IoU of oriented 3D boxes. It includes
* A description of the algorithm
* A comparison with Objectron

Reviewed By: nikhilaravi

Differential Revision: D31288066

fbshipit-source-id: 0ea8da887bc5810bf4a3e0848223dd3590df1538
2021-09-29 19:15:19 -07:00
Alex Naumann
d2bbd0cdb7 Fix link to render textured meshes example (#818)
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
2021-08-30 13:11:53 -07: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
Georgia Gkioxari
0c32f094af NDC/screen cameras API fix, compatibility with renderer
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
2021-08-02 01:01:10 -07:00
Jeremy Reizenstein
10eb3892da Downloads from utils in a couple of tutorials
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
2021-07-06 15:32:24 -07:00
Patrick Labatut
5615f072d7 Add missing common module to auto-generated documentation
Summary: Add missing common module to auto-generated documentation

Reviewed By: nikhilaravi

Differential Revision: D29429687

fbshipit-source-id: fcbd02bda959b0f5674c344d17ce3f36ac4b85ae
2021-06-29 15:37:33 -07:00
Patrick Labatut
5284de6e97 Deprecate so3_exponential_map
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
2021-06-28 04:28:06 -07:00
Patrick Labatut
af93f34834 License lint codebase
Summary: License lint codebase

Reviewed By: theschnitz

Differential Revision: D29001799

fbshipit-source-id: 5c59869911785b0181b1663bbf430bc8b7fb2909
2021-06-22 03:45:27 -07:00