Skip to content

Commit

Permalink
Download models from cloudflare r2
Browse files Browse the repository at this point in the history
  • Loading branch information
maekawatoshiki committed Oct 27, 2024
1 parent 29355af commit bd976b1
Showing 1 changed file with 11 additions and 30 deletions.
41 changes: 11 additions & 30 deletions models/download.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
#!/bin/bash -eux

export LANG=C
export LC_ALL=C

if [ -d env ]; then
source env/bin/activate
fi

if ! command -v gdown > /dev/null 2>&1; then
python3 -m venv env
source env/bin/activate
pip install gdown
fi

down() {
if [ ! -f "$2" ]; then
gdown "$1" -O "$2"
fi
}

if [ "${1:-}" = "CI" ]; then
down 1BiXmAGt_SZdZ1OuSv3ntT6Ad5h_q7oJ4 ./mnist-8.onnx
down 1cZtpzvERn-QXDjfbPYY_cu3RlxxQJOVP ./mobilenetv3.onnx
down 1PkSkHolMuM8_Eefj4Nu0LDSF_xqezgsT ./cat.png
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/mnist-8.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/mobilenetv3.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/cat.png
else
down 1YP8wJyOhR0vSaeasn-z1WbkXBX8TzUER ./realesrgan_256x256.onnx
down 1BiXmAGt_SZdZ1OuSv3ntT6Ad5h_q7oJ4 ./mnist-8.onnx
down 1cZtpzvERn-QXDjfbPYY_cu3RlxxQJOVP ./mobilenetv3.onnx
down 1PkSkHolMuM8_Eefj4Nu0LDSF_xqezgsT ./cat.png
down 1QPbKB7KjJxIXe3Zv3Q5HqrdwQOJWMTLt ./dog.jpg
down 1KsIguzhvffIKFYIDhAMFWxU_cii9DOJT ./deeplab_mobilenetv3.onnx
down 1HZ__4-EqloRWwXZJrMlCZvyGZteY64WO ./fcn-resnet50.onnx
down 129ns91SK-LEv6kWy5hNA86uZhMJe6FDl ./yolov5s.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/mnist-8.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/mobilenetv3.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/deeplab_mobilenetv3.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/fcn-resnet50.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/yolov5s.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/realesrgan_256x256.onnx
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/cat.png
wget https://pub-edba5feea2c145019e8be2a71dbeea81.r2.dev/dog.jpg
fi

0 comments on commit bd976b1

Please sign in to comment.