-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdl_datasets.sh
More file actions
executable file
·61 lines (50 loc) · 1.53 KB
/
dl_datasets.sh
File metadata and controls
executable file
·61 lines (50 loc) · 1.53 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
set -e
RUSTMLPATH=~/.rustml
echo
if [ ! -e $RUSTMLPATH ]; then
mkdir $RUSTMLPATH
fi
echo -e "\e[1;34mdownloading example images ...\e[0m"
if [ ! -e $RUSTMLPATH/datasets/images ]; then
mkdir -p $RUSTMLPATH/datasets/images
fi
for i in \
"fog.jpg" \
; do
URL="https://github.com/daniel-e/rustml/blob/master/datasets/images/$i?raw=true"
echo "> downloading $i ..."
wget -q -O $RUSTMLPATH/datasets/images/$i $URL
done
echo -e "\e[1;32mdone\e[0m"
# --------------------------------------------
# mnist dataset of handwritten digits
echo -e "\e[1;34mdownloading MNIST dataset of handwritten digits ...\e[0m"
if [ ! -e $RUSTMLPATH/datasets/mnist_digits ]; then
mkdir -p $RUSTMLPATH/datasets/mnist_digits
fi
for i in \
"t10k-images-idx3-ubyte.gz" \
"t10k-labels-idx1-ubyte.gz" \
"train-images-idx3-ubyte.gz" \
"train-labels-idx1-ubyte.gz" \
; do
URL="https://github.com/daniel-e/rustml/blob/master/datasets/mnist_digits/$i?raw=true"
echo "> downloading $i ..."
wget -q -O $RUSTMLPATH/datasets/mnist_digits/$i $URL
done
# --------------------------------------------
echo -e "\e[1;34mdownloading example videos ...\e[0m"
if [ ! -e $RUSTMLPATH/datasets/videos ]; then
mkdir -p $RUSTMLPATH/datasets/videos
fi
for i in \
"day_and_night_in_gray.avi" \
"day_and_night_in_gray_mask_sky.png" \
; do
URL="https://github.com/daniel-e/rustml/blob/master/datasets/videos/$i?raw=true"
echo "> downloading $i ..."
wget -q -O $RUSTMLPATH/datasets/videos/$i $URL
done
echo -e "\e[1;32mdone\e[0m"
# --------------------------------------------