Spaces:
Runtime error
Runtime error
Commit
·
d419820
1
Parent(s):
5050e07
Update app.py
Browse files
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 = "
|
49 |
-
model_type = "
|
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)
|