Build from source

Below are instructions for Ubuntu 16.04 LTS.

Requirements

Dependencies on Debian/Ubuntu Linux:


sudo apt-get install build-essential libgoogle-glog-dev libgflags-dev libeigen3-dev libopencv-dev libboost-dev libboost-iostreams-dev libcurl4-openssl-dev protobuf-compiler libopenblas-dev libhdf5-dev libprotobuf-dev libleveldb-dev libsnappy-dev liblmdb-dev libutfcpp-dev cmake libgoogle-perftools-dev unzip python-setuptools python-dev libspdlog-dev python-six python-enum34 libarchive-dev libcppnetlib-dev

On Ubuntu 16.04, the default curlpp lib is wrongly built, you need to build your own:


sudo apt-get remove libcurlpp-dev
git clone https://github.com/jpbarrette/curlpp.git
cd curlpp
cmake .
sudo make install
sudo cp /usr/local/lib/libcurlpp.* /usr/lib/

On Ubuntu 18.04 or Nvidia Jetson, the network library cppnetlib is not part of the standard packages anymore and needs to be compiled beforehand:


sudo apt-get install libboost-all-dev libssl-dev

wget https://github.com/cpp-netlib/cpp-netlib/archive/cpp-netlib-0.11.2-final.tar.gz
tar xvzf cpp-netlib-0.11.2-final.tar.gz
cd cpp-netlib-cpp-netlib-0.11.2-final
mkdir build
cd build
cmake ..
make
sudo make install

With CUDA 10, a more recent version of cmake than that of Ubuntu 16.04 and 18.04 is required, and needs to be build beforehand:


wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0.tar.gz
tar xvzf cmake-3.14.0.tar.gz
cd cmake-3.14.0
./bootstrap
make
sudo make install

Build


git clone https://github.com/jolibrain/deepdetect.git
cd deepdetect

Post installation step, you may need to add CUDA to your LD PATH:


export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

Run tests

Note: running tests requires the automated download of ~75Mb of datasets, and computations may take around thirty minutes on a CPU-only machines.

To prepare for tests, compile with:


cmake -DBUILD_TESTS=ON ..
make

Run tests with:


ctest

Start the DeepDetect server


cd build/main
./dede

DeepDetect [ commit 73d4e638498d51254862572fe577a21ab8de2ef1 ]
Running DeepDetect HTTP server on localhost:8080

Main options are:

  • -host to select which host to run on, default is localhost, use 0.0.0.0 to listen on all interfaces
  • -port to select which port to listen to, default is 8080
  • -nthreads to select the number of HTTP threads, default is 10

To see all options, do:


./dede --help

You can now try the available models.