Now use your face for login,sudo commands and other authentications on linux.
- Python3.6 or above
- Python Modules:
- numpy
- opencv-python
- opencv-contrib-python
Clone the repositery wherever you like
git clone https://github.com/anish-kmr/facelock.git
Rename from 'facelock-master' to 'facelock' and cd into cloned repo
$ cd facelock
If you have all requirements listed above installed ,then you can leave this step.
$ chmod +x requirements.sh
$ ./requirements.sh
This can take a while
Install facelock
$ chmod +x install.sh
$ ./install.sh
You now have facelock installed
Check the status of facelock
$ facelock status
First time, it should say disabled.
You can add faces facelock by webcam.
$ facelock add your_label
Change 'your_label' to your name or whatever you like.
This will open your webcam. Show your face to webcam for a few seconds at different distances.
Press 'q' to close webcam.
To check whether you are recognized or not ,type this:
$ facelock test
Your label should appear on top of your face. If not, try adding more of your faces to database by 'facelock add <your_existing_label>'
$ facelock enable
By doing this, every time you are asked to write password ,your face will be scanned and used to unlock instead.
Note that if your face is not scanned within 2min it will ask for the password.
To see who all can pass facelock
$ facelock list
The labels listed were set by you when you added them. The number in braces represents the number of face data recorded for particular label.
To remove faces from facelock records,
$ facelock remove label_to_delete
'label_to_delete' being the label name you want to delete
$ facelock disable