Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
QianyiWu committed Oct 20, 2022
1 parent 3795a81 commit 102f988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/datasets/scannet_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ def load_meta_data(self, split_path, img_dir, seg_dir, pose_dir):
ori_sems = cv2.resize(imageio.imread(os.path.join(seg_dir, "%s.png" % str(cur_id))), (self.img_res[1], self.img_res[0]), interpolation=cv2.INTER_NEAREST).\
reshape(1, -1).transpose(1, 0)

ins_list = np.unique(ori_sems)
cur_sems = np.copy(ori_sems)
if self.label_mapping is not None:
for i in self.label_mapping:
for i in ins_list if self.instance else self.label_mapping:
# cur_sems[cur_sems == i] = self.label_mapping.index(i)
cur_sems[ori_sems == i] = self.label_mapping.index(self.instance_mapping_dict[i]) if self.instance else self.label_mapping(i)
split_sems.append(cur_sems)
Expand Down

0 comments on commit 102f988

Please sign in to comment.