File size: 443 Bytes
427d150
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Download SAM model if it doesn't exist
if [ ! -d "pretrained_model" ]; then
    mkdir -p pretrained_model
fi

if [ ! -f "pretrained_model/sam_vit_h.pth" ]; then
    echo "Downloading SAM ViT-H model..."
    wget -P pretrained_model https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
    mv pretrained_model/sam_vit_h_4b8939.pth pretrained_model/sam_vit_h.pth
fi

# Run the app
echo "Running ProtoSAM demo..."
python app.py