This repo using the library face_recognition to build the application which can identify and recognize the human face from images as well as in real-time video stream
Requirements
- Python 3.3+ or Python 2.7
- macOS or Ubuntu (Any Linux OS)
-
Install dlib: You can install dlib from source on Ubuntu or for macOS using this link
-
Install face_recognition:
sudo pip install face_recognition
-
face_detection_example.py
This script find the faces form the image. This code can run on CPU Give the path of the image on which you want to run this code Command that you need to run: python face_detection_example.py
-
face_detection_GPU_example.py
This script find the faces form the image. This code can run on GPU Give the path of the image on which you want to run this code Command that you need to run: python face_detection_GPU_example.py
-
Real_time_face_detection.py
- This script identify the person names. If face is not fimiliar then it tags as unknown.
- You need to provide sample image with person name So that machine can identify the person's name.
You can run this code: python Real_time_face_detection.py
Credit for the majority of code here goes to Adam Geitgey. I've merely created a wrapper to get people started. His library has many other APIs which you can explore