Skip to content

shaonianruntu/Face-Keypoint-Detection-and-Alignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FACE KEYPOINT

Face key point detection and face alignment

Code Description

dlib_landmarks.py

Use to detect and mark key points of human faces. You can choose to detect 81 key points or only 68 key point by change dlib_modes. And you can choose to only detect five sense organs by setting dlib_five=True

Results are:

68 key points 81 key points 5 key points

face_detect_align.py

Use to align and unify all faces in dataset according to the distance between the eyes. You can choose to visible all face key points on aligned face dataset by use landmark_visible. And you can choose to visible just two eyes on aligned face dataset by use landmark_visible. Default is no visible any face key points.

Results are:

aligned face 1 aligned face 2 aligned face 3

Support package required

  • python3
  • numpy
  • PIL
  • python-opencv
  • dlib
  • face_recognition

Installation method

These packages may not be included in Anaconda and require additional installation

python-opencv

sudo apt-get install python-opencv

dlib

sudo apt-get install build-essential cmake
sudo apt-get install libgtk-3-dev
sudo apt-get install libboost-all-dev
pip install dlib

or you can use following cmd to install dlib package if you are in China, same as face_recognition.

pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple

face_recognition

pip install face_recognition

Releases

No releases published

Packages

No packages published

Languages