Git Product home page Git Product logo

facelivenet's Introduction

Demo of the FaceLiveNet1.0

This demo shows the function of the FaceLiveNet for the face authentication, which employs the face verification and the liveness control simultaneous. The demo is realized in TensorFlow1.6, Python 2.7 and openCV 3.0 under Unbuntu 16.4. The details of the FaceLiveNet are described in the paper "FaceLiveNet: End-to-End Face Verification Networks Combining With Interactive Facial Expression-based Liveness Detection". The FaceLiveNet is the holistic end-to-end deep networks for the face authentication including the face verification and the liveness-control of the real presentation of the user. The Challenge-Response mechanism based on the facial expression recognition (Happy and Surprise) is used for the liveness control.

The accuracy of the face verification are measured on the benchmark LFW (99.4%) and YTF(95%), the accuracy of the facial expression recognition of the six basic expressions is measured on the benchmark CK+(99.1%), OuluCasia(87.5%), SFEW(53.2%) and FER2013(68.6%). Fusing the face verification and the facial expression recognition, the global accuracy of the face authentication on the proposed dataset based on the CK+ and the OuluCasia is 99% and 92% respectively. The proposed architecture is shown in Fig.1. More details can be found in the paper.

Dependencies

  • The code is tested on Ubuntu 16.04.

  • install Tensorflow 1.6 (with CPU)

  • install opencv 2.4.13.

  • install python 2.7

Protocol for the face authentication

The face authentication including the face verification and the liveness control can employ in two modes: real-time mode and off-line mode. For the liveness control, both two modes are based on the facial expression Challenge-Response mechanism, i.e. the system randomly proposes an expression as a request, if the user can give a right response by acting the right expression and verified by the system, the user can pass the liveness control. Specially, in this demo maximum two expressions (Happy/Surprise) can be used as the request in the liveness control. Beside the required expression, the neutral expression is always detected in both of the two modes. Since people normally start from the neutral expression to act a facial expression. In this way, the system can protect from the attack of the photo with a facial expression.

1. Real-time face authentication

In the real-time face authentication mode, the face authentication will employ on the real-time camera video stream, the system will not unlock until the user gives the right response and verified by the system.

2. Off-line face authentication based on the upload video

In the off-line face authentication mode, the face authentication is based on the use's upload video-clips. One expression is corresponding to one video. The user will take a video-clip of her/his facial expression and upload to the backend for the face authentication. This mode is risk to take an inappropriate or incomplete video-clip, however the system only processes a small video-clip rather than the video stream in the real-time mode.

Pretrained model

The pretrained model for FaceLiveNet1.0 is here

Training

The face verification networks is trained on the CASIA-WebFace, MSCeleb, the facial expression recognition networks branch is trained on the CK+, OuluCasia, SFEW and FER2013.

Face alignment

The face detection is implemented by the Multi-task CNN (Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks).The paper for MTCNN).

Parameters and Example

Parameters:

--model_dir: Directory containing the metagraph (.meta) file and the checkpoint (ckpt) file containing model parameters --image_ref: The reference image for the face verification --num_expression: The number of the required expressions for face authentication. The maximum num_request_expression is 2 which are the Happy and Surprise, otherwise the Happy will be chosen for face authentication

Examples for command line:

  1. Real-time mode: python Demo_FaceLiveNet1.0_Realtime.py --model_dir /mnt/hgfs/VMshare-2/Fer2013/20180115-025629_model/best_model/ --image_ref ../data/images/Zuheng.jpg --num_expression 1

  2. Off-line video mode: python Demo_FaceLiveNet1.0_video.py --model_dir /mnt/hgfs/VMshare-2/Fer2013/20180115-025629_model/best_model/ --image_ref ../data/images/Zuheng.jpg --num_expression 2

facelivenet's People

Stargazers

Miss Aim Matrix avatar Dirty Work avatar データ画家 avatar Mar1o avatar Richard Cocks avatar  avatar 大霸王 Hacker avatar Zen Obsidian avatar 字节和心脏只能有一个在跳动 avatar ProgrammerUnknown avatar Isabella Emmerich avatar iacker avatar Ashley En avatar  avatar James Juceo avatar No.67 avatar Leo Pan avatar Miss Floyd avatar wei_zh37 avatar 轻茹莉莉酱 avatar hellozim22 avatar Wan Zhe avatar  avatar  avatar Reions avatar  avatar Yongjie Wen avatar 马志宇 avatar Cynthia Xin avatar Suzhou Blue Water avatar Zhida Chen avatar Xuper avatar Jason Sung avatar Benjamin Moll avatar Vicki Cheung avatar Yuzhc avatar Margaret Wong avatar Elaine Tan avatar Hồ Thi Tý avatar Juyong Zhang avatar

Watchers

Hao GONG avatar Leo Pan avatar Zen Obsidian avatar 马志宇 avatar Benjamin Moll avatar Hồ Thi Tý avatar Jason Sung avatar 轻茹莉莉酱 avatar Xuper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.