boltgolt / howdy Goto Github PK
View Code? Open in Web Editor NEW🛡️ Windows Hello™ style facial authentication for Linux
License: MIT License
🛡️ Windows Hello™ style facial authentication for Linux
License: MIT License
On excute howdy test fail with output
Opening a window with a test feed
Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode
QObject::moveToThread: Current thread (0x8fc4420) is not the object's thread (0x91c03a0).
Cannot move to target thread (0x8fc4420)
Violación de segmento
Kubuntu 18.04:
Howdy 2.3.0:
Python 3.6.5.
Hey boltgolt,
Earlier, I was curious about getting howdy to run on Fedora and tried to get it running. After it initially didn't work, I just gave up on it. Now that I am on Arch Linux, I retried installing it and finally got it to work with howdy 1.0.0. I don't know how to convert the current deb packages to files that pacman uses, but if you do have an idea, I can give you the current (working) installer.py file. There is no common-auth file in Arch Linux, so you would need to enter the pam.d information into each pam config file.
>>> Installing python dependencies
Collecting face_recognition_models==0.3.0
Requirement already satisfied: Click>=6.0 in /usr/local/lib/python3.6/dist-packages (6.7)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (1.14.3)
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (5.1.0)
launchpadlib 1.10.6 requires testresources, which is not installed.
Installing collected packages: face-recognition-models
Successfully installed face-recognition-models-0.3.0
>>> Installing face_recognition
Collecting face_recognition==1.2.2
Using cached https://files.pythonhosted.org/packages/28/10/f153bbbc218fc169768aa1c02f2e9178e9241e4af8da56289bdca2c0c217/face_recognition-1.2.2-py2.py3-none-any.whl
Installing collected packages: face-recognition
Successfully installed face-recognition-1.2.2
>>> Configuring howdy
Permissions set
Howdy command installed
>>> Adding howdy as PAM module
>>> START OF /etc/pam.d/common-auth
#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
# traditional Unix authentication mechanisms.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules. See
# pam-auth-update(8) for details.
# Howdy IR face recognition
auth sufficient pam_python.so /lib/security/howdy/pam.py
# here are the per-package modules (the "Primary" block)
auth [success=1 default=ignore] pam_unix.so nullok_secure
# here's the fallback if no module succeeds
auth requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth required pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config
>>> END OF /etc/pam.d/common-auth
Lines will be insterted in /etc/pam.d/common-auth as shown above
Apply this change? [y/N]: y
Inerpeting as a "NO", aborting
dpkg: error processing package howdy (--configure):
installed howdy package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.3-2) ...
Errors were encountered while processing:
howdy
E: Sub-process /usr/bin/dpkg returned an error code (1)
W: Operation was interrupted before it could finish
Please describe the issue in as much detail as possible, including any errors and traces
when using sudo, give out permission error
➜ sudo bash
python3: can't open file '/lib/security/howdy/compare.py': [Errno 13] Permission denied
Unknown error: 2
Linux distribution (if applicable): ubuntu 18.04
Howdy version: 2.3.0 from ppa
I installed this following the instructions in the README fine, andafter fixing the missing cv2 module, it works 99.9% of the time. The only it doesn't want to work is when the laptop is coming from a fresh boot.
On fresh boot, I get to the standard login screen, select my user, and the camera scans my face. I see that it says I was identified and the login screen drops away to the "blank" pre-desktop screen. After a few seconds waiting, I'm brought right back to the login screen and the computer is scanning my face again.
I can only reach my desktop if I hide from the camera and let it time out and bring up the password entry.
I have tested this a few ways, in terminal Howdy works fine, if I lock the screen, sleep the computer, or log out without shutting down the computer I can get right back in using my face, but on ONLY a fresh boot (that I have been able to replicate) I am not able to use my face to login.
System details:
Dell Inspiron 15 7573
Ubuntu 17.10 x64 (relatively fresh install with no garbage yet)
Hi! I'm using Ubuntu and when I boot the PAM process on login is working great but I have to press login button after authentication.
It's possible to go to desktop automatically? I think that it's not library
responsibility, but how could I modify it to do that?
Thanks.
I see the face_recognition cli has an option to set number of cores. I was wondering is this exposed somewhere? Would be nice to have as option in config.ini.
I will have a look myself later.
PS. Really nice work!
Traceback (most recent call last):
File "/usr/local/bin/howdy", line 98, in
import cli.test
File "/lib/security/howdy/cli/test.py", line 5, in
import cv2
ImportError: No module named 'cv2'
Please describe the issue in as much detail as possible, including any errors and traces
I get this when i run the test command
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x2e00003
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x2e0000d
Linux distribution (if applicable): Ubuntu 18.04.1
Howdy version:
I'd love to have this for my Raspberry Pi - but when I run
sudo add-apt-repository ppa:boltgolt/howdy
I get "Error: could not find a distribution template for Raspbian/stretch"
Should this project work on Raspberry Pi? If not, is that an option that could be investigated? Thanks!
This may be outside the scope, but I'm having trouble adding a model with my IR cam (04f2:b613), and upon using test, I see that the camera is returning a mostly pink image:
I also notice that while it's running, the IR emitters are constantly on, not flashing. I notice that when adobe flash uses the IR cam (for something else), the IR emitters flash, and a readable grayscale image is produced. I have no idea where this is controlled. Is there a parameter specified by the application that calls the camera, or is this determined somewhere else?
Hello,
I really love your work, this really speeds up auth by a bunch. I have to say, In well lit conditions it gets my face in less then a second so I've put the scan timeout to 2 sec,
but I've noticed something when i'm in a darker room and there's no way to see the face. It get's stuck and never hits the timeout to offer the password input until I turn on the lights , and then i do it says the timeout has been reached and offers me to input my password. i left it hanging for a few minutes. but nothing happened until i turned on the light and it could see the face.
I've played a lot with the settings to try to avoid this, but no progress so far,
Maybe you could program a little failsafe if the frame is to dark that it just skips the scan completely?
i wish i knew python so i could fix this myself and not bother you with this.
Thanks for reading this,
and keep up the good work!
Cheers!
Hey there, I'm new to linux as you can probably tell by the distro I'm using.
I'm trying to use Howdy with Linux mint. I've got Howdy working with the IR cameras as I'm able to use commands and add new faces and test out the IR-Camera but I haven't been able to get it to actually work during sudo log in, the lock screen, or beginning of computer sign in.
I'm I supposed to integrate it myself using PAM somehow, or am is this related to using Linux Mint maybe?
I apologize if I've missed something obvious.
Thank you!
Hello,
i have problem with howdy...when i run howdy test, it shows this:
Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3a00010
Can somebody help with that?
Thanks in advance.
As suggested by @magarto, make Howdy asynchronous so a password can be entered at the same time though the default Unix way. This has to be done with the PAM, not sure how.
Wasn't sure how to email you. I made a post about the project on the Level1 forums https://forum.level1techs.com/t/windows-hello-style-authentication-for-ubuntu/126171. if you don't already know who they are you should totally go check them out they are great. Also if you wanted to add anything to my post feel free. I tried to make a joke but up to you if you find the humor in it.
So before you uploaded the rewrite I could only get my face to get scanned in a significant amount of ambient light. I am not in a similar kind of lighting situation and I cannot get it to scan my face. I wear glasses so last time I took 2 scans one with and one without. I was planning on doing 6 this go around. The front, both profiles, and combination with/without glasses on. I do not know if this will improve accuracy at all but I cannot even get a single scan.
test.py:
24 if config.get("debug", "force_mjpeg") == "true":
"debug" needs to be "video." :(
Currently test throws exception.
Hello, I am running Ubuntu 18.04 and I've noticed that the IR emitters built into my IR camera only flashes on for a second when howdy starts then subsequently turns back off. During installation however it strobed when choosing which camera was the IR camera. This makes all frames dark frames and my only hope for face authentication is sitting in the sunlight for a natural source of IR light. This also persists if I use Cheese using the IR camera.
I'm running ubuntu-mate and I have howdy working normally when I sudo or login through lightdm, but when I lock my screen, I can only unlock with my password. The webcam never turns on when I get back to the lockscreen. My last computer (also ubuntu-mate) had a fingerprint reader with a similarly configured common-auth file, and the lock screen on that computer did take a fingerprint before asking for a password.
Hello,
please excuse any incorrect formatting, this is my first time using Github. I installed howdy using the aur package but when I run sudo howdy test
I get:
Unable to stop the stream: Invalid argument
Opening a window with a test feed
Press ctrl+C in this terminal to quit
Click on the image to enable or disable slow mode
Traceback (most recent call last):
File "/usr/bin/howdy", line 98, in <module>
import cli.test
File "/usr/lib/security/howdy/cli/test.py", line 78, in <module>
overlay = frame.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
Am I doing something wrong?
Thanks in advance for the support
I've installed howdy in my laptop Lenovo Thinkpad T480s with the camera details as the following link:
boltgolt/howdy-reports#14
boltgolt/howdy-reports#15
After the installation, I ran 'sudo howdy add' but it didn't work. The traceback is as below:
Traceback (most recent call last):
File "/usr/local/bin/howdy", line 90, in
import cli.add
File "/lib/security/howdy/cli/add.py", line 9, in
import cv2
ModuleNotFoundError: No module named 'cv2'
Linux distribution (if applicable): Ubuntu 18.04
Howdy version: v2.3.0
Could you please help me to resolve the problem. Let me know if you need further information.
Thank you,
Ryan
In my setup I do have two cameras. One IR on /dev/video0 and the webcam on /dev/video2. From the source and everything else it quite seems like only one of both realy gets used, the one configured. If you configure the webcam, it'll register me just fine. But it does not use the IR at all (does not activate though). If I use the IR it complains about: no face detected.
What is your setup for this? And what are you sending to the library in use here? The IR picture or the webcam picture? Or something combined?
It's a really awesome project and face recognition worked great before you merged the dev branch into master. Most probably it still does now. I haven't tried it with the new version yet as the program still does not recognize the IR one but my normal webcam only (HP Spectre 15" x360 Coffee Lake). I took a look inside /dev and the only videoX device that's found is video0 which is my webcam. I have no idea which of the other devices the IR sensors could be. Thus I've also no idea how to extend the repo to support my device. Maybe you can filter the right device from the following "ls -1 /dev"-output:
[...]
media0
[...]
video0
[...]
Any support is greatly appreciated. Count on my support in case I can help. Thanks in advance!
I am receiving a dialog saying that and asking for a password. Is it possible to log into the keyring as well as the user account?
If it is can you make that change
Hi everyone,
I had write an issues few month ago: #19
I was a bit curious about why emitter emit when I used fswebcam but not when I used Cheese or Howdy. I play with it today and notice something:
By default fswebcam adjust the resolution from 384x288 to 340x340
I had try to use the parameter -r to set another resolution and it adjust resolution from 1280x720 to 640x480 and the emitter didn't work.
Where you aware of this issue ?
I also try to set Cheese in 340x340 and got this as a result, has I never used IR camera, is this a valid output ? http://webmshare.com/play/QNzyr
P.S: I'm on Ubuntu 18.04
This
Line 13 in 961342a
Can be replaced with
try:
user = os.getlogin()
except:
user = os.environ.get('SUDO_USER')
I can't use the CLI to open the config as on newer systems gedit's been replaced by xed. IDK if you wanna change this in the source.
File "/lib/security/howdy/compare.py", line 11, in
import cv2
ModuleNotFoundError: No module named 'cv2'
Hi there, this is amazing and I really want to try it out. I am getting this issue after I do "sudo howdy add"
Traceback (most recent call last):
File "/usr/lib/python3.6/configparser.py", line 789, in get
value = d[option]
File "/usr/lib/python3.6/collections/init.py", line 883, in getitem
return self.missing(key) # support subclasses that define missing
File "/usr/lib/python3.6/collections/init.py", line 875, in missing
raise KeyError(key)
KeyError: 'force_mjpeg'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/howdy", line 86, in
import cli.add
File "/lib/security/howdy/cli/add.py", line 85, in
if config.get("debug", "force_mjpeg") == "true":
File "/usr/lib/python3.6/configparser.py", line 792, in get
raise NoOptionError(option, section)
configparser.NoOptionError: No option 'force_mjpeg' in section: 'debug'
Traceback (most recent call last):
File "learn.py", line 82, in <module>
captureFrame(delay)
File "learn.py", line 27, in captureFrame
ref = face_recognition.load_image_file(tmp_file)
File "/home/akxer/.local/lib/python3.6/site-packages/face_recognition/api.py", line 81, in load_image_file
return scipy.misc.imread(file, mode=mode)
File "/home/akxer/.local/lib/python3.6/site-packages/numpy/lib/utils.py", line 101, in newfunc
return func(*args, **kwds)
File "/home/akxer/.local/lib/python3.6/site-packages/scipy/misc/pilutil.py", line 164, in imread
im = Image.open(name)
File "/home/akxer/.local/lib/python3.6/site-packages/PIL/Image.py", line 2543, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/howdy_akxer.jpg'
This comes after I run python3 learn.py. It asks me to look into camera, but the camera does not turn on(the light beside it does not turn on) and then it throws this exception
After installing there is no howdy
command on my cmd.
I installed this a few mins ago on my new laptop with Ubuntlu
After installing there is no howdy
...
I juste receive my new computer with an IR Camera so I would like to try your software ! :)
So I have properly done the installation, selection the device with blinking IR emitter.
But when I sudo
or use howdy test my emitter blink only once.
I have try to manually:
import cv2
vd = cv2.VideoCapture(int("0"))
vd.read()
And like in howdy test, emitters blink once and then stay in a 'low red state' and don't blink anymore even if I vd.read() again.
Any idea to where I should look ?
Just installed Howdy on Manjaro, and was able to setup everything fairly easily by following the ArchWiki instructions. My use case is to just use howdy at the graphical login screen. So, I've modified /etc/pam.d/sddm
like (hope it's the correct thing to do):
auth sufficient pam_python.so /lib/security/howdy/pam.py
auth include system-login
auth optional pam_kwallet5.so
account include system-login
password include system-login
session include system-login
session optional pam_kwallet5.so auto_start
I can now login without password. However, soon after login, KDE Wallet prompts for a password, which kind of defeats the purpose of having face authentication. I think the default configuration in Manjaro is for KDE Wallet to use the same password as the one used for login. Perhaps that's why it never prompts for one when I'm using the usual password authentication.
How could Howdy be better integrated with pam_kwallet5, so that Howdy's authentication would be accepted by KWallet as well? Alternatively, is it possible to change the sddm
configuration somehow to achieve the same? Since I don't know about the underlying details, I wasn't sure if this should be posted as a bug or a feature request, so sorry if I posted at the wrong place. I'd be happy to repost under the correct section if needed.
This seems to apply to all applications except the terminal and the login screen.
For example, if I try to use Synaptic or GParted or elevate Nemo to root, the IR emitter will fire and authenticate, but then it will continue to fire for several minutes afterwards, before stopping on its own. If you try to run another authentication in the terminal it will throw VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV Unable to stop the stream: Device or resource busy
and in a gui it will say "Face detection timeout reached" and re-show the password box.
Running Linux Mint 18.3 Cinnamon 64-Bit
Running Howdy 2.3.0
Hi,
I'm getting errors when trying to sudo, evidently the history is missing.
File "/lib/security/howdy/compare.py", line 101, in
if float(hist[0]) / hist_total * 100 > float(config.get("video", "dark_threshold")):
ZeroDivisionError: float division by zero
Unknown error: 1
is the backtrace.
I'll try to take a look when I can.
Cheers
I don't know if this is a lot of work or not, but would it be possible for Howdy to be ported to Fedora? If that is too much work, could you add documentation so that I could compile from source?
Traceback (most recent call last):
File "/lib/security/howdy/compare.py", line 116, in
face_encodings = face_recognition.face_encodings(frame)
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 199, in face_encodings
raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small")
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 153, in _raw_face_landmarks
face_locations = _raw_face_locations(face_image)
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 102, in _raw_face_locations
return face_detector(img, number_of_times_to_upsample)
RuntimeError: The stride of the 3rd dimension (the channel dimension) of the numpy array must be 1
Unknown error: 1
This is the error i get when i run sudo -i and then it asks me for the password as usual.
FYI: my laptop doesn't have an IR emitter, could that be the issue?
The test command works after i inserted that line into evironments and it does detect my face.
hi,
Great work, but, i have to add new face profile often, i know what happen. if you need information i would like to help.
Hello, I use archlinux, can anyone tell me how to install howdy? Or, who can give me a PKGBUILD?
Thanks!
$ sudo -i
Traceback (most recent call last):
File "/home/user/howdy/compair.py", line 5, in
import face_recognition
ModuleNotFoundError: No module named 'face_recognition'
Unknown error: 1
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3200010
For some reason distance is a huge struggle now. I have taken 6 scans so far and using my pc at the same distance as before it fails to detect a face. I also noticed you changed the certainty to 3.5 instead of 3. This should make it less accurate and more likely to authenticate. Only the opposite is happening. I can fix this by getting really close to my IR camera but it is inconvenient to do and I did not have to prior.
Hello
I updated my laptop from ubuntu 17.10 to 18.04 and I am getting this errors, could you please take a look.
File "/lib/security/howdy/compare.py", line 124, in
face_encodings = face_recognition.face_encodings(frame)
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 199, in face_encodings
raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small")
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 153, in _raw_face_landmarks
face_locations = _raw_face_locations(face_image)
File "/usr/local/lib/python3.6/dist-packages/face_recognition/api.py", line 102, in _raw_face_locations
return face_detector(img, number_of_times_to_upsample)
RuntimeError: The stride of the 3rd dimension (the channel dimension) of the numpy array must be 1
Unknown error: 1
Best Regards!
Hi!
I am trying to test Howdy on the Dell XPS 13 9370 Developer Edition (Ubuntu 16.04), and although the install detects and tries 2 cameras, neither turn on the IR emitters (which work in Windows obviously).
Any thoughts on what might cause this or how I can help debug?
Thanks!
hi, I receive the following errors and the howdy command is not available after installation (ubuntu 17.10, IR led blinks during the test):
Traceback (most recent call last):
File "/tmp/howdy_install.py", line 94, in
handleStatus(subprocess.call(["git", "clone", "https://github.com/davisking/dlib.git", "/tmp/dlib_clone"]))
File "/usr/lib/python3.6/subprocess.py", line 267, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'git': 'git'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.