|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BASE_URL="https://dl.fbaipublicfiles.com/segment_anything_2/072824/" |
|
sam2_hiera_t_url="${BASE_URL}sam2_hiera_tiny.pt" |
|
sam2_hiera_s_url="${BASE_URL}sam2_hiera_small.pt" |
|
sam2_hiera_b_plus_url="${BASE_URL}sam2_hiera_base_plus.pt" |
|
sam2_hiera_l_url="${BASE_URL}sam2_hiera_large.pt" |
|
|
|
|
|
|
|
echo "Downloading sam2_hiera_tiny.pt checkpoint..." |
|
wget $sam2_hiera_t_url || { echo "Failed to download checkpoint from $sam2_hiera_t_url"; exit 1; } |
|
|
|
echo "Downloading sam2_hiera_small.pt checkpoint..." |
|
wget $sam2_hiera_s_url || { echo "Failed to download checkpoint from $sam2_hiera_s_url"; exit 1; } |
|
|
|
echo "Downloading sam2_hiera_base_plus.pt checkpoint..." |
|
wget $sam2_hiera_b_plus_url || { echo "Failed to download checkpoint from $sam2_hiera_b_plus_url"; exit 1; } |
|
|
|
echo "Downloading sam2_hiera_large.pt checkpoint..." |
|
wget $sam2_hiera_l_url || { echo "Failed to download checkpoint from $sam2_hiera_l_url"; exit 1; } |
|
|
|
echo "All checkpoints are downloaded successfully." |
|
|