From 9bad7557fd50549ff35ea04f5cbbe37ab8b5c951 Mon Sep 17 00:00:00 2001 From: Constantin Pape Date: Sat, 2 Sep 2023 14:47:24 -0400 Subject: [PATCH] Enable min object size of up to 10000 in auto segmentation widget --- micro_sam/sam_annotator/annotator_2d.py | 5 ++++- micro_sam/sam_annotator/annotator_3d.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/micro_sam/sam_annotator/annotator_2d.py b/micro_sam/sam_annotator/annotator_2d.py index 241411ea8..b7d4711cc 100644 --- a/micro_sam/sam_annotator/annotator_2d.py +++ b/micro_sam/sam_annotator/annotator_2d.py @@ -47,7 +47,10 @@ def _changed_param(amg, **params): return None -@magicgui(call_button="Automatic Segmentation") +@magicgui( + call_button="Automatic Segmentation", + min_object_size={"min": 0, "max": 10000}, +) def _autosegment_widget( v: Viewer, pred_iou_thresh: float = 0.88, diff --git a/micro_sam/sam_annotator/annotator_3d.py b/micro_sam/sam_annotator/annotator_3d.py index 2c3218351..639114741 100644 --- a/micro_sam/sam_annotator/annotator_3d.py +++ b/micro_sam/sam_annotator/annotator_3d.py @@ -134,7 +134,10 @@ def _segment_volume_widget( v.layers[layer].refresh() -@magicgui(call_button="Automatic Segmentation") +@magicgui( + call_button="Automatic Segmentation", + min_object_size={"min": 0, "max": 10000} +) def _autosegment_widget( v: Viewer, pred_iou_thresh: float = 0.88,