{"library":"pipablepytorch3d","title":"PyTorch3D","description":"PyTorch3D is FAIR's library of reusable components for deep learning with 3D data, currently at version 0.7.6. It provides efficient data structures for storing and manipulating triangle meshes, optimized operations on 3D data (like projective transformations, graph convolution, sampling, and loss functions), and a modular differentiable mesh renderer. The library is actively developed and designed to integrate smoothly with PyTorch for predicting and manipulating 3D data, with operators that can handle minibatches, are differentiable, and can utilize GPUs.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pipablepytorch3d"],"cli":null},"imports":["from pytorch3d.structures import Meshes","from pytorch3d.io import load_obj","from pytorch3d.utils import ico_sphere","from pytorch3d.ops import sample_points_from_meshes","from pytorch3d.loss import chamfer_distance"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom pytorch3d.utils import ico_sphere\nfrom pytorch3d.ops import sample_points_from_meshes\nfrom pytorch3d.loss import chamfer_distance\n\n# Set device\nif torch.cuda.is_available():\n    device = torch.device(\"cuda:0\")\nelse:\n    device = torch.device(\"cpu\")\n\n# Create two ico_sphere meshes with different levels of detail\nsphere_mesh_1 = ico_sphere(level=3, device=device)\nsphere_mesh_2 = ico_sphere(level=4, device=device)\n\n# Differentiably sample 5k points from the surface of each mesh\nsample_points_1 = sample_points_from_meshes(sphere_mesh_1, 5000)\nsample_points_2 = sample_points_from_meshes(sphere_mesh_2, 5000)\n\n# Compute the Chamfer distance between the two sets of points\nloss_chamfer, _ = chamfer_distance(sample_points_1, sample_points_2)\n\nprint(f\"Chamfer Distance: {loss_chamfer.item():.4f}\")","lang":"python","description":"This quickstart example demonstrates how to create two isometric sphere meshes, sample points from their surfaces, and compute the Chamfer distance between the sampled point clouds using PyTorch3D's utility functions and loss modules. This is a common operation in 3D shape comparison and optimization. Ensure you have a compatible PyTorch installation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.7.6","pypi_latest":"0.7.6","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":60,"avg_install_s":8,"avg_import_s":null,"wheel_type":"sdist"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"312.5M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":7.8,"import_time_s":null,"mem_mb":null,"disk_size":"310M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"322.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":7.5,"import_time_s":null,"mem_mb":null,"disk_size":"319M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pipablepytorch3d","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pipablepytorch3d","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.4,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pipablepytorch3d","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pipablepytorch3d","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.5,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"318.2M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pipablepytorch3d","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":8.6,"import_time_s":null,"mem_mb":null,"disk_size":"318M"}]}}