Skip to content

Commit

Permalink
Merge pull request #257 from computational-cell-analytics/m-fix-bb
Browse files Browse the repository at this point in the history
Fix Bounding Box Sorting
  • Loading branch information
constantinpape authored Nov 1, 2023
2 parents 02199d1 + 0d5f967 commit d7a4365
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions micro_sam/training/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def _get_prompt_lists(self, gt, n_samples, prompt_generator):
sampled_cell_ids = np.random.choice(cell_ids, size=min(n_samples, len(cell_ids)), replace=False)
sampled_cell_ids = np.sort(sampled_cell_ids)

# only keep the bounding boxes for sampled cell ids
bbox_coordinates = [bbox_coordinates[sampled_id] for sampled_id in sampled_cell_ids]
# only keep the bounding boxes for sampled cell ids
bbox_coordinates = [bbox_coordinates[sampled_id] for sampled_id in sampled_cell_ids]

# convert the gt to the one-hot-encoded masks for the sampled cell ids
object_masks = segmentation_to_one_hot(gt, None if n_samples is None else sampled_cell_ids)
Expand Down

0 comments on commit d7a4365

Please sign in to comment.