mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-03 04:12:48 +08:00
Summary: Collection of spelling things, mostly in docs / tutorials. Reviewed By: gkioxari Differential Revision: D26101323 fbshipit-source-id: 652f62bc9d71a4ff872efa21141225e43191353a
25 lines
580 B
Markdown
25 lines
580 B
Markdown
---
|
|
hide_title: true
|
|
sidebar_label: File IO
|
|
---
|
|
|
|
# File IO
|
|
There is a flexible interface for loading and saving point clouds and meshes from different formats.
|
|
|
|
The main usage is via the `pytorch3d.io.IO` object, and its methods
|
|
`load_mesh`, `save_mesh`, `load_point_cloud` and `save_point_cloud`.
|
|
|
|
For example, to load a mesh you might do
|
|
```
|
|
from pytorch3d.io import IO
|
|
|
|
device=torch.device("cuda:0")
|
|
mesh = IO().load_mesh("mymesh.ply", device=device)
|
|
```
|
|
|
|
and to save a pointcloud you might do
|
|
```
|
|
pcl = Pointclouds(...)
|
|
IO().save_point_cloud(pcl, "output_pointcloud.obj")
|
|
```
|