Installing and running Dlib on Ubuntu 16.04

First I installed the dependencies (always local installation if possible) and then DLIB itself in roughly the following order:

CUDA 
Installed the latest CUDA by following the instructions in http://docs.nvidia.com/cuda/ . I used the network installation for Ubuntu 16.04 where everything is installed by typing
$ sudo apt-get install cuda
I rebooted my Linux and after that CUDA examples compiled and everything seemed working OK.

cuDNN
Enabling CUDA with dlib requires this NVidia extension and for that I registered as a developer, downloaded the Ubuntu 16.04 tar ball from https://developer.nvidia.com/rdp/cudnn-download and installed it to the local directory (tar ball contains shares libraries and header files).

OpenCV
I downloaded the most recent source packages from https://www.opencv.org/ and made a local installation (for that I changed the CMAKE_INSTALL_PREFIX).


DLIB
I followed the instructions in http://dlib.net and the only difference was to tell cmake to look for my local installations of OpenCV and cuDNN:
$ cd ~/Work/ext/dlib-19.8/examples/build
$ cmake -DCMAKE_PREFIX_PATH="/home/kamarain/Work/ext/opencv-3.4.0/build/install;/home/kamarain/Work/ext/cuda/" ..
$ make
The coolest thing to test is the real-time face landmark predictor:
$ wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
$ bunzip2 shape_predictor_68_face_landmarks.dat.bz2
$ ./webcam_face_pose_ex 

Kommentit

Tämän blogin suosituimmat tekstit

Using citations in BSc and MSc theses

Compiling and running Deep Pyramid Deformable Part Model (DP-DPM) in Ubuntu 16.04.3 LTS