PyTorch3D: Difference between revisions

From David's Wiki
Created page with "PyTorch3D This Facebook AI Research's PyTorch 3D graphics library. The main features are a mesh and point cloud renderer. ==Install== See [https://github.com/facebookresear..."
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
This Facebook AI Research's PyTorch 3D graphics library.
This Facebook AI Research's PyTorch 3D graphics library.


The main features are a mesh and point cloud renderer.
The main features are differentiable mesh and point cloud renderers written in CUDA.


==Install==
==Install==
Line 11: Line 11:
# Make sure you have CUDA, CUDNN, PyTorch installed
# Make sure you have CUDA, CUDNN, PyTorch installed
# <pre>pip install 'git+https://github.com/facebookresearch/pytorch3d.git'</pre>
# <pre>pip install 'git+https://github.com/facebookresearch/pytorch3d.git'</pre>
;Notes
* The pip version does not include CUDA support. Install it from the git repo.
* You need to recompile and reinstall PyTorch3D every time you upgrade PyTorch.


==Usage==
==Usage==

Latest revision as of 19:33, 22 September 2020

PyTorch3D

This Facebook AI Research's PyTorch 3D graphics library.

The main features are differentiable mesh and point cloud renderers written in CUDA.

Install

See INSTALL.md. I've only been able to get it to work on Linux.

  1. Make sure you have CUDA, CUDNN, PyTorch installed
  2. pip install 'git+https://github.com/facebookresearch/pytorch3d.git'
Notes
  • The pip version does not include CUDA support. Install it from the git repo.
  • You need to recompile and reinstall PyTorch3D every time you upgrade PyTorch.

Usage

Point Cloud Renderer

See render_colored_points.ipynb. You can run this tutorial in Colab using this link or the Open in Colab' extension.

To implement custom cameras (e.g. Fisheye, 360), you can write your own custom PointsRasterizer. See /pytorch3d/renderer/points/rasterizer.py for the default PointsRasterizer.

Specifically, you can change the transform function to a custom function which calculates screen coordinates from world coordinates.