Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor]: Windows compatibility #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions data_utils/collect_indoor3d_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)

anno_paths = [line.rstrip() for line in open(os.path.join(BASE_DIR, 'meta/anno_paths.txt'))]
anno_paths = [os.path.join(DATA_PATH, p) for p in anno_paths]
anno_paths = [line.rstrip() for line in open(os.path.join(BASE_DIR, 'meta', 'anno_paths.txt'))]
anno_paths = [os.path.join(DATA_PATH, p.replace('/', os.sep)) for p in anno_paths]

output_folder = os.path.join(ROOT_DIR, 'data/stanford_indoor3d')
output_folder = os.path.join(ROOT_DIR, 'data', 's3dis', '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('/')
elements = anno_path.split(os.sep)
out_filename = elements[-3]+'_'+elements[-2]+'.npy' # Area_1_hallway_1.npy
collect_point_label(anno_path, os.path.join(output_folder, out_filename), 'numpy')
except:
Expand Down