Skip to content

Commit

Permalink
Changed get_instance_mask
Browse files Browse the repository at this point in the history
  • Loading branch information
JLrumberger committed Dec 4, 2024
1 parent 1de253f commit be49c0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bio_image_datasets/schuerch_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ def get_instance_mask(self, idx):
raise IndexError("Index out of bounds.")
file_path = self.file_paths[idx]
with h5py.File(file_path, 'r') as f:
return np.squeeze(f["gt_inst"][:])
instance_mask = np.squeeze(f["gt_inst"][:])
semantic_mask = np.squeeze(f["gt_ct"][:])
_, instance_mask = exclude_classes(
semantic_mask=semantic_mask, exclude_classes=[17], instance_mask=instance_mask
)
return instance_mask

def get_semantic_mask(self, idx):
"""Return the semantic mask at the given index.
Expand Down

0 comments on commit be49c0f

Please sign in to comment.