Create your own Real-Time World Wide Face Detector using a webcam!! We use powerful python script by Apokky-30 to make all of this incredible project.
- Python 3.3+ or Python 2.7
- macOS or Linux (Windows not officially supported, but might work)
How to install dlib from source on macOS or Ubuntu
brew install cmake
pip3 install face_recognition
Alternatively, you can try this library with Docker
If you are having trouble with installation, you can also try out a pre-configured VM.
While Windows isn't officially supported, helpful users have posted instructions on how to install this library:
- Download the pre-configured VM image (for VMware Player or VirtualBox).
- Jetson Nano installation instructions -- Please follow the instructions in the article carefully. There is current a bug in the CUDA libraries on the Jetson Nano that will cause this library to fail silently if you don't follow the instructions in the article to comment out a line in dlib and recompile it.
pkg install graphics/py-face_recognition
You can import the face_recognition module
and then easily manipulate faces with just a couple of lines of code. It's super easy!
API Docs: https://face-recognition.readthedocs.io.
View and Download the code from here -- by Apokky-30
If you want to create a standalone executable that can run without the need to install python
or face_recognition
, you can use PyInstaller. However, it requires some custom configuration to work with this library. See this issue for how to do it.
- My article on how Face Recognition works: Modern Face Recognition with Deep Learning -- Covers the algorithms and how they generally work
- Face recognition with OpenCV, Python, and deep learning by Adrian Rosebrock -- Covers how to use face recognition in practice
- Raspberry Pi Face Recognition by Adrian Rosebrock -- Covers how to use this on a Raspberry Pi
- Face clustering with Python by Adrian Rosebrock -- Covers how to automatically cluster photos based on who appears in each photo using unsupervised learning
- The face recognition model is trained on adults and does not work very well on children. It tends to mix up children quite easy using the default comparison threshold of 0.6.
- Accuracy may vary between ethnic groups. Please see this wiki page for more details.