Face tools
Language: Python 3
Targe platform: Raspberry Pi, Ubuntu, OSX
Libraries: Dlib, skimage
Installing Dlib
For Ubuntu
- Install required packages
sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev-
Set up your virtual environment
-
Install dlib with Python bindings and skimage
pip install dlib
pip install scikit-imageSee http://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/ for more details.
For Raspberry Pi
See http://www.pyimagesearch.com/2017/05/01/install-dlib-raspberry-pi/.
Official guideline
Face detection using Dlib
-
Install Dlib
-
Run the example code:
python3 face_detector.py [IMAGE-FILE-NAME]
Facial landmark detection using Dlib
-
Install Dlib
-
Get a pre-trained model:
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 bunzip2 shape_predictor_68_face_landmarks.dat.bz2
-
run the example code
python3 face_landmark_detection.py shape_predictor_68_face_landmarks.dat [IMAGE_FILE_NAME]
Other Dlib python examples
https://github.com/davisking/dlib/tree/master/python_examples