Summary:
Create a test runner for the eval_demo code. Debugging this is useful for understanding datasets.
Introduces an environment variable INTERACTIVE_TESTING for ignoring tests which are not intended for use in regular test runs.
Reviewed By: shapovalov
Differential Revision: D35964016
fbshipit-source-id: ab0f93aff66b6cfeca942b14466cf81f7feb2224
Summary: Add option to not rescale the features, giving more control. https://github.com/facebookresearch/pytorch3d/issues/1137
Reviewed By: nikhilaravi
Differential Revision: D35219577
fbshipit-source-id: cbbb643b91b71bc908cedc6dac0f63f6d1355c85
Summary: Update all FB license strings to the new format.
Reviewed By: patricklabatut
Differential Revision: D33403538
fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
Summary: As subj. Tests corrected accordingly. Also changed the test to provide a bit better diagnostics.
Reviewed By: bottler
Differential Revision: D32879498
fbshipit-source-id: 0a852e4a13dcb4ca3e54d71c6b263c5d2eeaf4eb
Summary: Much of the code is actually available during the conda tests, as long as we look in the right place. We enable some of them.
Reviewed By: nikhilaravi
Differential Revision: D30249357
fbshipit-source-id: 01c57b6b8c04442237965f23eded594aeb90abfb
Summary: Add functionality to to save an `.obj` file with associated UV textures: `.png` image and `.mtl` file as well as saving verts_uvs and faces_uvs to the `.obj` file.
Reviewed By: bottler
Differential Revision: D29337562
fbshipit-source-id: 86829b40dae9224088b328e7f5a16eacf8582eb5
Summary: Restore assertNormsClose's printing of its message on failure which I broke in D26233419 (cd9786e787).
Reviewed By: nikhilaravi
Differential Revision: D28799743
fbshipit-source-id: e7a24b2558b68991c731bbd55fb3ca6c1df98f69
Summary: make assertClose print its failure information even if a message is supplied.
Reviewed By: nikhilaravi
Differential Revision: D28799745
fbshipit-source-id: 787c8c356342420cd8f40fdc0b2aba036142298e
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: Make common functions for finding directories where test data is found, instead of lots of tests using their own `__file__` while trying to get ./tests/data and the tutorials data.
Reviewed By: nikhilaravi
Differential Revision: D27633701
fbshipit-source-id: 1467bb6018cea16eba3cab097d713116d51071e9
Summary:
These two tests fail (with non-small differences) when the seed is changed or if certain environmental changes are made. We disable them pending investigation.
A small change to the tolerance at the failing assertion doesn't help. The change in common_testing helps diagnose this.
Reviewed By: shapovalov
Differential Revision: D26233419
fbshipit-source-id: 357afc1786825256c9bade101fb15707e4dea5ed
Summary: Bump the nvidia driver used in the conda tests. Add an environment variable (unused) to allow building without ninja. Print relative error on assertClose failure.
Reviewed By: nikhilaravi
Differential Revision: D21227373
fbshipit-source-id: 5dd8eb097151da27d3632daa755a1e7b9ac97845
Summary:
Cuda test failing on circle with the error `random_ expects 'from' to be less than 'to', but got from=0 >= to=0`
This is because the `high` value in `torch.randint` is 1 more than the highest value in the distribution from which a value is drawn. So if there is only 1 cuda device available then the low and high are 0.
Reviewed By: gkioxari
Differential Revision: D21236669
fbshipit-source-id: 46c312d431c474f1f2c50747b1d5e7afbd7df3a9
Summary:
Updates to:
- enable cuda kernel launches on any GPU (not just the default)
- cuda and contiguous checks for all kernels
- checks to ensure all tensors are on the same device
- error reporting in the cuda kernels
- cuda tests now run on a random device not just the default
Reviewed By: jcjohnson, gkioxari
Differential Revision: D21215280
fbshipit-source-id: 1bedc9fe6c35e9e920bdc4d78ed12865b1005519
Summary:
Modify test_chamfer for more robustness. Avoid empty pointclouds, including where point_reduction is mean, for which we currently return nan (*), and so that we aren't looking at an empty gradient. Make sure we aren't using padding as points in the homogenous cases in the tests, which will lead to a tie between closest points and therefore a potential instability in the gradient - see https://github.com/pytorch/pytorch/issues/35699.
(*) This doesn't attempt to fix the nan.
Reviewed By: nikhilaravi, gkioxari
Differential Revision: D21157322
fbshipit-source-id: a609e84e25a24379c8928ff645d587552526e4af
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
Summary:
Efficient PnP algorithm to fit 2D to 3D correspondences under perspective assumption.
Benchmarked both variants of nullspace and pick one; SVD takes 7 times longer in the 100K points case.
Reviewed By: davnov134, gkioxari
Differential Revision: D20095754
fbshipit-source-id: 2b4519729630e6373820880272f674829eaed073
Summary:
1. Introduced weights to Umeyama implementation. This will be needed for weighted ePnP but is useful on its own.
2. Refactored to use the same code for the Pointclouds mask and passed weights.
3. Added test cases with random weights.
4. Fixed a bug in tests that calls the function with 0 points (fails randomly in Pytorch 1.3, will be fixed in the next release: https://github.com/pytorch/pytorch/issues/31421 ).
Reviewed By: gkioxari
Differential Revision: D20070293
fbshipit-source-id: e9f549507ef6dcaa0688a0f17342e6d7a9a4336c
Summary: The shebang line `#!<path to interpreter>` is only required for Python scripts, so remove it on source files for class or function definitions. Additionally explicitly mark as executable the actual Python scripts in the codebase.
Reviewed By: nikhilaravi
Differential Revision: D20095778
fbshipit-source-id: d312599fba485e978a243292f88a180d71e1b55a
Summary:
Revisions to Poincloud data structure with added normals
The biggest changes form the previous version include:
a) If the user provides tensor inputs, we make no assumption about padding. Padding is only for internal use for us to convert from list to padded
b) If features are not provided or if the poincloud is empty, all forms of features are None. This is so that we don't waste memory on holding dummy tensors.
Reviewed By: nikhilaravi
Differential Revision: D19791851
fbshipit-source-id: 7e182f7bb14395cb966531653f6dd6b328fd999c