Skip to content

Commit

Permalink
Fix bug in precompute for 3d data (#649)
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape authored and lufre1 committed Jul 4, 2024
1 parent 09af0a7 commit 3d8d879
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micro_sam/precompute_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def cache_amg_state(
if verbose:
print("Precomputing the state for instance segmentation.")

amg.initialize(raw, image_embeddings=image_embeddings, verbose=verbose, i=i)
amg.initialize(raw if i is None else raw[i], image_embeddings=image_embeddings, verbose=verbose, i=i)
amg_state = amg.get_state()

# put all state onto the cpu so that the state can be deserialized without a gpu
Expand Down

0 comments on commit 3d8d879

Please sign in to comment.