Skip to content

Commit c993077

Browse files
committed
wangj
1 parent 50c1280 commit c993077

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

dataset.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
import random
1010
from tensorpack import dataflow
1111

12+
1213
class PCN_pcd(data.Dataset):
13-
def __init__(self, prefix="train"):
14+
def __init__(self, path, prefix="train"):
1415
if prefix=="train":
15-
self.file_path = '/data0/guodongyan/completion_dataset//ShapeNetCompletion/train'
16+
self.file_path = os.path.join(path,'train')
1617
elif prefix=="val":
17-
self.file_path = '/data0/guodongyan/completion_dataset//ShapeNetCompletion/val'
18+
self.file_path = os.path.join(path,'val')
1819
elif prefix=="test":
19-
self.file_path = '/data0/guodongyan/completion_dataset//ShapeNetCompletion/test'
20+
self.file_path = os.path.join(path,'test')
2021
else:
2122
raise ValueError("ValueError prefix should be [train/val/test] ")
2223

@@ -154,13 +155,13 @@ def __getitem__(self, index):
154155

155156

156157
class C3D_h5(data.Dataset):
157-
def __init__(self, prefix="train"):
158+
def __init__(self, path, prefix="train"):
158159
if prefix=="train":
159-
self.file_path = '/data0/guodongyan/completion_dataset/c3d/shapenet/train'
160+
self.file_path = os.path.join(path,'train')
160161
elif prefix=="val":
161-
self.file_path = '/data0/guodongyan/completion_dataset/c3d/shapenet/val'
162+
self.file_path = os.path.join(path,'val')
162163
elif prefix=="test":
163-
self.file_path = '/data0/guodongyan/completion_dataset/c3d/shapenet/test'
164+
self.file_path = os.path.join(path,'test')
164165
else:
165166
raise ValueError("ValueError prefix should be [train/val/test] ")
166167

0 commit comments

Comments
 (0)