| CARVIEW |
Select Language
HTTP/2 200
date: Sun, 28 Dec 2025 13:01:14 GMT
content-type: text/html; charset=utf-8
server: cloudflare
x-origin-cache: HIT
last-modified: Thu, 28 Mar 2024 16:10:36 GMT
vary: Accept-Encoding
access-control-allow-origin: *
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
expires: Sun, 28 Dec 2025 13:11:14 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=YVm2o%2BXHnM0sYo0mfSDe9TId6EiziyGnJDHXlBQ2Xz%2BMe4yG98i3TW5eCNT8NmkizbHigO%2BIUmq6KUcQC%2Bgs1xIpGI3WR%2BhpNGpTp2k%3D"}]}
x-proxy-cache: MISS
x-github-request-id: 2D4A:10D2B9:3270F16:36821F0:69512A1A
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 9b513ec1ce8446a4-BOM
alt-svc: h3=":443"; ma=86400
PyTorch3D · A library for deep learning with 3D data 



Support Ukraine 🇺🇦 Help Provide Humanitarian Aid to Ukraine.
A library for deep learning with 3D data
Heterogeneous Batching
Heterogeneous Batching
Supports batching of 3D inputs of different sizes such as meshes

Fast 3D Operators
Fast 3D Operators
Supports optimized implementations of several common functions for 3D data
Differentiable Rendering
Differentiable Rendering
Modular differentiable rendering API with parallel implementations in PyTorch, C++ and CUDA
Get Started
- Install PyTorch3D (following the instructions here)
- Try a few 3D operators e.g. compute the chamfer loss between two meshes:
from pytorch3d.utils import ico_sphere from pytorch3d.io import load_obj from pytorch3d.structures import Meshes from pytorch3d.ops import sample_points_from_meshes from pytorch3d.loss import chamfer_distance # Use an ico_sphere mesh and load a mesh from an .obj e.g. model.obj sphere_mesh = ico_sphere(level=3) verts, faces, _ = load_obj("model.obj") test_mesh = Meshes(verts=[verts], faces=[faces.verts_idx]) # Differentiably sample 5k points from the surface of each mesh and then compute the loss. sample_sphere = sample_points_from_meshes(sphere_mesh, 5000) sample_test = sample_points_from_meshes(test_mesh, 5000) loss_chamfer, _ = chamfer_distance(sample_sphere, sample_test)