boltgolt / howdy

🛡️ Windows Hello™ style facial authentication for Linux
MIT License
5.89k stars 306 forks source link

Face detection always timeout #956

Open einsteinarbert opened 2 months ago

einsteinarbert commented 2 months ago

Please describe the issue in as much detail as possible, including any errors and traces. If your issue is a camera issue, be sure to also post the image generated by running sudo howdy snapshot.

I am tracing and see that line always false: compare.py:

        # Check if a match that's confident enough
        if 0 < match < video_certainty:

I don't know why because sudo howdy test return good detect when red circle drawing on my face SO, I fixed this code by hot fix into /lib/security/howdy/compare.py:

# Check if a match that's confident enough
if video_certainty <= match:

==> It worked perfect.

I've searched for similar issues already, and my issue has not been reported yet.

Linux distribution (if applicable): ubuntu 24.04 Howdy version (sudo howdy version): Howdy 2.6.1

popy2k14 commented 4 weeks ago

@einsteinarbert After setting up howdy on mint 22 i have also tested your changes, also the one above.

But i think you have an logic error here. The original code:

        # Check if a match that's confident enough
        if 0 < match < video_certainty:

works perfectly fine! It checks the actual calculated "match" value is greater than zero and smaler than set "video_certainty" threshold.

Your change INVERT's the logic and does exactly the oposite! If an face is outside the threshold!!!!

        # Check if a match that's confident enough
        if video_certainty <= match:

So it's not an fix, it's a big security hole on your system! (or any other person who is merging your code).

alvarokrn commented 2 weeks ago

I'm having also "Face detection timeout reached" when I suspend my laptop and then I try to unlock again. I'm using Fedora 40.