-
calibrate according orientation, camera index, check this post.
-
face detection using opencv haar cascade detector. (scaled to max edge size = 480)
-
filtering: for each face from previous step, apply skin filter + dlib hog based face detector. dlib detector is slower but with less false positive. (scaled to max edge size = 960)
-
landmarks detection using dlib, very fast. (original size)
-
alignment: 68 points template image, their coordinates can be found here. You can either use the template coordinates or your targeted aligned landmarks coordinates (e.g. scale and translation on top of template coordinates) to do affine transformation and cropping. The cropped images will be aligned and saved for feature extraction (if needed).
-
modify relevant paths in
faceDetAlignLib/build.sh
andfaceDetAlignLib/CMakeLists.txt
, runbuild.sh
-
download dlib landmarks detection model from here
-
adb push shape_predictor_68_face_landmarks.dat /sdcard/FaceDetAlignApp/