| | #!/bin/bash |
| |
|
| | echo "π Setting up SAM2 + MatAnyone Video Background Replacer" |
| |
|
| | |
| | mkdir -p checkpoints |
| | mkdir -p tmp |
| |
|
| | |
| | echo "π¦ Installing Python dependencies..." |
| | pip install -r requirements.txt |
| |
|
| | |
| | echo "β¬οΈ Downloading SAM2 checkpoints..." |
| | cd checkpoints |
| |
|
| | |
| | wget -O sam2.1_hiera_large.pt https://dl.fbaipublicfiles.com/segment_anything_2/092824/sam2.1_hiera_large.pt |
| |
|
| | |
| | mkdir -p ../configs/sam2.1 |
| | cd ../configs/sam2.1 |
| |
|
| | |
| | wget -O sam2.1_hiera_l.yaml https://raw.githubusercontent.com/facebookresearch/segment-anything-2/main/configs/sam2.1/sam2.1_hiera_l.yaml |
| |
|
| | cd ../.. |
| |
|
| | echo "β
Setup complete!" |
| | echo "π To run the app:" |
| | echo "streamlit run app.py --server.port=7860 --server.address=0.0.0.0 --server.maxUploadSize=200 --server.enableCORS=false --server.enableXsrfProtection=false" |