How to install Dlib on Ubuntu

Download “dlib-19.16.tar.bz2” at “http://dlib.net”.

tar xvf dlib-19.16.tar.bz2

cd dlib-19.16

python setup.py install
python3 setup.py install

—————– Shared Library —————–

mkdir shared_build
cd shared_build
cmake -DBUILD_SHARED_LIBS=1 -DUSE_AVX_INSTRUCTIONS=ON ..
cmake –build . –config Release
make install

# AVX works on processors released after 2011, which is the fastest one.
# SSE2 works for most Intel or AMD chips: -DUSE_SSE2_INSTRUCTIONS=ON
# SSE4 works for most current machines: -DUSE_SSE4_INSTRUCTIONS=ON

Leave a Reply