Build from source

Below are instructions for Ubuntu 20.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 \
  python3-yaml rapidjson-dev libmapbox-variant-dev

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 v0.25.0 (dev)
GIT REF: master:9a3935bb3aa8f96e500b34a262145a3a7236edff
COMPILE_FLAGS: USE_CAFFE2=OFF USE_TF=OFF USE_NCNN=OFF USE_TORCH=OFF USE_HDF5=OFF USE_CAFFE=OFF USE_TENSORRT=ON USE_TENSORRT_OSS=OFF USE_DLIB=OFF USE_CUDA_CV=ON USE_SIMSEARCH=OFF USE_ANNOY=OFF USE_FAISS=ON USE_COMMAND_LINE=ON USE_JSON_API=ON USE_HTTP_SERVER=OFF
DEPS_VERSION: OPENCV_VERSION=4.7.0 CUDA_VERSION=12.1 CUDNN_VERSION=8.9.1 CUDA_ARCH=8.6 TENSORRT_VERSION=v8.6.1
[2024-01-10 13:30:11.896] [api] [info] DeepDetect HTTP server listening 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.