forked from visionml/pytracking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
149 lines (119 loc) · 4.33 KB
/
install.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "ERROR! Illegal number of parameters. Usage: bash install.sh conda_install_path environment_name"
exit 0
fi
conda_install_path=$1
conda_env_name=$2
source $conda_install_path/etc/profile.d/conda.sh
echo "****************** Creating conda environment ${conda_env_name} python=3.7 ******************"
conda create -y --name $conda_env_name
echo ""
echo ""
echo "****************** Activating conda environment ${conda_env_name} ******************"
conda activate $conda_env_name
echo ""
echo ""
echo "****************** Installing pytorch with cuda10 ******************"
conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch
echo ""
echo ""
echo "****************** Installing matplotlib ******************"
conda install -y matplotlib
echo ""
echo ""
echo "****************** Installing pandas ******************"
conda install -y pandas
echo ""
echo ""
echo "****************** Installing tqdm ******************"
conda install -y tqdm
echo ""
echo ""
echo "****************** Installing opencv ******************"
pip install opencv-python
echo ""
echo ""
echo "****************** Installing tensorboard ******************"
pip install tb-nightly
echo ""
echo ""
echo "****************** Installing visdom ******************"
pip install visdom
echo ""
echo ""
echo "****************** Installing scikit-image ******************"
pip install scikit-image
echo ""
echo ""
echo "****************** Installing tikzplotlib ******************"
pip install tikzplotlib
echo ""
echo ""
echo "****************** Installing gdown ******************"
pip install gdown
echo ""
echo ""
echo "****************** Installing cython ******************"
conda install -y cython
echo ""
echo ""
echo "****************** Installing coco toolkit ******************"
pip install pycocotools
echo ""
echo ""
echo "****************** Installing LVIS toolkit ******************"
pip install lvis
echo ""
echo ""
echo "******** Installing spatial-correlation-sampler. Note: This is required only for KYS tracker **********"
pip install spatial-correlation-sampler
echo ""
echo ""
echo "****************** Installing jpeg4py python wrapper ******************"
pip install jpeg4py
echo ""
echo ""
echo "****************** Installing ninja-build to compile PreROIPooling ******************"
echo "************************* Need sudo privilege ******************"
sudo apt-get install ninja-build
echo ""
echo ""
echo "****************** Downloading networks ******************"
mkdir pytracking/networks
echo ""
echo ""
echo "****************** DiMP50 Network ******************"
gdown https://drive.google.com/uc\?id\=1qgachgqks2UGjKx-GdO1qylBDdB1f9KN -O pytracking/networks/dimp50.pth
# gdown https://drive.google.com/uc\?id\=1MAjrRJDCbL0DSjUKFyDkUuYS1-cYBNjk -O pytracking/networks/dimp18.pth
# echo ""
# echo ""
# echo "****************** ATOM Network ******************"
# gdown https://drive.google.com/uc\?id\=1VNyr-Ds0khjM0zaq6lU-xfY74-iWxBvU -O pytracking/networks/atom_default.pth
# echo ""
# echo ""
# echo "****************** ECO Network ******************"
# gdown https://drive.google.com/uc\?id\=1aWC4waLv_te-BULoy0k-n_zS-ONms21S -O pytracking/networks/resnet18_vggmconv1.pth
echo ""
echo ""
echo "****************** Setting up environment ******************"
python -c "from pytracking.evaluation.environment import create_default_local_file; create_default_local_file()"
python -c "from ltr.admin.environment import create_default_local_file; create_default_local_file()"
echo ""
echo ""
echo "****************** Installing jpeg4py ******************"
while true; do
read -p "Install jpeg4py for reading images? This step required sudo privilege. Installing jpeg4py is optional, however recommended. [y,n] " install_flag
case $install_flag in
[Yy]* ) sudo apt-get install libturbojpeg; break;;
[Nn]* ) echo "Skipping jpeg4py installation!"; break;;
* ) echo "Please answer y or n ";;
esac
done
echo ""
echo ""
echo "****************** Installation complete! ******************"
echo ""
echo ""
echo "****************** More networks can be downloaded from the google drive folder https://drive.google.com/drive/folders/1WVhJqvdu-_JG1U-V0IqfxTUa1SBPnL0O ******************"
echo "****************** Or, visit the model zoo at https://github.com/visionml/pytracking/blob/master/MODEL_ZOO.md ******************"