Android development notes onGithub

Today a comparative failure of the attempt, face recognition is currently more popular applications such as OpencV, Dlib.


Today I read dlib related materials for the first time. I compiled and ran dlib on MAC system and encountered some problems.

MAC OS does Not have GUI support. Xquartz is Not supported.

Gui_core: Unable to connect to the X display 1651 FATAL [1] lib.gui_core: Unable to connect to the X display

Question 3: Does dlib support GIF format? Dlib leaves a #cmakedefine DLIB_GIF_SUPPORT interface in config.h.n and a #define DLIB_GIF_SUPPORT interface in config.h, but no gif-supported code

Question 4: Does dlib support streaming media

Problem 5: The dlib face recognition training data, shape_predictor_68_face_landmarks. Dat, is 97m, and is impossible to port to a mobile device

These problems will be solved later.


The process and result of running Demo are as follows

1. Download

You can clone on Github or download it from the official website

2. Compile

Following the instructions on Github,

mkdir build; 
cd build; 
cmake .. ; 
cmake --build .
Copy the code

3. Install GUI-XQuartz

Face detection Demo requires a GUI. If the GUI is not supported locally on the MAC, the executable file corresponding to face_landmark_DETECtion_EX will not be generated after compilation. Download address

4. Run face detection Demo

Copy the Faces folder in Example into build. Download shape_predictor_68_face_landmarks. Dat and copy it to the build folder. Run the program as per the face_landmark_DETECtion_ex.cpp annotation:

./face_landmark_detection_ex shape_predictor_68_face_landmarks.dat faces/*.jpg
Copy the code

5. Running result

But when you look at the man in the middle of the picture you can see that he’s not very accurate


Performance comparison of various face detection methods (not accurate)