dlib, OpenFace and face_recognition

本文详细介绍了如何在Mac上从源代码安装dlib,包括安装Python绑定,通过MacPorts和Anaconda两种方式。接着讨论了OpenFace的自动化Docker构建和手动构建过程,并解决了在Docker中运行GUI应用的问题。最后提到了Torch的安装步骤,指出Torch的安装依赖于Homebrew。
摘要由CSDN通过智能技术生成

How to install dlib from source

1). download dlib-19.4
2).

cd examples/
mkdir build
cd build/
cmake -G Xcode ...

3). Install XQuartz-2.7.11.dmg from https://www.xquartz.org/, so X server is ready
4). cd Debug/ &
./face_landmark_detection_ex shape_predictor_68_face_landmarks.dat ../../faces/*.jpg
./dnn_face_recognition_ex ../../faces/bald_guys.jpg

Install Python bindings

Basically,

  • python3 setup.py install --yes USE_AVX_INSTRUCTIONS --no DLIB_USE_CUDA

This will build libdlib.a and dlib.so from

  • Build files have been written to: ./dlib-19.7/tools/python/
Build using cmake ...
Scanning dependencies of target dlib
[  0%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
[  1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
[  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
[  3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
[  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
[  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
[  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
[  6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
[  7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
[  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o

Then Populating the distribution directory

  • ./dlib-19.7/./dist/dlib
Install dlib HEAD (w/ python bindings) - MacPorts version

1). re-install Boost binding with Python 3.5

sudo port uninstall boost
port variants boost
sudo port install boost -python27 +python35

2). OpenCV 3.1 has been installed before, but updated automatically

opencv @3.1.0_3+contrib+python35

3). sudo /opt/local/bin/python3.5 setup.py install –yes USE_AVX_INSTRUCTIONS –no DLIB_USE_CUDA

4). run /opt/local/bin/python3.5 and type import dlib, error:

  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/dlib-19.4.0-py3.5-macosx-10.11-x86_64.egg/dlib/__init__.py", line 1, in
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值