File size: 508 Bytes
ac239ba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Run this as a Python script in the terminal (or via Python shell)
from huggingface_hub import hf_hub_download
import os

os.makedirs("checkpoints", exist_ok=True)

model_files = [
    "MedSAM2_2411.pt",
    "MedSAM2_US_Heart.pt",
    "MedSAM2_MRI_LiverLesion.pt",
    "MedSAM2_CTLesion.pt",
    "MedSAM2_latest.pt"
]

for filename in model_files:
    hf_hub_download(
        repo_id="wanglab/MedSAM2",
        filename=filename,
        local_dir="checkpoints",
        local_dir_use_symlinks=False
    )