-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare_shift.sh
87 lines (72 loc) · 1.83 KB
/
prepare_shift.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
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
mkdir datasets
cd datasets
mkdir SHIFT
cd SHIFT
mkdir discrete
cd discrete
mkdir images
cd images
mkdir train
cd train
mkdir front
cd front
# now at ./datasets/SHIFT/discrete/images/train/front/
if ! [ -f ./img.zip ]; then
echo "Downloading SHIFT train front img"
wget https://dl.cv.ethz.ch/shift/discrete/images/train/front/img.zip
fi
if ! [ "$(ls -A ./img)" ]; then
unzip img.zip -d ./img
else
echo "img directory not empty"
fi
if ! [ -f ./seq.csv ]; then
echo "Downloading SHIFT train front seq"
wget https://dl.cv.ethz.ch/shift/discrete/images/train/front/seq.csv
fi
if ! [ -f ./semseg.zip ]; then
echo "Downloading SHIFT train front semseg"
wget https://dl.cv.ethz.ch/shift/discrete/images/train/front/semseg.zip
fi
if ! [ "$(ls -A ./semseg)" ]; then
unzip semseg.zip -d ./semseg
else
echo "semseg directory not empty"
fi
# go to ./datasets/SHIFT/discrete/images/
cd ../../
mkdir val
cd val
mkdir front
cd front
if ! [ -f ./img.zip ]; then
echo "Downloading SHIFT val front img"
wget https://dl.cv.ethz.ch/shift/discrete/images/val/front/img.zip
fi
if ! [ "$(ls -A ./img)" ]; then
unzip img.zip -d ./img
else
echo "img directory not empty"
fi
if ! [ -f ./seq.csv ]; then
echo "Downloading SHIFT val front seq"
wget https://dl.cv.ethz.ch/shift/discrete/images/val/front/seq.csv
fi
if ! [ -f ./semseg.zip ]; then
echo "Downloading SHIFT val front semseg"
wget https://dl.cv.ethz.ch/shift/discrete/images/val/front/semseg.zip
fi
if ! [ "$(ls -A ./semseg)" ]; then
unzip semseg.zip -d ./semseg
else
echo "semseg directory not empty"
fi
# # go to ./datasets/SHIFT/discrete/images/
# cd ../../
# # go to ./datasets/SHIFT/
# cd ../../
# # go to ./
# cd ../../
# cp data/shift_counts/counts_train.csv datasets/SHIFT/
# cp data/shift_counts/counts_val.csv datasets/SHIFT/