Spaces:
Runtime error
Runtime error
change sam checkpoint
Browse files
app.py
CHANGED
@@ -7,11 +7,11 @@ from sam2.build_sam import build_sam2
|
|
7 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
8 |
import gradio as gr
|
9 |
|
10 |
-
hf_hub_download(repo_id = "merve/sam2-hiera-
|
11 |
|
12 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
13 |
-
CHECKPOINT = f"./
|
14 |
-
CONFIG = "
|
15 |
|
16 |
sam2_model = build_sam2(CONFIG, CHECKPOINT, device=DEVICE, apply_postprocessing=False)
|
17 |
predictor = SAM2ImagePredictor(sam2_model)
|
|
|
7 |
from sam2.sam2_image_predictor import SAM2ImagePredictor
|
8 |
import gradio as gr
|
9 |
|
10 |
+
hf_hub_download(repo_id = "merve/sam2-hiera-base-plus", filename="sam2_hiera_base_plus.pt", local_dir = "./")
|
11 |
|
12 |
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
13 |
+
CHECKPOINT = f"./sam2_hiera_base_plus.pt"
|
14 |
+
CONFIG = "sam2_hiera_b+.yaml"
|
15 |
|
16 |
sam2_model = build_sam2(CONFIG, CHECKPOINT, device=DEVICE, apply_postprocessing=False)
|
17 |
predictor = SAM2ImagePredictor(sam2_model)
|