How to detect if the image being captured by webcam is a live human, not just a still image of a person?
Posted by Vegetable-Might-8158@reddit | programming | View on Reddit | 13 comments
I'm currently using face-api.js to detect if there's a face being captured, but my boss that I need to make sure that it is live person being captured. I'm really clueless how to do it.When I google it, it gives me different result.
Every help will be much appreciated, thanks!
programming-ModTeam@reddit
This post was removed for violating the "/r/programming is not a support forum" rule. Please see the side-bar for details.
Creative_Addendum278@reddit
How about couple it with thermal imaging sensor for detecting human presence?
Corrag@reddit
A technique I've seen before is to change the brightness that you're displaying to them, e.g. on a screen share or your side's camera background, and look for a corresponding shadow change in their image. It only works if they have the screen that you have control over active, though. You could try do it while they're reading some text that you put on the screen, for example.
Pure-Huckleberry-484@reddit
Light mode to dark mode. See them smile. Go back to light mode and watch them cringe.
10lbCheeseBurger@reddit
Rapidly flash the screen red and blue and see if they start convulsing.
Corrag@reddit
You joke, but that night not be a bad way to sneak it in. "Oops sorry I always use dark mode personally, but I'm supposed to use light mode to share."
Corrag@reddit
But really you could be at least partially honest with it. "To prove you're human, I need you to watch this video and count how many people the basketball gets passed to." Change the brightness during the video. You can do absolute brightness, or just change who is distributed from right to left or top to bottom, and do shadow analysis.
NiteShdw@reddit
Your best option is a third party service that specializes in this. It's a very complex problem even for seasoned veteran engineers. As someone with 20 YoE I wouldn't build this. I'd pay someone else for it.
guest271314@reddit
It's basically impossible.
Alfiewoodland@reddit
This is a tricky problem to solve. You really can't be 100% sure it's a real human on the other end in a world where we have easy access to convincing deepfakes, but you can make sure a still image won't work.
A common way to get some level of confidence that it's a real person is to ask them to perform an action such as "smile" or "blink", which can be detected programmatically. At least then you have some confidence the video is "live", which is better than nothing.
Vegetable-Might-8158@reddit (OP)
maybe blinking is my easiest route, thanks!
tylian@reddit
Careful with this, glasses make it extremely annoying to detect.
guest271314@reddit
Interesting.
The "Face Expression Recognition" labels are opinionated. The "disgusted" could be bitter beer taste.
I wonder how the software performs when somebody deliberately tries to fool the software.