Summary:
Fix an inclusive vs exclusive scan mix-up that was accidentally introduced when removing the Thrust dependency (`Thrust::exclusive_scan`) and reimplementing it using `at::cumsum` (which does an inclusive scan).
This fixes two Github reported issues:
* https://github.com/facebookresearch/pytorch3d/issues/1731
* https://github.com/facebookresearch/pytorch3d/issues/1751
Reviewed By: bottler
Differential Revision: D54605545
fbshipit-source-id: da9e92f3f8a9a35f7b7191428d0b9a9ca03e0d4d
Summary: The diff support colors in cubify for align = "center"
Reviewed By: bottler
Differential Revision: D53777011
fbshipit-source-id: ccb2bd1e3d89be3d1ac943eff08f40e50b0540d9
Summary: Add an option to run tests without the OpenGL Renderer.
Reviewed By: patricklabatut
Differential Revision: D53573400
fbshipit-source-id: 54a14e7b2f156d24e0c561fdb279f4a9af01b793
Summary:
Fixes https://github.com/facebookresearch/pytorch3d/issues/1641. The bug was caused by the mistaken downcasting of an int64_t into int, causing issues only on inputs large enough to have hashes that escaped the bounds of an int32.
Also added a test case for this issue.
Reviewed By: bottler
Differential Revision: D53505370
fbshipit-source-id: 0fdd0efc6d259cc3b0263e7ff3a4ab2c648ec521
Summary: This change updates the type of p2_idx from size_t to int64_t to address compiler warnings related to signed/unsigned comparison.
Reviewed By: bottler
Differential Revision: D52879393
fbshipit-source-id: de5484d78a907fccdaae3ce036b5e4a1a0a4de70
Summary: Fixed `get_rgbd_point_cloud` to take any number of image input channels.
Reviewed By: bottler
Differential Revision: D52796276
fbshipit-source-id: 3ddc0d1e337a6cc53fc86c40a6ddb136f036f9bc
Summary:
An OSS user has pointed out in https://github.com/facebookresearch/pytorch3d/issues/1703 that the output of matrix_to_quaternion (in that file) can be non standardized.
This diff solves the issue by adding a line of standardize at the end of the function
Reviewed By: bottler
Differential Revision: D52368721
fbshipit-source-id: c8d0426307fcdb7fd165e032572382d5ae360cde
Summary: Implement `submeshes` for TexturesUV. Fix what Meshes.submeshes passes to the texture's submeshes function to make this possible.
Reviewed By: bottler
Differential Revision: D52192060
fbshipit-source-id: 526734962e3376aaf75654200164cdcebfff6997
Summary: Performance improvement: Use torch.lerp to map uv coordinates to the range needed for grid_sample (i.e. map [0, 1] to [-1, 1] and invert the y-axis)
Reviewed By: bottler
Differential Revision: D51961728
fbshipit-source-id: db19a5e3f482e9af7b96b20f88a1e5d0076dac43
Summary: User confusion (https://github.com/facebookresearch/pytorch3d/issues/1579) about how zbuf is used for alpha compositing. Added small description and reference to paper to help give some context.
Reviewed By: bottler
Differential Revision: D51374933
fbshipit-source-id: 8c489a5b5d0a81f0d936c1348b9ade6787c39c9a
Summary: Fixes lint in test_render_points in the PyTorch3D library.
Differential Revision: D51289841
fbshipit-source-id: 1eae621eb8e87b0fe5979f35acd878944f574a6a
Summary:
When the ply format looks as follows:
```
comment TextureFile ***.png
element vertex 892
property double x
property double y
property double z
property double nx
property double ny
property double nz
property double texture_u
property double texture_v
```
`MeshPlyFormat` class will read uv from the ply file and read the uv map as commented as TextureFile.
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1100
Reviewed By: MichaelRamamonjisoa
Differential Revision: D50885176
Pulled By: bottler
fbshipit-source-id: be75b1ec9a17a1ed87dbcf846a9072ea967aec37
Summary: Remove unused argument `mask_points` from `get_rgbd_point_cloud` and fix `get_implicitron_sequence_pointcloud`, which assumed it was used.
Reviewed By: MichaelRamamonjisoa
Differential Revision: D50885848
fbshipit-source-id: c0b834764ad5ef560107bd8eab04952d000489b8
Summary: I think we include more thrust than needed, and maybe removing it will help things like https://github.com/facebookresearch/pytorch3d/issues/1610 with DebugSyncStream errors on Windows.
Reviewed By: shapovalov
Differential Revision: D48949888
fbshipit-source-id: add889c0acf730a039dc9ffd6bbcc24ded20ef27
Summary: Python3 makes the use of `(object)` in class inheritance unnecessary. Let's modernize our code by eliminating this.
Reviewed By: itamaro
Differential Revision: D48673863
fbshipit-source-id: 032d6028371f0350252e6b731c74f0f5933c83cd
Summary:
The `chamfer_distance` function currently allows `"sum"` or `"mean"` reduction, but does not support returning unreduced (per-point) loss terms. Unreduced losses could be useful if the user wishes to inspect individual losses, or perform additional modifications to loss terms before reduction. One example would be implementing a robust kernel over the loss.
This PR adds a `None` option to the `point_reduction` parameter, similar to `batch_reduction`. In case of bi-directional chamfer loss, both the forward and backward distances are returned (a tuple of Tensors of shape `[D, N]` is returned). If normals are provided, similar logic applies to normals as well.
This PR addresses issue https://github.com/facebookresearch/pytorch3d/issues/622.
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1605
Reviewed By: jcjohnson
Differential Revision: D48313857
Pulled By: bottler
fbshipit-source-id: 35c824827a143649b04166c4817449e1341b7fd9
Summary:
Something's wrong with recommonmark/CommonMark/six, let's see if this fixes it.
https://readthedocs.org/projects/pytorch3d/builds/21292632/
```
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 368, in eval_config_file
execfile_(filename, namespace)
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/envs/latest/lib/python3.11/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
exec_(code, _globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/checkouts/latest/docs/conf.py", line 25, in <module>
from recommonmark.parser import CommonMarkParser
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/envs/latest/lib/python3.11/site-packages/recommonmark/parser.py", line 6, in <module>
from CommonMark import DocParser, HTMLRenderer
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/envs/latest/lib/python3.11/site-packages/CommonMark/__init__.py", line 3, in <module>
from CommonMark.CommonMark import HTMLRenderer
File "/home/docs/checkouts/readthedocs.org/user_builds/pytorch3d/envs/latest/lib/python3.11/site-packages/CommonMark/CommonMark.py", line 18, in <module>
HTMLunescape = html.parser.HTMLParser().unescape
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HTMLParser' object has no attribute 'unescape'
```
Reviewed By: shapovalov
Differential Revision: D47471545
fbshipit-source-id: 48e121e20da535b3cc46b6bd2393d28869067b8b
Summary: New versions of cuda etc. I haven't committed recent changes to this for a while
Reviewed By: shapovalov
Differential Revision: D47396136
fbshipit-source-id: d6c27f5056fa8f4a74a628fa1d831159000acf55
Summary: This is needed from september 2023. As a side effect, implicitron docs should build better because typing.get_args exists etc.
Reviewed By: shapovalov
Differential Revision: D47363855
fbshipit-source-id: a954c5b81b1e5a4435fca146a11aea0d2ca96f45