Spaces:
Sleeping
Sleeping
feat(medsam): set min_area=100 with max_regions=20 for more fine segments
Browse files
app.py
CHANGED
@@ -668,7 +668,7 @@ def analyze_with_medsam(base_result, image, include_raw_masks=False):
|
|
668 |
masks_for_overlay = []
|
669 |
|
670 |
# MedSAM over candidate boxes (original behavior)
|
671 |
-
cand_bboxes = _find_topk_foreground_bboxes(pil_img, max_regions=
|
672 |
log(f"analyze_with_medsam: candidate boxes={len(cand_bboxes)}")
|
673 |
for bbox in cand_bboxes:
|
674 |
m = _medsam.segment_with_box(bbox)
|
|
|
668 |
masks_for_overlay = []
|
669 |
|
670 |
# MedSAM over candidate boxes (original behavior)
|
671 |
+
cand_bboxes = _find_topk_foreground_bboxes(pil_img, max_regions=20, min_area=100)
|
672 |
log(f"analyze_with_medsam: candidate boxes={len(cand_bboxes)}")
|
673 |
for bbox in cand_bboxes:
|
674 |
m = _medsam.segment_with_box(bbox)
|