Setup facial recognition for authentication (howdy).
In this article we will setup Howdy - open source face authentication tool. Please make sure your webcam works before you start installation. An article about webcam troubleshooting can be found here.
Installation on Pop!_OS, Ubuntu or any other Ubuntu based distribution
Section titled “Installation on Pop!_OS, Ubuntu or any other Ubuntu based distribution”Firstly, we will need a terminal. You can open it by pressing Super Key / on your keyboard or searching for terminal app in your application menu.
Then, adding a Howdy PPA is needed so our system knows where to get the app:
sudo add-apt-repository -y ppa:boltgolt/howdyNow that we added Howdy repository to your system we can proceed to installing howdy itself. For that you will need to execute one more terminal command:
sudo apt install -y howdyInstallation on other distributions (Debian, Arch, Fedora, openSUSE)
Section titled “Installation on other distributions (Debian, Arch, Fedora, openSUSE)”Please refer to first party instructions here.
Configuring Howdy
Section titled “Configuring Howdy”During the configuration of Howdy, you will be asked “What profile would you like to use?”. Eg:
Preparing to unpack .../106-howdy_2.6.1_all.deb ...
Starting certainty auto config...
After detection, Howdy knows how certain it is that the match is correct.How certain Howdy needs to be before authenticating you can be customized.
F: Fast.Allows more fuzzy matches, but speeds up the scanning process greatly.
B: Balanced.Still relatively quick detection, but might not log you in when further away.
S: Secure.The safest option, but will take much longer to authenticate you.
You can always change this setting in the config.What profile would you like to use? [f/b/s]:Select profile you want to use by typing f, b, s for Fast, Balanced or Secure profiles, accordingly, and pressing Enter. After that Howdy will download and install required dependencies for face recognition.
When everything is done you will be returned to terminal. Now it’s time to add a face for login. For that, run:
sudo howdy addYou will be asked for your sudo password, type it in and press Enter. You will be asked to label the new model. It’s similar to how you’re asked to label a fingerprint you’re adding on your phone. Something like ‘face1’ or ‘John’s face’ will suffice.
Once that’s done, you successfully finished setting up howdy. Try it out by locking your screen and pressing any button to open login. If everything is setup correctly - you will be logged in by Howdy with your face.
Troubleshooting
Section titled “Troubleshooting”“Camera path is not configured correctly, please edit the ‘device_path’ config value.” error when adding a face
Section titled ““Camera path is not configured correctly, please edit the ‘device_path’ config value.” error when adding a face”Finding out what webcam to use
Section titled “Finding out what webcam to use”Open a terminal window if you don’t have one already and execute:
ls /dev | grep "video."This will show you all video inputs you have on your system.
Now, we need to test which of them work for you.
For that, we can use ffplay command. Use it as such:
ffplay /dev/INPUTReplace INPUT with results you had from previous command.
Note: you may need to install ffmpeg before you are able to use the ffplay command. Install ffmpeg like this:
sudo apt install ffmpegConfiguring Howdy to use webcam you want
Section titled “Configuring Howdy to use webcam you want”Once you find a webcam you want to use for Howdy, type in:
sudo howdy configThat will open a configuration file for Howdy in CLI editor called Nano. Find a device path variable there, it should look like that:
device_path = /dev/v4l/by-path/noneChange whatever it equals to input you want, like that:
device_path = /dev/video0After that’s done, exit and save the config file by pressing ctrl+X, Y and then enter. After you exit the config file and get back to terminal, try adding your face to Howdy again, with:
sudo howdy addHowdy always says “Timeout is reached” and never identifies you
Section titled “Howdy always says “Timeout is reached” and never identifies you”You can try lowering certainty level of howdy–in by editing it’s configuration file. Hit the Super Key / and T to open a terminal window. Once you get there, type in:
sudo howdy configand press enter. That will open a configuration file for Howdy in CLI editor called Nano. Find an option called certainty level. It should look something like that:
certainty = 2.8To make howdy more forgiving, rise that number a bit, to 3.8, for example. Be aware, values over 5 are not reccommended. When that’s done, exit and save the config file by pressing ctrl+X, Y and then enter. Now Howdy is more likely to identify you in different conditions.
Removing a saved face print
Section titled “Removing a saved face print”You can delete existing face print you added. For that, you will need to get a list of all prints you got:
sudo howdy listYou might be requested to enter your sudo password and press enter. After you decide what print to delete, memorize it’s ID. A number on the left. Now all you need to delete it from Howdy is to execute this little command in the terminal:
sudo howdy remove IDBut replacing ID with number you memorized a step before.
Uninstalling Howdy
Section titled “Uninstalling Howdy”If you, for some reason, want to uninstall Howdy. Open a terminal window by pressing the Super Key / and T or searching for a Terminal app in your applications menu. Type in:
sudo howdy clearAnd press enter to delete all face prints. Entering sudo password may be required. Then, execute:
sudo apt purge howdyTo delete Howdy itself. And lastly, remove Howdy PPA repository:
sudo add-apt-repository ppa:boltgolt/howdy --removeAfter that’s done, there should be nothing left of Howdy on your computer.
This article was contributed by Vega.