@@ -67,7 +67,7 @@ def _isArrayLike(obj):
67
67
68
68
69
69
class GraspNet ():
70
- def __init__ (self , root , camera = 'kinect' , split = 'train' ):
70
+ def __init__ (self , root , camera = 'kinect' , split = 'train' , sceneIds = [] ):
71
71
'''
72
72
73
73
graspnetAPI main class.
@@ -76,10 +76,12 @@ def __init__(self, root, camera='kinect', split='train'):
76
76
77
77
- camera: string of type of camera: "kinect" or "realsense"
78
78
79
- - split: string of type of split of dataset: "all", "train", "test", "test_seen", "test_similar" or "test_novel"
79
+ - split: string of type of split of dataset: "all", "train", "test", "test_seen", "test_similar", "test_novel" or "custom"
80
+
81
+ - sceneIds: list of custom scene ids.
80
82
'''
81
83
assert camera in ['kinect' , 'realsense' ], 'camera should be kinect or realsense'
82
- assert split in ['all' , 'train' , 'test' , 'test_seen' , 'test_similar' , 'test_novel' ], 'split should be all/train/test/test_seen/test_similar/test_novel'
84
+ assert split in ['all' , 'train' , 'test' , 'test_seen' , 'test_similar' , 'test_novel' , "custom" ], 'split should be all/train/test/test_seen/test_similar/test_novel'
83
85
self .root = root
84
86
self .camera = camera
85
87
self .split = split
@@ -97,6 +99,8 @@ def __init__(self, root, camera='kinect', split='train'):
97
99
self .sceneIds = list (range (130 , 160 ))
98
100
elif split == 'test_novel' :
99
101
self .sceneIds = list (range (160 , 190 ))
102
+ elif split == "custom" :
103
+ self .sceneIds = sceneIds
100
104
101
105
self .rgbPath = []
102
106
self .depthPath = []
0 commit comments