-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathgetWeights.sh
executable file
·27 lines (27 loc) · 1.01 KB
/
getWeights.sh
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
#!/usr/bin/env bash
set -euxo pipefail
path_to_cfg="https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov2-tiny.cfg"
path_to_weights="https://pjreddie.com/media/files/yolov2-tiny.weights"
if wget ${path_to_weights}; then
echo "downloading weights"
else
echo "wget is not installed. Falling back to curl"
curl -O "${path_to_weights}"
fi
cp ./yolov2-tiny.weights ./Examples/camera/bin/data/dnn/
cp ./yolov2-tiny.weights ./Examples/single_image/bin/data/dnn/
cp ./yolov2-tiny.weights ./Examples/osc_sender/bin/data/dnn/
cp ./yolov2-tiny.weights ./Examples/annotation/bin/data/dnn/yolo.weights
if wget ${path_to_cfg}; then
echo "downloading cfg"
else
echo "wget is not installed. Falling back to curl"
curl -O "${path_to_cfg}"
fi
cp ./yolov2-tiny.cfg ./Examples/single_image/bin/data/dnn/
cp ./yolov2-tiny.cfg ./Examples/camera/bin/data/dnn/
cp ./yolov2-tiny.cfg ./Examples/osc_sender/bin/data/dnn/
cp ./yolov2-tiny.cfg ./Examples/annotation/bin/data/dnn/
rm -f ./yolov2-tiny.cfg
rm -f ./yolov2-tiny.weights
echo "done"