Skip to content

Instantly share code, notes, and snippets.

@jk195417
Last active April 22, 2020 20:57
Show Gist options
  • Save jk195417/76afbb7ac8ce30afb04bcd72eafc5aff to your computer and use it in GitHub Desktop.
Save jk195417/76afbb7ac8ce30afb04bcd72eafc5aff to your computer and use it in GitHub Desktop.

for osx

install xcode

$ xcode-select --install

install brew

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install

install cmake

$ brew install cmake

install python3

$ brew install python3

install boost-python

$ brew install boost-python --with-python3 --without-python

install dlib

Clone the code from github:

git clone https://github.com/davisking/dlib.git

Build the main dlib library:

cd dlib
mkdir build; cd build; cmake .. -DDLIB_USE_CUDA=0 -DUSE_AVX_INSTRUCTIONS=1; cmake --build .

Build and install the Python extensions:

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

pip install

install face_recognition

$ pip3 install face_recognition

reference

http://docs.python-guide.org/en/latest/starting/install3/osx/ https://brew.sh/index_zh-tw.html https://github.com/ageitgey/face_recognition https://github.com/davisking/dlib https://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment