File size: 1,390 Bytes
74f3dc1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# /users/jw02425/models/SSL/vit/download.sh
# Download iBOT checkpoints and save as: ibot_{arch}_in1k(.pth)
set -euo pipefail

OUT_DIR=${1:-.}
mkdir -p "$OUT_DIR"

declare -A urls
urls["ibot_vits_in1k"]="https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/archive/2022/ibot/vits_16/checkpoint_teacher.pth"
urls["ibot_vitb_in1k"]="https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/archive/2022/ibot/vitb_16/checkpoint_teacher.pth"
# urls["ibot_vitl_in1k"]="https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/archive/2022/ibot/vitl_16/checkpoint_teacher.pth"
urls["ibot_vitb_in1krand"]="https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/archive/2022/ibot/vitb_16_rand_mask/checkpoint_teacher.pth"
# urls["ibot_vitl_in1krand"]="https://lf3-nlp-opensource.bytetos.com/obj/nlp-opensource/archive/2022/ibot/vitl_16_rand_mask/checkpoint_teacher.pth"

# moco
urls["moco_vits_in1k"]="https://dl.fbaipublicfiles.com/moco-v3/vit-s-300ep/vit-s-300ep.pth.tar"
urls["moco_vitb_in1k"]="https://dl.fbaipublicfiles.com/moco-v3/vit-b-300ep/vit-b-300ep.pth.tar"



for name in "${!urls[@]}"; do
    url="${urls[$name]}"
    out_path="$OUT_DIR/${name}.pth"
    if [[ ! -f "$out_path" ]]; then
        echo "File $out_path already exists, skipping download."
        continue
    fi
    echo "Downloading $url -> $out_path"
    wget -c -O "$out_path" "$url"
done