I'm always curious about what it takes to confuse things like this (if for no other reason so that I will know how to make face recognition camouflage to hide from the autonomous weapons that roam our future post-apocalyptic hellscape).
This demo seems to do pretty well -- e.g. it handles covering one eye or arbitrary parts of your face, but has some trouble at oblique angles (like your face in profile or near-profile).
But here's an odd thing I noticed:
- Take a pair of over-the-ear headphones ("cans").
- Rotate them 90 degrees so that one earpiece is on your forehead (or above it) and the other is at the back of your head.
This seems to completely stump the algorithm, even when your eyes are plainly visible and looking straight into the camera. With my headphones turned sideways it never once identified my pupils (or my face) accurately.
Possibly a hat would do something similar (I don't have one handy) but a largish dark circle your forehead seems to confuse it.
This seems to have a lot of trouble when wearing glasses (large-style glasses). I was surprised of how bad it seemed for 2019 tech, then tooky glasses away and was blown away of how good it is.
It seemed to have a little trouble with light reflecting off my glasses (sometimes it found my eyes but placed my pupils more or less on my eyebrows) but it generally did OK with my glasses.
My glasses are closer to the "invsible frames" side of the spectrum than the Harry Caray / Elvis Costello style, so maybe that matters.
I guess maybe I should just review the code but I was trying to figure out if it uses other facial features to "anchor" the eyes or just the (fairly recognizable) features of human eyes themselves. Your glasses experience makes me guess it is pretty eye dependent -- it does have more trouble with one eye covered for example, whereas if it was anchoring off some combination of ear/nose/mouth/chin it should be easy enough to ID the eye from half the face, let alone with just an eyepatch-sized cover.
>This seems to completely stump the algorithm, even when your eyes are plainly visible
That's a false positive. This uses quite simple algos, decisition trees, which have more false outcomes (both positive and negative) on this pupil detection task that state of the art models, which would be deep convolutional networks. The decision trees are much less computationally expensive though - running a modern deep CNN at 30 fps needs a dedicated GPU. The decision trees will run just fine on a CPU in a browser!
This demo seems to do pretty well -- e.g. it handles covering one eye or arbitrary parts of your face, but has some trouble at oblique angles (like your face in profile or near-profile).
But here's an odd thing I noticed:
- Take a pair of over-the-ear headphones ("cans").
- Rotate them 90 degrees so that one earpiece is on your forehead (or above it) and the other is at the back of your head.
This seems to completely stump the algorithm, even when your eyes are plainly visible and looking straight into the camera. With my headphones turned sideways it never once identified my pupils (or my face) accurately.
Possibly a hat would do something similar (I don't have one handy) but a largish dark circle your forehead seems to confuse it.
Very neat for a 200 LoC browser-based demo.