Commit 23465890 authored by Chr1k0's avatar Chr1k0 Committed by Facebook Github Bot
Browse files

Update obj_io.py: Make PyTorch3D work with ShapeNetCore.v2 (#49)

Summary:
Making PyTorch3D work with ShapeNetCore.v2 models from http://shapenet.cs.stanford.edu/shapenet/obj-zip/ShapeNetCore.v2/
The face identifier of the ShapeNetCore.v2 models is followed by two not one blank - example:
"f  1/1/1 2/2/2 3/3/3" instead of
"f 1/1/1 2/2/2 3/3/3"
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/49

Differential Revision: D19951828

Pulled By: gkioxari

fbshipit-source-id: 5695df0fca2059e75eeb73edf4cfe9d9f008e841
parent 3ba43980
...@@ -256,7 +256,7 @@ def _parse_face( ...@@ -256,7 +256,7 @@ def _parse_face(
faces_textures_idx, faces_textures_idx,
faces_materials_idx, faces_materials_idx,
): ):
face = line.split(" ")[1:] face = line.split()[1:]
face_list = [f.split("/") for f in face] face_list = [f.split("/") for f in face]
face_verts = [] face_verts = []
face_normals = [] face_normals = []
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment