Spaces:
Runtime error
Runtime error
Update utils/sam.py
Browse files- utils/sam.py +4 -2
utils/sam.py
CHANGED
@@ -6,10 +6,12 @@ import torch
|
|
6 |
from PIL import Image
|
7 |
from sam2.build_sam import build_sam2, build_sam2_video_predictor
|
8 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
9 |
-
|
10 |
SAM_CHECKPOINT = "checkpoints/sam2_hiera_small.pt"
|
11 |
SAM_CONFIG = "sam2_hiera_s.yaml"
|
12 |
-
|
|
|
|
|
13 |
|
14 |
def load_sam_image_model(
|
15 |
device: torch.device,
|
|
|
6 |
from PIL import Image
|
7 |
from sam2.build_sam import build_sam2, build_sam2_video_predictor
|
8 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
9 |
+
'''
|
10 |
SAM_CHECKPOINT = "checkpoints/sam2_hiera_small.pt"
|
11 |
SAM_CONFIG = "sam2_hiera_s.yaml"
|
12 |
+
'''
|
13 |
+
SAM_CHECKPOINT = "checkpoints/sam2_hiera_large.pt"
|
14 |
+
SAM_CONFIG = "sam2_hiera_l.yaml"
|
15 |
|
16 |
def load_sam_image_model(
|
17 |
device: torch.device,
|