PyTorch3D

From David's Wiki
Revision as of 19:26, 22 July 2020 by David (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
\( \newcommand{\P}[]{\unicode{xB6}} \newcommand{\AA}[]{\unicode{x212B}} \newcommand{\empty}[]{\emptyset} \newcommand{\O}[]{\emptyset} \newcommand{\Alpha}[]{Α} \newcommand{\Beta}[]{Β} \newcommand{\Epsilon}[]{Ε} \newcommand{\Iota}[]{Ι} \newcommand{\Kappa}[]{Κ} \newcommand{\Rho}[]{Ρ} \newcommand{\Tau}[]{Τ} \newcommand{\Zeta}[]{Ζ} \newcommand{\Mu}[]{\unicode{x039C}} \newcommand{\Chi}[]{Χ} \newcommand{\Eta}[]{\unicode{x0397}} \newcommand{\Nu}[]{\unicode{x039D}} \newcommand{\Omicron}[]{\unicode{x039F}} \DeclareMathOperator{\sgn}{sgn} \def\oiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x222F}\,}{\unicode{x222F}}{\unicode{x222F}}{\unicode{x222F}}}\,}\nolimits} \def\oiiint{\mathop{\vcenter{\mathchoice{\huge\unicode{x2230}\,}{\unicode{x2230}}{\unicode{x2230}}{\unicode{x2230}}}\,}\nolimits} \)

PyTorch3D

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

The main features are a mesh and point cloud renderer.

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'

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.