hanszhu commited on
Commit
eeb48d1
·
1 Parent(s): fca36a0

feat(medsam): set min_area=100 with max_regions=20 for more fine segments

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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=8, min_area=200)
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)