Skip to content

Commit

Permalink
Update obj_io.py: Make PyTorch3D work with ShapeNetCore.v2 (#49)
Browse files Browse the repository at this point in the history
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: #49

Differential Revision: D19951828

Pulled By: gkioxari

fbshipit-source-id: 5695df0fca2059e75eeb73edf4cfe9d9f008e841
  • Loading branch information
Chr1k0 authored and facebook-github-bot committed Feb 18, 2020
1 parent 3ba4398 commit 2346589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch3d/io/obj_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit 2346589

Please sign in to comment.