Recognition by minimum norm between vectors (128D dlib descriptor)
Make sure to have the following libraries installed in your Python environment:
- opencv
- dlib
- numpy
- imutils
- pillow
Update the known_faces
directory with images of people you want to detect and be sure to crop around the faces as the Zuckerberg example (if you don't, the program execution might raise an error).
Please only use .jpg or .png image format files in the known_faces
folder.
For instance, you may have the following files:
/known_faces/Zuckerberg.png
/known_faces/YourPicture.jpg
Note that the recognition name displayed is taken from the file name (without extension) it matches in the known_faces
folder.
You need a camera connected to your PC since the program will stream the image of camera on your screen and will recognize the face displayed should the face be part of the known_faces
folder.
easy_facial_recognition.py --i known_faces
Click on the image below:
- Anis Ayari - Lead Data Scientist
This project is licensed under the MIT License - see the LICENSE.md file for details
On Windows, you may have to additionnally install:
- opencv-python
- CMake
- Visual Studio and the extension for C++ so that
dlib
installation completes successfully