mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
PLY with uint face data (#1104)
Summary: Fix assumption that face indices are signed in the PLY file, as reported in #1104. Reviewed By: nikhilaravi Differential Revision: D34892598 fbshipit-source-id: a8b23bfac1357bdc11bbbf752098319142239804
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1701b76a31
commit
9b5a3ffa6c
@@ -1040,7 +1040,7 @@ def _load_ply(f, *, path_manager: PathManager) -> _PlyData:
|
||||
if face.shape[1] < 3:
|
||||
raise ValueError("Faces must have at least 3 vertices.")
|
||||
face_arrays = [face[:, [0, i + 1, i + 2]] for i in range(face.shape[1] - 2)]
|
||||
faces = torch.LongTensor(np.vstack(face_arrays))
|
||||
faces = torch.LongTensor(np.vstack(face_arrays).astype(np.int64))
|
||||
else:
|
||||
face_list = []
|
||||
for face_item in face:
|
||||
|
||||
Reference in New Issue
Block a user