Skip to content

Commit

Permalink
Add example script for automatic segmentation (computational-cell-ana…
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 authored and psobolewskiPhD committed Nov 29, 2024
1 parent 333ad51 commit e4627f0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions micro_sam/automatic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ def get_predictor_and_segmenter(
decoder = get_decoder(image_encoder=predictor.model.image_encoder, decoder_state=decoder_state, device=device)

segmenter = get_amg(
predictor=predictor,
is_tiled=is_tiled,
decoder=decoder,
**kwargs
predictor=predictor, is_tiled=is_tiled, decoder=decoder, **kwargs
)

return predictor, segmenter


Expand Down Expand Up @@ -232,6 +230,7 @@ def _convert_argval(value):
model_type=args.model_type,
checkpoint=args.checkpoint,
device=args.device,
amg=args.amg,
is_tiled=args.tile_shape is not None,
)

Expand Down

0 comments on commit e4627f0

Please sign in to comment.