install_dependencies.sh 2.87 KB
Newer Older
Clément Pinard's avatar
Clément Pinard committed
1
2
#!/bin/bash

3
# This script helps you install the necessary tools to construct a depth enabled dataset with Anafi videos
Clément Pinard's avatar
Clément Pinard committed
4
5
# Note that CUDA and Anaconda need to be already installed.
# For CUDA, try to install the last package : https://developer.nvidia.com/cuda-downloads instead of the one installed by APT
6
# Also note that for repo to work, git needs to be parametrized with email and name.
Clément Pinard's avatar
Clément Pinard committed
7
# It has been tested with Ubuntu 18.04 and Ubunut 20.04
8
9
10
11
12
13
14
15
16


# This command makes sure that the .so files pointed by the cmake commands are the right ones
# Alternatively, you can add conda to the cmake folders with the following command :
# CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
# Note that the alternative will trigger erros if you move or delete the anaconda folder.

eval "$(conda shell.bash hook)"
conda deactivate
nicolas's avatar
nicolas committed
17

Clément Pinard's avatar
Clément Pinard committed
18
19
sudo apt update
sudo apt install -y git \
20
    curl \
Clément Pinard's avatar
Clément Pinard committed
21
    cmake \
Clément Pinard's avatar
Clément Pinard committed
22
    ffmpeg \
Clément Pinard's avatar
Clément Pinard committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    build-essential \
    pkg-config \
    libboost-all-dev \
    libeigen3-dev \
    libsuitesparse-dev \
    libfreeimage-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libglew-dev \
    qtbase5-dev \
    libqt5opengl5-dev \
    libcgal-dev \
    libflann-dev \
    cmake libgmp-dev \
    libgoogle-glog-dev \
    libqwt-qt5-dev \
    libpcl-dev \
    libproj-dev \
    libcgal-qt5-dev \
    libatlas-base-dev \
    libsuitesparse-dev \
    zlib1g-dev \
    libglfw3-dev \
nicolas's avatar
nicolas committed
46
    libsdl2-dev rsync
Clément Pinard's avatar
Clément Pinard committed
47
48
49

git clone https://github.com/laurentkneip/opengv.git
cd opengv \
50
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
51
  && cd build \
52
  && cmake .. \
Clément Pinard's avatar
Clément Pinard committed
53
54
55
56
57
58
59
  && make -j8
sudo make install
cd ../../

git clone https://github.com/opencv/opencv.git
cd opencv \
  && git checkout 4.1.2 \
60
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  && cd build \
  && cmake -D WITH_CUDA=OFF .. \
  && make -j8
sudo make install
cd ../../

git clone https://github.com/ETH3D/dataset-pipeline
cd dataset-pipeline \
  && mkdir -p build \
  && cd build \
  && cmake .. \
  && make -j8 \
  && cd ../../

git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver \
  && git checkout $(git describe --tags) \
78
79
80
  && mkdir -p build \
  && cd build \
  && cmake .. -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF \
Clément Pinard's avatar
Clément Pinard committed
81
82
83
84
85
86
87
  && make -j8
sudo make install
cd ../../

git clone https://github.com/colmap/colmap.git
cd colmap \
  && git checkout dev \
88
  && mkdir -p build \
Clément Pinard's avatar
Clément Pinard committed
89
90
91
92
  && cd build \
  && cmake .. \
  && make -j8
sudo make install
nicolas's avatar
nicolas committed
93
cd ../../
Clément Pinard's avatar
Clément Pinard committed
94

95
96
97
98
99
100
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo

conda activate
Clément Pinard's avatar
Clément Pinard committed
101
102
103
104
mkdir -p groundsdk \
  && cd groundsdk \
  && repo init -u https://github.com/Parrot-Developers/groundsdk-manifest -m release.xml \
  && repo sync \
nicolas's avatar
nicolas committed
105
106
107
108
109
  && ./build.sh -p pdraw-linux -t build -j8
cd ../

pip install -r requirements.txt

Clément Pinard's avatar
Clément Pinard committed
110
./build_pcl_util.sh
Clément Pinard's avatar
Clément Pinard committed
111
112
113

# Note that other tree sizes are available, see https://demuc.de/colmap/#download
wget https://demuc.de/colmap/vocab_tree_flickr100K_words256K.bin