Skip to content

Commit 4ab78a6

Browse files
committed
SAM 2.1
1 parent feb4c83 commit 4ab78a6

File tree

2 files changed

+3
-121
lines changed

2 files changed

+3
-121
lines changed

examples/sam2_amg_server/sam2_hiera_l.yaml

Lines changed: 0 additions & 117 deletions
This file was deleted.

examples/sam2_amg_server/server.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,12 @@ def main(checkpoint_path):
6060

6161
device = "cuda"
6262
from pathlib import Path
63-
sam2_checkpoint = Path(checkpoint_path) / Path("sam2_hiera_large.pt")
64-
model_cfg = "sam2_hiera_l.yaml"
63+
sam2_checkpoint = Path(checkpoint_path) / Path("sam2.1_hiera_large.pt")
64+
model_cfg = "configs/sam2.1/sam2.1_hiera_l.yaml"
6565
logging.basicConfig(level=logging.INFO)
6666

67-
logging.info(f"Loading model: {sam2_checkpoint}")
67+
logging.info(f"Loading model {sam2_checkpoint} with config {model_cfg}")
6868
sam2 = build_sam2(model_cfg, sam2_checkpoint, device=device, apply_postprocessing=False)
69-
sam2.to(device=device)
7069

7170
mask_generator = SAM2AutomaticMaskGenerator(sam2) #, points_per_batch=None)
7271

0 commit comments

Comments
 (0)