mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-14 19:36:23 +08:00
skeleton of pluggable IO
Summary: Unified interface for loading and saving meshes and pointclouds. Reviewed By: nikhilaravi Differential Revision: D25372968 fbshipit-source-id: 6fe57cc3704a89d81d13e959bee707b0c7b57d3b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9fc661f8b3
commit
b183dcb6e8
24
docs/notes/io.md
Normal file
24
docs/notes/io.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
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_poincloud.obj")
|
||||
```
|
||||
Reference in New Issue
Block a user