This branch is the basic version of the system which can run in the PC. The web server version is in the other branch. The front end of this project is here.
-
Store Your Faces
When the program runs, people can press- key
s
to store and restore their faces - key
r
to remove the faces with specific name
- key
-
Faces Detection
The program can detect faces in the camera and use square the around the faces. Multi-faces are supported. -
Faces Recognition
The camera can recognize who are in the camera. Multi-faces are supported.The labels will be given near the square. The labels areUnknown
if the faces hasn't been stored- the name that people gave when they store the faces
-
Send Message to mobiles
When strangers come to the house, a message via Facebook Messager is given to their mobiles. -
Unlock Control
When the house owner get back home, an unlock key image will be shown in the screen.
-
Install face_recognition package
To install this package in Windows- if you already have the
cmake
compiler environment, you can use following command to install the packagepip install dlib pip install face_recognition
- if you don't have the
camke
compiler environment, you can go to here to download the dlb.whl file and install it withpip
. Later you can useto installpip install face_recognition
face_recognition
package.
I personal recommend you can use the
virtualenv
to create a virtual python environment, instruction is here. - if you already have the
-
IFTTT settings
- Signup an account in IFTTT website.
- Go to
MyApplets
-New Applet
-this
, choose theWebhooks
-Revice a web request
, and give the event name and clickCreate trigger
. - choose
that
-Face Messenger
-Send Message
, and type what you want to send to your mobile, then clickCreate Action - Finish
. - Go back to the homepage and go to
MyApplets
-Services
-Webhooks
Documentation
copy the link to the parameter ofurl_stranger
inhome_assistance_robot.py
-
Use
PyCharm
to open this project, make sure that your interpreter was set to the right path of your path anddlib
,face_recogniton
were already installed. -
Run home_assistance_robot.py
- A PC with python environment
- A Camera connected to the PC
- A Mobile with Facebook Messenger
-
main.py
The entry of all the functions. Use theFaceProcess
class from theImageProcess.py
file. -
ImageProcess.py
Has the class ofFaceProcess
, can handle the function of camera detection and recognition.
You can set the parameters, the parameters are as following:- resize_frame
Resize the frame when handle the frame. Vary from 0 to 1. - recognize_threshold
The threshold to recognize people. Vary from 0 to 1. - recognize_mode
0 means to recognize when the number of faces change; 1 means to recognize every detect_interval frames. - detect_interval
handle the image every detect_interval frames. Has no function if recognize_mode is set to 0 - person_store_number
the number of images to store in the database - filename=filename
the .csv file name
Notes:
I recommend you set the parameter to recognize_mode=1, detect_interval=2. If it runs very slowly, you can set the parameter to recognize_mode=0. - resize_frame