justadudewhohacks / face-api.js

JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
MIT License
16.45k stars 3.67k forks source link

Liveness Detection #221

Open GL-RuiLa opened 5 years ago

GL-RuiLa commented 5 years ago

Hi,

I am working on an internal room check-in system using this API. The detection speed and accuracy looks great. But there is a problem that people can use pictures on their phone or printed paper to unlock the door. I am wondering if there is any liveness detection (anti-spoofing) model we can integrate to make this API better. Thanks

Rio

nathany commented 5 years ago

Also interested in liveness detection.

One aspect of that could be blink detection, see #176.

leandrojo commented 5 years ago

Also interested! Something like that! http://cvlab.cse.msu.edu/project-face-anti.html

nathany commented 5 years ago

An article on one type of liveness detection using a convolutional neural network: https://www.pyimagesearch.com/2019/03/11/liveness-detection-with-opencv/

guinaldi commented 5 years ago

Also Interested!

Bajajar commented 5 years ago

I would love to see Vincent @justadudewhohacks implements some kind like this https://github.com/richmondu/libfaceid

ScottDellinger commented 4 years ago

This is likely my #1 request for this fantastic library.

ariffromeo commented 4 years ago

I have converted liveness keras model from https://www.pyimagesearch.com/2019/03/11/liveness-detection-with-opencv/ into tensorflowjs json model. anyone know how can i use this converted model in this library?

live

msvargas commented 4 years ago

New open source solution: https://github.com/SoftwareGift/FeatherNets_Face-Anti-spoofing-Attack-Detection-Challenge-CVPR2019

international download link model

Testing code

Output:

./images/fake.jpg: FAKE!
./images/real.jpg: REAL
ankitnamdeo34 commented 4 years ago

An article on one type of liveness detection using a convolutional neural network: https://www.pyimagesearch.com/2019/03/11/liveness-detection-with-opencv/

I tried that but the accuracy of the model is very poor.

no-1ne commented 4 years ago

Landmarks, specifically for eyes, changes in difference of distance between upper eye points and lower eyes points

We tried to use the same for fatigue detection but sadly eyes closed, it wasn't perfoming well for Indians faces so had to move to a different solution.

Summarizing, record a video run face-api notice how distances are changing, disproportionately compared to other landmarks, they are alive if not it's something static which may be moving around as a whole

Cheyenne55 commented 4 years ago

Hello there,

Just wanted to suggest a direction on how to do this.

There's a company which I won't disclose the name, who does the liveness detection based on the realness of the skin of the person.

While capturing the video input, several screens of different colors are quickly displayed on the screen. The algorithm analyses the reflection of light on the skin and determines if it's real or not.

Chey

sundar505 commented 4 years ago

I want code example for checking face liveness.

tuanphan1998 commented 3 years ago

Hopefully this repo has an additional guide to detecting fake faces

cristian2395 commented 3 years ago

@ariffromeo, sorry, did you manage to incorporate the models?

crypt0miester commented 3 years ago

excellent feature request. would love to have this.

financeable commented 3 years ago

+100 on this request!

qalainau commented 3 years ago

I think this code will work. https://gist.github.com/kleysonr/d75494f239ad0dce561a55a624920693

Alireza17224 commented 2 years ago

I have a problem like this too. Please fix it 😍😍 .

codevjs commented 1 year ago

+1