-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for semantic segmentation
- Loading branch information
1 parent
9d1bcc6
commit 2add62d
Showing
12 changed files
with
1,449 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import sys | ||
BASE_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
ROOT_DIR = os.path.dirname(BASE_DIR) | ||
sys.path.append(BASE_DIR) | ||
import indoor3d_util | ||
|
||
anno_paths = [line.rstrip() for line in open(os.path.join(BASE_DIR, 'meta/anno_paths.txt'))] | ||
anno_paths = [os.path.join(indoor3d_util.DATA_PATH, p) for p in anno_paths] | ||
|
||
output_folder = os.path.join(ROOT_DIR, 'data/stanford_indoor3d') | ||
if not os.path.exists(output_folder): | ||
os.mkdir(output_folder) | ||
|
||
# Note: there is an extra character in the v1.2 data in Area_5/hallway_6. It's fixed manually. | ||
for anno_path in anno_paths: | ||
print(anno_path) | ||
try: | ||
elements = anno_path.split('/') | ||
out_filename = elements[-3]+'_'+elements[-2]+'.npy' | ||
indoor3d_util.collect_point_label(anno_path, os.path.join(output_folder, out_filename), 'numpy') | ||
except: | ||
print(anno_path, 'ERROR!!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# Download HDF5 for indoor 3d semantic segmentation (around 1.6GB) | ||
wget https://shapenet.cs.stanford.edu/media/indoor3d_sem_seg_hdf5_data.zip | ||
unzip indoor3d_sem_seg_hdf5_data.zip | ||
rm indoor3d_sem_seg_hdf5_data.zip |
Oops, something went wrong.