hotpizzatactics commited on
Commit
0ade742
·
verified ·
1 Parent(s): 3cee060

change sam checkpoint

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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-small", filename="sam2_hiera_small.pt", local_dir = "./")
11
 
12
  DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
13
- CHECKPOINT = f"./sam2_hiera_small.pt"
14
- CONFIG = "sam2_hiera_s.yaml"
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)