Skip to content

Instantly share code, notes, and snippets.

@ricklentz
Created June 14, 2017 04:52
Show Gist options
  • Save ricklentz/7993abd7c6b9d73cf690a270b51c04f7 to your computer and use it in GitHub Desktop.
Save ricklentz/7993abd7c6b9d73cf690a270b51c04f7 to your computer and use it in GitHub Desktop.
convert obj to ply
# export PYMESH_PATH=/home/cbios/github/PyMesh
import os
import pymesh
cold_store_dir = r'/media/cbios/ResearchData/Models/train_normal'
for filename in os.listdir(cold_store_dir):
mesh = pymesh.load_mesh(cold_store_dir +'/' + filename)
pymesh.save_mesh_raw(cold_store_dir +'/' + filename.replace(".obj",".ply"), mesh.vertices, mesh.faces, mesh.voxels)
@ricklentz
Copy link
Author

(37,722 objects)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment