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
This commit is contained in:
Chr1k0 2020-02-18 11:08:47 -08:00 committed by Facebook Github Bot
parent 3ba4398095
commit 234658901a

View File

@ -256,7 +256,7 @@ def _parse_face(
faces_textures_idx,
faces_materials_idx,
):
face = line.split(" ")[1:]
face = line.split()[1:]
face_list = [f.split("/") for f in face]
face_verts = []
face_normals = []