When developing facial recognition applications on mobile terminals, users often use remake photos and videos to deceive the facial recognition system. Therefore, live detection is a very important part of face recognition and face verification. Currently, there are few open source live detection codes, but the implementation of live detection is relatively simple, so we have made a simple implementation of it and open source all the codes.
Live detection based on HyperLandmark
Added IntraFace-based live detection (2018.03.30)
Due to the limitations of mobile sensors, in the case of a wide range of single cameras, the implementation of non-coordinated facial liveness detection is relatively complex. The data required is also relatively high. Cooperating with sexual live detection only requires users to simply lower their heads and shake their heads, which can greatly reduce the cost of fraud attacks.

# include " AliveDetector.h "
int main ()
{
AliveDetector *aliveDetector = new AliveDetector (detector_path);
while ( /* <read Frame> */ ){
int state = aliveDetector-> detect ( Frame);
// 检测一帧返回人脸状态
// 检测不出人脸或人脸数超过1 -1
// 正常 0
// 摇头 1
// 低头 2
// 抬头 3
}
return 0 ;
}1. Provides simple demo project 2. NDK is version 16
Regarding monocular non-cooperated live detection, we are conducting data collection and algorithm development. Technical exchanges and donation data can be added to the next group.