Skip to content

Commit 625f021

Browse files
committed
fix class name parsing from filename
1 parent f9978d1 commit 625f021

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datasets/ModelNet.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ def __getitem__(self, idx: int) -> Tuple[torch.Tensor, int]:
9292
"""
9393
# get the class name
9494
fname_short = self.files[idx]
95-
cname = fname_short.split("_")[0]
95+
cname = "_".join(fname_short.split("_")[:-1])
9696

9797
# build the complete filename
9898
fname = os.path.join(self.root_dir, cname, self.stage, fname_short)
9999

100+
# print(f"Reading file {fname}")
101+
100102
# read the mesh
101103
mesh = o3d.io.read_triangle_mesh(fname)
102104

0 commit comments

Comments
 (0)