Giter Club home page Giter Club logo

facelivenessdetection's Introduction

人脸活体检测

活体检测代码是基于面部光流特征和面部68个关键点的数学特征,使用了四层验证关卡来保证登录用户的活体性。最后,用户的三张正脸的活体照片将被保存下来上传到人脸验证服务器用于验证人脸的合法性。

活体检测是基于下面两个开源工具。其中,OpenFace的CLNF算法用于人脸关键点匹配,SeetaFace进行更为实时的人脸检测和跟踪

活体验证关卡包括:

  • 基于面部材质的光流特征
  • 基于面部旋转时关键点的欧氏距离特征
  • 基于活体的嘴部可动性特征
  • 基于活体的眼部可动性特征

安装

MAC

准备

  • 首先安装Homebrew,homebrew是类似于Linux系统上apt-get的软件。

  • 安装TBB,OpenCV3(必须3及以上版本)和 boost

    brew install boost tbb opencv3

Build

在命令行执行下列指令:

mkdir build
cd build 
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make

测试

进入到build/bin目录下。执行

./FaceLivenessDetection

Ubuntu 14.0

Get newest GCC, done using:

sudo apt-get update

sudo apt-get install build-essential

Cmake:

sudo apt-get install cmake

Get BLAS (for dlib)

sudo apt-get install libopenblas-dev liblapack-dev

OpenCV 3.1.0

4.1 Install OpenCV dependencies:

sudo apt-get install git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev checkinstall

4.2 Download OpenCV 3.1.0 from https://github.com/Itseez/opencv/archive/3.1.0.zip

wget https://github.com/Itseez/opencv/archive/3.1.0.zip

4.3 Unzip it and create a build folder:

sudo unzip 3.1.0.zip
cd opencv-3.1.0
mkdir build
cd build

4.4 Build it using:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_SHARED_LIBS=OFF ..
make -j2

sudo make install

Get Boost:

sudo apt-get install libboost1.55-all-dev

alternatively:

sudo apt-get install libboost-all-dev

功能

facelivenessdetection's People

Contributors

senliuy 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.