Skip to content

Commit

Permalink
add room_id to indices_split_to_full
Browse files Browse the repository at this point in the history
  • Loading branch information
MingChaoSun authored Sep 26, 2018
1 parent f7eefb0 commit 9ec0954
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data_conversions/prepare_scannet_seg_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main():
data_num = np.zeros((batch_size), dtype=np.int32)
label = np.zeros((batch_size), dtype=np.int32)
label_seg = np.zeros((batch_size, max_point_num), dtype=np.int32)
indices_split_to_full = np.zeros((batch_size, max_point_num), dtype=np.int32)
indices_split_to_full = np.zeros((batch_size, max_point_num, 2), dtype=np.int32)

datasets = ['train', 'test']
for dataset_idx, dataset in enumerate(datasets):
Expand Down Expand Up @@ -162,7 +162,10 @@ def main():
data_num[idx_in_batch] = point_num
label[idx_in_batch] = dataset_idx # won't be used...
label_seg[idx_in_batch, 0:point_num] = block_labels[start:end]
indices_split_to_full[idx_in_batch, 0:point_num] = point_indices[start:end]

ind_in_room = point_indices[start:end]
indices_split_to_full[idx_in_batch, 0:point_num] = np.stack([np.zeros_like(ind_in_room) + room_idx ,ind_in_room], -1)


if ((idx + 1) % batch_size == 0) \
or (room_idx == len(xyz_all) - 1
Expand Down

0 comments on commit 9ec0954

Please sign in to comment.