with open(path, "rb") as f:
data = PlyData.read(f)
pos = ([torch.tensor(data["vertex"][axis]) for axis in ["x", "y", "z"]])
pos = torch.stack(pos, dim=-1)
face = None
After Change
def read_ply(path):
mesh = openmesh.read_trimesh(path)
pos = torch.from_numpy(mesh.points()).to(torch.float)
face = torch.from_numpy(mesh.face_vertex_indices())
face = face.t().to(torch.long).contiguous()
data = Data(pos=pos, face=face)