sumit-ai-ml commited on
Commit
d419820
·
1 Parent(s): 5050e07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,8 +45,8 @@ def segment_image(input_image, selected_model):
45
  boxes = result.boxes
46
  bbox = boxes.xyxy.tolist()[0]
47
 
48
- sam_checkpoint = "sam_vit_h_4b8939.pth"
49
- model_type = "vit_h"
50
  sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)
51
  sam.to(device='cpu')
52
  predictor = SamPredictor(sam)
 
45
  boxes = result.boxes
46
  bbox = boxes.xyxy.tolist()[0]
47
 
48
+ sam_checkpoint = "medsam_vit_b.pth"
49
+ model_type = "vit_b"
50
  sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)
51
  sam.to(device='cpu')
52
  predictor = SamPredictor(sam)