Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real problems. It is widely used in industry and academia, including robotics, embedded devices, mobile phones and large high-performance computing environments. Dlib's open source license allows you to use it in any application for free
Dlib can be installed using pip install or download
dlib-19.8.1-cp36-cp36m-win_amd64.whl from the official website (download the latest whl from the official website)
The installation of the whl file requires cmd to enter the terminal directory, and use pip install
dlib-19.8.1-cp36-cp36m-win_amd64.whl to realize the installation of dlib (pip install **.whl)
After the installation is complete, you also need to download dlib's face model and 68-point face feature model
68-point feature data of face
Image face detection
First we import our model and the 68-point feature model
model import
We use OpenCV to operate img images, use dlib to detect faces, dlib to detect faces and OpenCV to detect faces have many similar codes, here are no longer one by one