JuanLozada97 commited on
Commit
4cac2d2
·
1 Parent(s): ed18f8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -24,7 +24,15 @@ model_type = "vit_b"
24
 
25
  # 2.Model preparation and load save weights
26
  medsam_model = create_sam_model(model_type,checkpoint,device)
27
- mask_generator = SamAutomaticMaskGenerator(medsam_model)
 
 
 
 
 
 
 
 
28
 
29
  # 3.Predict fn
30
  def show_anns(anns):
 
24
 
25
  # 2.Model preparation and load save weights
26
  medsam_model = create_sam_model(model_type,checkpoint,device)
27
+ mask_generator = SamAutomaticMaskGenerator(
28
+ model=medsam_model,
29
+ points_per_side=32,
30
+ pred_iou_thresh=0.86,
31
+ stability_score_thresh=0.92,
32
+ crop_n_layers=1,
33
+ crop_n_points_downscale_factor=2,
34
+ min_mask_region_area=100, # Requires open-cv to run post-processing
35
+ )
36
 
37
  # 3.Predict fn
38
  def show_anns(anns):