|
12 | 12 | from embodiedscan.visualization.img_drawer import ImageDrawer |
13 | 13 | from embodiedscan.visualization.utils import _9dof_to_box, _box_add_thickness |
14 | 14 |
|
15 | | -DATASETS = ['scannet', '3rscan', 'matterport3d'] |
| 15 | +DATASETS = ['scannet', '3rscan', 'matterport3d', 'arkitscenes'] |
16 | 16 |
|
17 | 17 |
|
18 | 18 | class EmbodiedScanExplorer: |
@@ -65,7 +65,7 @@ def __init__(self, |
65 | 65 | if self.verbose: |
66 | 66 | print('Dataset root') |
67 | 67 | for dataset in DATASETS: |
68 | | - print(dataset, ':', self.data_root[dataset]) |
| 68 | + print(dataset, ':', self.data_root.get(dataset, None)) |
69 | 69 |
|
70 | 70 | if self.verbose: |
71 | 71 | print('Loading') |
@@ -118,6 +118,10 @@ def __init__(self, |
118 | 118 | building, region = splits[1], splits[2] |
119 | 119 | dirpath = os.path.join(self.data_root['matterport3d'], |
120 | 120 | building) |
| 121 | + elif dataset == 'arkitscenes': |
| 122 | + split, region = splits[1], splits[2] |
| 123 | + dirpath = os.path.join(self.data_root['arkitscenes'], |
| 124 | + split, region) |
121 | 125 | else: |
122 | 126 | region = splits[1] |
123 | 127 | dirpath = os.path.join(self.data_root[dataset], region) |
@@ -168,6 +172,8 @@ def list_cameras(self, scene): |
168 | 172 | elif dataset == 'matterport3d': |
169 | 173 | cam_name = img_path.split( |
170 | 174 | '/')[-1][:-8] + img_path.split('/')[-1][-7:-4] |
| 175 | + elif dataset == 'arkitscenes': |
| 176 | + cam_name = img_path.split('/')[-1][:-4] |
171 | 177 | else: |
172 | 178 | cam_name = img_path.split('/')[-1][:-4] |
173 | 179 | res.append(cam_name) |
@@ -252,6 +258,9 @@ def render_scene(self, scene_name, render_box=False): |
252 | 258 | elif dataset == 'matterport3d': |
253 | 259 | filepath = os.path.join(self.data_root['matterport3d'], building, |
254 | 260 | 'region_segmentations', f'{region}.ply') |
| 261 | + elif dataset == 'arkitscenes': |
| 262 | + filepath = os.path.join(self.data_root['arkitscenes'], building, |
| 263 | + region, f'{region}_3dod_mesh.ply') |
255 | 264 | else: |
256 | 265 | raise NotImplementedError |
257 | 266 |
|
@@ -311,6 +320,8 @@ def render_continuous_scene(self, |
311 | 320 | elif dataset == 'matterport3d': |
312 | 321 | cam_name = img_path.split( |
313 | 322 | '/')[-1][:-8] + img_path.split('/')[-1][-7:-4] |
| 323 | + elif dataset == 'arkitscenes': |
| 324 | + cam_name = img_path.split('/')[-1][:-4] |
314 | 325 | else: |
315 | 326 | cam_name = img_path.split('/')[-1][:-4] |
316 | 327 | if cam_name == start_cam: |
|
0 commit comments