Skip to content

Commit

Permalink
Urgent Bugfixes, Gpu or Cpu choice, Faster installation on Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
edin45 committed Feb 15, 2022
1 parent 21589b4 commit 0ffdf78
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 15 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ install_build_windows.bat
```
git clone --recursive https://github.com/edin45/openPT3D.git (or unzip the zip you download from the stable release)
cd openPT3D && cd externalSoftware
sh install_build_arch.sh
sh install_build_arch_cpu.sh for cpu or
sh install_build_arch_gpu.sh for gpu (CUDA)
```

### Debian/Ubuntu/Pop OS installation:
#### This will take about 40 minutes on a 4 core CPU
```
git clone --recursive https://github.com/edin45/openPT3D.git (or unzip the zip you download from the stable release)
cd openPT3D && cd externalSoftware
sh install_python3_debian.sh
sh install_build_debian.sh
sh install_build_debian_cpu.sh for cpu or
sh install_build_debian_gpu.sh for gpu (CUDA)
```

### Usage:
Expand All @@ -49,5 +50,5 @@ python main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE

#### Debian:
```
python3.9 main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE_STORED]
python3 main.py -i [FOLDER_WITH_INPUT_IMAGES_TO_USE] -r [FOLDER_WHERE_RESULTS_ARE_STORED]
```
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ wait
pacman -S freeglut glew glfw pugixml
wait
#OpenMVS
#git clone https://github.com/cdcseacave/openMVS.git openMVS
wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz"
wait
tar -xf v2.0.tar.gz
git clone https://github.com/cdcseacave/openMVS.git openMVS
#wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz"
wait
#tar -xf v2.0.tar.gz
#wait
mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU
wait
echo "Using CPU"
cmake . ../openMVS-2.0 -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF
wait
#Install OpenMVS library (optional):
make -j6
100 changes: 100 additions & 0 deletions externalSoftware/install_build_arch_gpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#! /bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
pacman -S opencv gperf
wait
pacman -S cgal
wait
pacman -S lvtk
wait
pacman -S python
wait
pacman -S python-pip
wait
pip install opencv-python
wait
pip install numpy
wait
pacman -S vtk
wait
pacman -S curl zip unzip tar
wait
#git clone https://github.com/Microsoft/vcpkg
#wait
#cd vcpkg
#wait
#./bootstrap-vcpkg.sh
#wait
#./vcpkg install cereal ceres eigen3 libjpeg-turbo libpng tiff
#wait
#cd ..
#wait
#wget -c "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2"
#wait
#tar -xf boost_1_74_0.tar.bz2
#wait
#cd boost_1_74_0
#wait
#./bootstrap.sh --prefix=/usr --with-python=python3 &&
#wait
#./b2 stage -j4 threading=multi link=shared
#wait
#./b2 install threading=multi link=shared
#wait
#cd ..
#wait
pacman -S cmake libpng libjpeg libtiff mesa boost
wait
pacman -S graphviz
wait
main_path=`pwd`
wait
#Eigen (Required)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
wait
mkdir eigen_build && cd eigen_build
wait
cmake . ../eigen
wait
make && sudo make install
wait
cd ..
wait
pacman -S libstdc++5 make
wait
pacman -Syu lib32-gcc-libs
wait
pacman -S gcc=libs
wait
pacman -S egl-wayland eglexternalplatform eigen gflags google-glog ninja
wait
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
wait
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
wait
mkdir ceres_build && cd ceres_build
wait
cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
wait
make -j6 && sudo make install
wait
cd ..
wait
pacman -S freeglut glew glfw pugixml
wait
#OpenMVS
git clone https://github.com/cdcseacave/openMVS.git openMVS
#wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz"
wait
#tar -xf v2.0.tar.gz
#wait
mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU
wait
echo "Using CPU"
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
wait
#Install OpenMVS library (optional):
make -j6
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ if ! [ $(id -u) = 0 ]; then
fi
sudo apt update && sudo apt upgrade
wait
python3.9 -m pip install opencv-python
sudo apt install python3 python3-pip
wait
python3.9 -m pip install numpy
pip install opencv-python
wait
pip install numpy
wait
apt install curl zip unzip tar bison libopencv-dev gperf autoconf libjpeg62-dev
#wget -c "http://ftp.de.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg-dev_2.0.6-4_amd64.deb"
Expand Down Expand Up @@ -83,14 +85,12 @@ wait
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
wait
#OpenMVS
wget -c "https://github.com/cdcseacave/openMVS/archive/refs/tags/v2.0.tar.gz"
wait
tar -xf v2.0.tar.gz
git clone https://github.com/cdcseacave/openMVS.git openMVS
wait
mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU
wait
echo "Using CPU"
cmake . ../openMVS-2.0 -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib" -DOpenMVS_USE_CUDA=OFF
wait
#Install OpenMVS library (optional):
make -j6
96 changes: 96 additions & 0 deletions externalSoftware/install_build_debian_gpu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/bin/bash
if ! [ $(id -u) = 0 ]; then
echo "Please run as root!"
exit 1
fi
sudo apt update && sudo apt upgrade
wait
sudo apt install python3 python3-pip
wait
pip install opencv-python
wait
pip install numpy
wait
apt install curl zip unzip tar bison libopencv-dev gperf autoconf libjpeg62-dev
#wget -c "http://ftp.de.debian.org/debian/pool/main/libj/libjpeg-turbo/libjpeg-dev_2.0.6-4_amd64.deb"
#wait
#dpkg -i libjpeg-dev_2.0.6-4_amd64.deb
wait
git clone https://github.com/Microsoft/vcpkg
wait
cd vcpkg
wait
./bootstrap-vcpkg.sh
wait
./vcpkg install cereal ceres eigen3 libpng tiff opencv
wait
cd ..
wget -c "https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.bz2"
wait
tar -xf boost_1_74_0.tar.bz2
wait
cd boost_1_74_0
wait
./bootstrap.sh --prefix=/usr --with-python=python3 &&
wait
./b2 stage -j4 threading=multi link=shared
wait
./b2 install threading=multi link=shared
wait
cd ..
#Prepare and empty machine for building:
sudo apt-get update -qq && sudo apt-get install -qq
wait
sudo apt-get -y install git cmake libpng-dev libjpeg-dev libtiff-dev libglu1-mesa-dev
wait
main_path=`pwd`
wait
#Eigen (Required)
git clone https://gitlab.com/libeigen/eigen.git --branch 3.4
wait
mkdir eigen_build && cd eigen_build
wait
cmake . ../eigen
wait
make && sudo make install
wait
cd ..
wait
#Boost (Required)
sudo apt-get -y install libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-serialization-dev
wait
#OpenCV (Required)
sudo apt-get -y install libopencv-dev
wait
#CGAL (Required)
sudo apt-get -y install libcgal-dev libcgal-qt5-dev
wait
#VCGLib (Required)
git clone https://github.com/cdcseacave/VCG.git vcglib
wait
#Ceres (Optional)
sudo apt-get -y install libatlas-base-dev libsuitesparse-dev
wait
git clone https://ceres-solver.googlesource.com/ceres-solver ceres-solver
wait
mkdir ceres_build && cd ceres_build
wait
cmake . ../ceres-solver/ -DMINIGLOG=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF
wait
make -j2 && sudo make install
wait
cd ..
wait
#GLFW3 (Optional)
sudo apt-get -y install freeglut3-dev libglew-dev libglfw3-dev
wait
#OpenMVS
git clone https://github.com/cdcseacave/openMVS.git openMVS
wait
mkdir openMVS_Linux_CPU && cd openMVS_Linux_CPU
wait
echo "Using GPU"
cmake . ../openMVS -DCMAKE_BUILD_TYPE=Release -DVCG_ROOT="$main_path/vcglib"
wait
#Install OpenMVS library (optional):
make -j6

0 comments on commit 0ffdf78

Please sign in to comment.